summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMitya Selivanov <automainint@guattari.tech>2024-11-18 18:29:54 +0100
committerMitya Selivanov <automainint@guattari.tech>2024-11-18 18:29:54 +0100
commit9f76068c92040586262cb2d971083c8c191f81e0 (patch)
tree9ec45560fa9b9f47bf12ab1edba6579467d49b09
parentbe3fe98ff01124b41d72c6e3adcac01de38be04b (diff)
downloadbxgen-9f76068c92040586262cb2d971083c8c191f81e0.zip
Log level in tests
-rwxr-xr-xbxgen.c21
1 files 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;