diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-11-18 18:29:54 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-11-18 18:29:54 +0100 |
commit | 9f76068c92040586262cb2d971083c8c191f81e0 (patch) | |
tree | 9ec45560fa9b9f47bf12ab1edba6579467d49b09 | |
parent | be3fe98ff01124b41d72c6e3adcac01de38be04b (diff) | |
download | bxgen-9f76068c92040586262cb2d971083c8c191f81e0.zip |
Log level in tests
-rwxr-xr-x | bxgen.c | 21 |
1 files changed, 18 insertions, 3 deletions
@@ -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; |