diff options
author | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-05-29 10:03:39 -0700 |
---|---|---|
committer | Pieter Noordhuis <pcnoordhuis@gmail.com> | 2011-05-29 10:03:39 -0700 |
commit | 7a8de1fe25dda6187d68ec6570a831394cb127d1 (patch) | |
tree | 32546bffb69b6069af7ed3547fa6c058bb8d9ade /test.c | |
parent | 1c29aafd4701b92cd743a1635af640f1f3330689 (diff) |
Exit with a non-zero status when tests failed
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -704,10 +704,11 @@ int main(int argc, char **argv) { test_blocking_io_errors(cfg); test_throughput(cfg); - if (fails == 0) { - printf("ALL TESTS PASSED\n"); - } else { + if (fails) { printf("*** %d TESTS FAILED ***\n", fails); + return 1; } + + printf("ALL TESTS PASSED\n"); return 0; } |