Test for task ordering

This commit is contained in:
southerntofu 2020-09-22 15:36:39 +02:00
parent 70eb9b7856
commit 3cef9d4501
1 changed files with 13 additions and 0 deletions

View File

@ -250,6 +250,19 @@ function setup_submodule {
[ -f /tmp/forgebuild-time ]
}
@test "tasks are run in alphanumeric order" {
# Run in background
$FORGEBUILD -b $FORGEBUILDDIR &
while [ ! -f /tmp/forgebuild-branch ]; do
[ ! -f /tmp/forgebuild-host ] && [ ! -f /tmp/forgebuild-time ]
done
while [ ! -f /tmp/forgebuild-host ]; do
[ ! -f /tmp/forgebuild-time ]
done
sleep 1
[ -f /tmp/forgebuild-time ]
}
@test "can run with ~/.forgebuild" {
if [ -d $HOME/.forgebuild ]; then
NEWDIR="$(mktemp -d)"