aboutsummaryrefslogtreecommitdiff
path: root/src/test/test-network.sh
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2014-10-04 13:18:56 +1000
committerteor <teor2345@gmail.com>2014-10-04 13:18:56 +1000
commit9a2d4b66479695da0a26a7168d6ddcfd6838151f (patch)
treebac5bfc903c4518f3a0a6394365ce995879fa4a6 /src/test/test-network.sh
parentb448ec195dd8687d2d5f363e12fec046eb2d1677 (diff)
downloadtor-9a2d4b66479695da0a26a7168d6ddcfd6838151f.tar.gz
tor-9a2d4b66479695da0a26a7168d6ddcfd6838151f.zip
Stop an apparent test-network hang when used with make -j2
If (GNU) Make 3.81 is running processes in parallel using -j2 (or more), it waits until all descendent processes have exited before it returns to the shell. When a command like "make -j2 test-network" is run, this means that test-network.sh apparently hangs until it either make is forcibly terminated, or all the chutney-launched tor processes have exited. A workaround is to use make without -j, or make -j1 if there is an existing alias to "make -jn" in the shell. We resolve this bug in tor by using "chutney stop" after "chutney verify" in test-network.sh.
Diffstat (limited to 'src/test/test-network.sh')
-rwxr-xr-xsrc/test/test-network.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test/test-network.sh b/src/test/test-network.sh
index 7b59864166..d7fdb3533b 100755
--- a/src/test/test-network.sh
+++ b/src/test/test-network.sh
@@ -45,3 +45,6 @@ n=$BOOTSTRAP_TIME; while [ $n -gt 0 ]; do
sleep 1; n=$(expr $n - 1); echo -n .
done; echo ""
./chutney verify $CHUTNEY_NETWORK
+# work around a bug/feature in make -j2 (or more)
+# where make hangs if any child processes are still alive
+./chutney stop $CHUTNEY_NETWORK