I'm using bats to automate the runs of some tests I've written in bash. What I'm doing in the bats file is only calling the bash script, e.g.
@test "Run test script." { bash ~/test.sh }
This was working fine until I made some changes to the test.sh (saved the test logs to a different directory owned by a different user). After the changes are made, the test.sh works fine and exits after completing the tasks however the test.bats doesn't exit and hangs after:
ok 1 Run test script.
I checked the running processes and found that test.sh is no longer running. However, a script "/usr/lib/bats/bats-format-tap-stream" in case of pretty formatting and "cat" in case of TAP is running. Killing that formatter kills the test.bats as well.
Is there any way to explicitly exit the bats script in this situation?
I'm using bats to automate the runs of some tests I've written in bash. What I'm doing in the bats file is only calling the bash script, e.g.
@test "Run test script." { bash ~/test.sh }
This was working fine until I made some changes to the test.sh (saved the test logs to a different directory owned by a different user). After the changes are made, the test.sh works fine and exits after completing the tasks however the test.bats doesn't exit and hangs after:
ok 1 Run test script.
I checked the running processes and found that test.sh is no longer running. However, a script "/usr/lib/bats/bats-format-tap-stream" in case of pretty formatting and "cat" in case of TAP is running. Killing that formatter kills the test.bats as well. Is there any way to explicitly exit the bats script in this situation?