Split logs into test cases to prevent overwriting
refs #2907
Change-Id: Ia7ca07fe0d7cd7428dbba5db443e87983aaaca3f
diff --git a/test_multicast/multicast-test.sh b/test_multicast/multicast-test.sh
index 4c39bf3..11295ee 100755
--- a/test_multicast/multicast-test.sh
+++ b/test_multicast/multicast-test.sh
@@ -6,7 +6,7 @@
else
a_ipaddr=$(ip addr show to $IP4_A1 | head -1 | cut -d: -f2 | cut -d' ' -f2)
fi
-mkdir -p logs
+mkdir -p logs/$1
workdir=$(pwd)
clean_up() {
@@ -16,17 +16,17 @@
}
# start nfd and ndn-traffic-server on B and C
-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 3;\
- ndn-traffic-server $workdir/NDNTrafficServerB.conf &> $workdir/logs/server.log &"
-ssh $CTRL_C "mkdir -p $workdir/logs;\
- sudo nfd &> $workdir/logs/nfd.log &\
+ ndn-traffic-server $workdir/NDNTrafficServerB.conf &> $workdir/logs/$1/server.log &"
+ssh $CTRL_C "mkdir -p $workdir/logs/$1;\
+ sudo nfd &> $workdir/logs/$1/nfd.log &\
sleep 3;\
- ndn-traffic-server $workdir/NDNTrafficServerC.conf &> $workdir/logs/server.log &"
+ ndn-traffic-server $workdir/NDNTrafficServerC.conf &> $workdir/logs/$1/server.log &"
# start nfd and add nexthop of ndn:/test-mcast to UDP multicast face
-sudo nfd &> $workdir/logs/nfd.log &
+sudo nfd &> $workdir/logs/$1/nfd.log &
sleep 3
faceid=$(nfd-status -f | grep $a_ipaddr | grep -Po 'faceid=.*? ' | sed 's/faceid=//' | sed 's/ //')
nfdc add-nexthop ndn:/test-mcast $faceid