diff options
author | dzwdz | 2022-09-04 12:28:20 +0200 |
---|---|---|
committer | dzwdz | 2022-09-04 12:31:29 +0200 |
commit | f71219e97a50fb0e3d7110f7706f48994bb0eacd (patch) | |
tree | f1bd99afe1af96d5248662ad58340dbd134b654a /src/user/app/tests/tests.h | |
parent | a96c69e45428a13b0e16a4fc332694e9f791b24d (diff) |
user/tests: make all tests automatic
Diffstat (limited to 'src/user/app/tests/tests.h')
-rw-r--r-- | src/user/app/tests/tests.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/user/app/tests/tests.h b/src/user/app/tests/tests.h index 63dd940..248303d 100644 --- a/src/user/app/tests/tests.h +++ b/src/user/app/tests/tests.h @@ -18,9 +18,14 @@ void r_libc_string(void); void r_s_printf(void); void r_s_ringbuf(void); +extern FILE *fail_trig; + +int forkpipe(FILE **f, handle_t *h); + #define argify(str) str, sizeof(str) - 1 #define test_fail() do { \ - printf("\033[31m" "TEST FAILED: %s():%u\n" "\033[0m", __func__, __LINE__); \ + fprintf(fail_trig, "%s():%u", __func__, __LINE__); \ + fflush(fail_trig); \ exit(0); \ } while (0) #define test(cond) if (!(cond)) test_fail(); |