From 9f76068c92040586262cb2d971083c8c191f81e0 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Mon, 18 Nov 2024 18:29:54 +0100 Subject: Log level in tests --- bxgen.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/bxgen.c b/bxgen.c index 73626ab..865a483 100755 --- a/bxgen.c +++ b/bxgen.c @@ -4364,7 +4364,12 @@ b8 link_with_libc(void) { } else { LOG(VERBOSE, "Running the executable"); - i32 ret = system("./test_foo"); + i32 ret; + + if (LOG_LEVEL >= VERBOSE) + ret = system("./test_foo"); + else + ret = system("./test_foo >/dev/null"); if (WEXITSTATUS(ret) != 42) return 0; @@ -4392,7 +4397,12 @@ b8 two_plus_two(void) { } else { LOG(VERBOSE, "Running the executable"); - i32 ret = system("./test_two_plus_two"); + i32 ret; + + if (LOG_LEVEL >= VERBOSE) + ret = system("./test_two_plus_two"); + else + ret = system("./test_two_plus_two >/dev/null"); if (WEXITSTATUS(ret) != 4) return 0; @@ -4422,7 +4432,12 @@ b8 sixty_nine(void) { } else { LOG(VERBOSE, "Running the executable"); - i32 ret = system("./test_sixty_nine"); + i32 ret; + + if (LOG_LEVEL >= VERBOSE) + ret = system("./test_sixty_nine"); + else + ret = system("./test_sixty_nine >/dev/null"); if (WEXITSTATUS(ret) != 69) return 0; -- cgit v1.2.3