Split logs into test cases to prevent overwriting
refs #2907
Change-Id: Ia7ca07fe0d7cd7428dbba5db443e87983aaaca3f
diff --git a/test_nfdc/include.sh b/test_nfdc/include.sh
index 4e92a89..4319e9f 100755
--- a/test_nfdc/include.sh
+++ b/test_nfdc/include.sh
@@ -9,10 +9,10 @@
start_nfd() {
# start nfd on localhost
- sudo nfd &> $workdir/logs/nfd.log &
+ sudo nfd &> $workdir/logs/$1/nfd.log &
# start nfd on hostB
- ssh $CTRL_B "mkdir -p $workdir/logs ; sudo nfd &> $workdir/logs/nfd.log &\
+ ssh $CTRL_B "mkdir -p $workdir/logs/$1 ; sudo nfd &> $workdir/logs/$1/nfd.log &\
sleep 2"
sleep 2
}
diff --git a/test_nfdc/nfdc-test.sh b/test_nfdc/nfdc-test.sh
index c3c246d..daa76da 100755
--- a/test_nfdc/nfdc-test.sh
+++ b/test_nfdc/nfdc-test.sh
@@ -2,13 +2,13 @@
source ../multi-host.conf
source include.sh
workdir=$(pwd)
-mkdir -p $workdir/logs
+mkdir -p $workdir/logs/$1
testCase=$1
-testLog=$workdir/logs/nfdc_test_$testCase.log
+testLog=$workdir/logs/$testCase/nfdc_test.log
echo "TEST START" > $testLog
-start_nfd
+start_nfd $testCase
# run test case A: test nfdc create / add-nexthop / destroy test case
if [[ $testCase == 'A' ]]; then