From 552873a642a18d04ee22596f18b7284172f64191 Mon Sep 17 00:00:00 2001 From: Thomas Levine <_@thomaslevine.com> Date: Sun, 28 Feb 2016 16:05:03 +0000 Subject: [PATCH] adding parallel stuff --- urchin | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/urchin b/urchin index 1fb40bc..c31dc83 100755 --- a/urchin +++ b/urchin @@ -115,21 +115,26 @@ recurse() { # The directory is empty. break fi - urchin_source setup - set +e - recurse "$requested_path" "$test" "$cycle_shell" "$TEST_SHELL" - - exit_code=$? - set -e - - if $exit_on_not_ok && test $exit_code -ne 0; then + ( + urchin_source setup + set +e + recurse "$requested_path" "$test" "$cycle_shell" "$TEST_SHELL" + exit_code=$? + set -e urchin_source teardown - urchin_source teardown_dir - urchin_exit 1 - fi + exit $exit_code + ) & - urchin_source teardown + if $single_process; then + wait $! + exit_code=$? + if $exit_on_not_ok && test $exit_code -ne 0; then + urchin_source teardown_dir + urchin_exit 1 + fi + else + fi done urchin_source teardown_dir )