git.annexia.org
/
whenjobs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a $JOBSERIAL environment variable when jobs run.
[whenjobs.git]
/
tests
/
jobs
/
test_run.sh
diff --git
a/tests/jobs/test_run.sh
b/tests/jobs/test_run.sh
index
13cd844
..
ad2bcde
100755
(executable)
--- a/
tests/jobs/test_run.sh
+++ b/
tests/jobs/test_run.sh
@@
-60,6
+60,10
@@
done
trap - INT TERM QUIT EXIT
rm -rf "$testdir/.whenjobs"
trap - INT TERM QUIT EXIT
rm -rf "$testdir/.whenjobs"
+# Sort the output by job serial number, so that jobs that happened to
+# fire off in parallel are still recorded in order.
+sort -n -o "$testdir/test_output" "$testdir/test_output"
+
# Check the test output matches the expected output.
if ! cmp -s "$testdir/test_output" "$1.expected"; then
echo "$0: $1: test output did not match expected output"
# Check the test output matches the expected output.
if ! cmp -s "$testdir/test_output" "$1.expected"; then
echo "$0: $1: test output did not match expected output"