Check debug output

This commit is contained in:
southerntofu 2020-11-28 12:10:57 +01:00
parent efd4392eca
commit 93698d8df4
1 changed files with 21 additions and 12 deletions

View File

@ -93,29 +93,38 @@ error() {
echo "/tmp/THISPATHDOESNOTEXIST" > $FORGEBUILDDIR/time.source
run $FORGEBUILD -b $FORGEBUILDDIR time
echo "$output"
[ "${lines[0]}" = "$(info config)" ]
[ "${lines[1]}" = "$(info process)" ]
[ "${lines[2]}" = "$(info clone)" ]
[ "${lines[3]}" = "$(error clone_failed)" ]
[ "${lines[0]}" = "$(debug found_task)" ]
[ "${lines[1]}" = "$(info config)" ]
[ "${lines[2]}" = "$(debug start_proc)" ]
[ "${lines[3]}" = "$(info process)" ]
[ "${lines[4]}" = "$(info clone)" ]
[ "${lines[5]}" = "$(error clone_failed)" ]
}
@test "simple sourceless run" {
run $FORGEBUILD -b $FORGEBUILDDIR time
echo "$output"
[ "${lines[0]}" = "$(info config)" ]
[ "${lines[1]}" = "$(info process)" ]
[ "${lines[2]}" = "$(info run)" ]
[ "${lines[0]}" = "$(debug found_task)" ]
[ "${lines[1]}" = "$(info config)" ]
[ "${lines[2]}" = "$(debug start_proc)" ]
[ "${lines[3]}" = "$(info process)" ]
[ "${lines[4]}" = "$(info run)" ]
}
@test "no tasks requested" {
run $FORGEBUILD -b $FORGEBUILDDIR
echo "$output"
[ "${lines[0]}" = "$(info no_task)" ]
[ "${lines[1]}" = "$(info config)" ]
[ "${lines[2]}" = "$(info process)" ]
[ "${lines[3]}" = "$(info run)" ]
[ "${lines[4]}" = "$(info process)" ]
[ "${lines[5]}" = "$(info run)" ]
[ "${lines[1]}" = "$(debug found_task)" ]
[ "${lines[2]}" = "$(debug found_task)" ]
[ "${lines[3]}" = "$(info config)" ]
[ "${lines[4]}" = "$(debug start_proc)" ]
[ "${lines[5]}" = "$(info process)" ]
[ "${lines[6]}" = "$(info run)" ]
[ "${lines[7]}" = "$(debug start_proc)" ]
[ "${lines[8]}" = "$(info process)" ]
[ "${lines[9]}" = "$(info run)" ]
}
@test "no tasks exist" {