Save stc temp logs in the stc folder
There was an issue when OCN was set to localhost. As part of Net-Smoke,
the command 'mn -c' is run which removes '/tmp/*.log'. This potentially
caused some tests to fail.
Change-Id: If68c184902b994e1ee38ea775c378ce29cdb891f
(cherry picked from commit a67dc45535c7b0b8ea6f246a10c1f2e4e18abb83)
diff --git a/tools/test/bin/onos-cluster-execute-expect b/tools/test/bin/onos-cluster-execute-expect
index 067320e..0754045 100755
--- a/tools/test/bin/onos-cluster-execute-expect
+++ b/tools/test/bin/onos-cluster-execute-expect
@@ -12,14 +12,16 @@
. $ONOS_ROOT/tools/build/envDefaults
-aux=/tmp/stc-$$.log
+aux=/tmp/stc/stc-$$.log
trap "rm -f $aux 2>/dev/null" EXIT
cmd=""
for a in ${*:1}; do shift; if [ "$a" = "--expect" ]; then break; fi; cmd="$cmd $a"; done
expect="${@: -1}"
echo $cmd
-echo $expect
+echo "expect ${expect}"
node_count=`onos $OC1 nodes | wc -l`
+# FIMXE: This only works if nodes are sequential
+# For dynamic clustering we could grab the IPs from 'nodes'
for i in `seq 1 $node_count`; do
node_var="OC$i"
onos ${!node_var} $cmd > $aux