Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.

Bats script does not exit in some cases. #218

Open
ghost opened this issue May 16, 2017 · 1 comment
Open

Bats script does not exit in some cases. #218

ghost opened this issue May 16, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented May 16, 2017

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?

@xmik
Copy link

xmik commented May 16, 2017

Try if workaround from this comment helps: #80 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant