X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=t%2Fapenwarr%2F010-jobserver%2Ffirst.do;fp=t%2Fapenwarr%2F010-jobserver%2Ffirst.do;h=2835c19a6596309a07df318fdb56b9734ad32a6b;hb=a6510ac6225a3a93df9d27dc316a3c1c0fcde426;hp=0000000000000000000000000000000000000000;hpb=a5111e179e5aca57420fd1cc95c1b21e7cd34226;p=goredo.git diff --git a/t/apenwarr/010-jobserver/first.do b/t/apenwarr/010-jobserver/first.do new file mode 100644 index 0000000..2835c19 --- /dev/null +++ b/t/apenwarr/010-jobserver/first.do @@ -0,0 +1,24 @@ +# in case we're (erroneously) running in parallel, give second.do some +# time to start but not finish. +echo 'first sleep' >&2 +sleep 1 + +# Because of --shuffle, we can't be sure if first or second ran first, but +# because all.do uses -j1, we *should* expect that if second ran first, it +# at least ran to completion before we ran at all. +if [ -e second.start ]; then + echo 'first: second already started before we did...' >&2 + [ -e second.end ] || exit 21 + echo 'first: ...and it finished as it should.' >&2 + # no sense continuing the test; can't test anything if second already + # ran. + exit 0 +fi +echo 'first: second has not started yet, good.' >&2 + +echo 'first spin' >&2 +redo 1.a.spin +[ -e 1.a.spin ] || exit 11 +echo 'first spin complete' >&2 + +! [ -e second.start ] || exit 22