Before it was just hardcoded to exit(0) after all test suite
runs. This breaks unix conventions and CI conventions that expect
system commands to exit with a non-zero status if they fail.
This switches to checking the fails + errors count returned from
the runner and if that count is not zero, exit(1). I chose to
always exit with 1 instead of e.g. the fails plus errors count
b/c POSIX exit status are 32-bit and cap out at 255.
I also chose to add SUCCESS_EXIT_STATUS and ERROR_EXIT_STATUS
constants to remove the "magic integer" code smell.
Before it was just hardcoded to
exit(0)
after all test suite runs. This breaks unix conventions and CI conventions that expect system commands to exit with a non-zero status if they fail.This switches to checking the fails + errors count returned from the runner and if that count is not zero,
exit(1)
. I chose to always exit with1
instead of e.g. the fails plus errors count b/c POSIX exit status are 32-bit and cap out at255
.I also chose to add
SUCCESS_EXIT_STATUS
andERROR_EXIT_STATUS
constants to remove the "magic integer" code smell.