]> git.proxmox.com Git - ovs.git/blame - tests/testsuite.patch
system-kmod-macros: Load TFTP module.
[ovs.git] / tests / testsuite.patch
CommitLineData
ddd347c2
GS
1--- testsuite 2015-02-11 17:19:21.654646439 -0800
2+++ testsuite 2015-02-11 17:15:03.810653032 -0800
3@@ -4669,6 +4669,73 @@
4 fi
5 exec 6<&-
6 wait
7+elif test $at_jobs -ne 1 &&
8+ test "$IS_WIN32" = "yes"; then
9+ # FIFO job dispatcher.
10+ trap 'at_pids=
11+ for at_pid in `jobs -p`; do
12+ at_pids="$at_pids $at_job_group$at_pid"
13+ done
14+ if test -n "$at_pids"; then
15+ at_sig=TSTP
16+ test "${TMOUT+set}" = set && at_sig=STOP
17+ kill -$at_sig $at_pids 2>/dev/null
18+ fi
19+ kill -STOP $$
20+ test -z "$at_pids" || kill -CONT $at_pids 2>/dev/null' TSTP
21+
22+ echo
23+ # Turn jobs into a list of numbers, starting from 1.
24+ running_jobs="`pwd`/tests/jobdispatcher"
25+ mkdir -p $running_jobs
26+ at_joblist=`$as_echo "$at_groups" | sed -n 1,${at_jobs}p`
27+
28+ set X $at_joblist
29+ shift
30+ for at_group in $at_groups; do
31+ $at_job_control_on 2>/dev/null
32+ (
33+ # Start one test group.
34+ $at_job_control_off
35+ touch $running_jobs/$at_group
36+ trap 'set +x; set +e
37+ trap "" PIPE
38+ echo stop > "$at_stop_file"
39+ rm -f $running_jobs/$at_group
40+ as_fn_exit 141' PIPE
41+ at_fn_group_prepare
42+ if cd "$at_group_dir" &&
43+ at_fn_test $at_group &&
44+ . "$at_test_source"
45+ then :; else
46+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unable to parse test group: $at_group" >&5
47+$as_echo "$as_me: WARNING: unable to parse test group: $at_group" >&2;}
48+ at_failed=:
49+ fi
50+ rm -f $running_jobs/$at_group
51+ at_fn_group_postprocess
52+ ) &
53+ $at_job_control_off
54+ shift # Consume one token.
55+ if test $# -gt 0; then :; else
56+ while [ "`ls -l $running_jobs 2>/dev/null | wc -l`" -gt "$at_jobs" ]; do
57+ sleep 0.1
58+ done
59+ set x $*
60+ fi
61+ test -f "$at_stop_file" && break
62+ done
63+ # Read back the remaining ($at_jobs - 1) tokens.
64+ set X $at_joblist
65+ shift
66+ if test $# -gt 0; then
67+ shift
68+ while [ "`ls -l $running_jobs | wc -l`" -gt 1 ]; do
69+ sleep 0.1
70+ done
71+ fi
72+ rmdir $running_jobs
73+ wait
74 else
75 # Run serially, avoid forks and other potential surprises.
76 for at_group in $at_groups; do