From f71219e97a50fb0e3d7110f7706f48994bb0eacd Mon Sep 17 00:00:00 2001 From: dzwdz Date: Sun, 4 Sep 2022 12:28:20 +0200 Subject: user/tests: make all tests automatic --- src/user/app/tests/tests.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/user/app/tests/tests.h') 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(); -- cgit v1.2.3