You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I run gotestsum in a loop in a bash script. In order to detect SIGINT in the bash script I have to inspect the exit code of gotestsum (I think). However, <ctrl-c> during test processing triggers an exit code of 1.
$ gotestsum .# hit <ctrl-c> immediately
$ echo$?
1
The same exit code happens if tests fail.
So, I can't terminate my testing loop based on SIGINT - checking if $? = 1 will treat failed tests the same way as SIGINT.
I recommend having failed tests keep $? = 1. But, OS signals should have $? > 1. This makes it easy to predicate on both signals and failed tests.
Description
I run
gotestsum
in a loop in a bash script. In order to detect SIGINT in the bash script I have to inspect the exit code ofgotestsum
(I think). However,<ctrl-c>
during test processing triggers an exit code of 1.The same exit code happens if tests fail.
So, I can't terminate my testing loop based on SIGINT - checking if
$? = 1
will treat failed tests the same way as SIGINT.I recommend having failed tests keep
$? = 1
. But, OS signals should have$? > 1
. This makes it easy to predicate on both signals and failed tests.Update
I've submitted #210 to address this.
The text was updated successfully, but these errors were encountered: