parellel yay
This commit is contained in:
parent
d836a40047
commit
e71ac885b4
18
urchin
18
urchin
@ -126,7 +126,7 @@ recurse() {
|
||||
exit $exit_code
|
||||
) &
|
||||
|
||||
if $single_process; then
|
||||
if $run_in_series; then
|
||||
wait $!
|
||||
exit_code=$?
|
||||
if $exit_on_not_ok && test $exit_code -ne 0; then
|
||||
@ -147,6 +147,7 @@ recurse() {
|
||||
if $cycle_shell && has_sh_or_no_shebang_line "$potential_test"; then
|
||||
# Set it to the shell specified via -s.
|
||||
while read the_test_shell; do
|
||||
(
|
||||
urchin_source setup
|
||||
|
||||
# Run the test
|
||||
@ -172,12 +173,19 @@ recurse() {
|
||||
elapsed=$(($finish - $start))
|
||||
printf "${potential_test}\t${the_test_shell}\t${result}\t${elapsed}\n" \
|
||||
>> $tmp/log
|
||||
if $exit_on_not_ok && test 0 -ne $exit_code; then
|
||||
exit "$exit_code"
|
||||
) &
|
||||
|
||||
if $run_in_series; then
|
||||
wait $!
|
||||
exit_code=$?
|
||||
if $exit_on_not_ok && test $exit_code -ne 0; then
|
||||
urchin_source teardown_dir
|
||||
return 1
|
||||
fi
|
||||
|
||||
fi
|
||||
done < $shell_list
|
||||
|
||||
wait
|
||||
else
|
||||
echo 'The -n flag is not implemented' > /dev/stderr
|
||||
exit 1
|
||||
@ -473,7 +481,7 @@ if [ "$#" != '1' ] || [ ! -e "$1" ]; then
|
||||
urchin_exit 11
|
||||
fi
|
||||
|
||||
if $exit_on_not_ok && ! $single_process; then
|
||||
if $exit_on_not_ok && ! $run_in_series; then
|
||||
echo 'You must also pass -b/--series in order to use -e/--exit-on-fail.' >&2
|
||||
urchin_exit 11
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user