diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2024-11-18 18:33:04 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2024-11-18 18:33:04 +0100 |
commit | b3c47026b79d0d9ce46bb1f1dbb4f7c6b652e758 (patch) | |
tree | 71c417b006823b66c76686047ba467754b3f74c4 /bxgen.c | |
parent | 9f76068c92040586262cb2d971083c8c191f81e0 (diff) | |
download | bxgen-b3c47026b79d0d9ce46bb1f1dbb4f7c6b652e758.zip |
Always delete test files
Diffstat (limited to 'bxgen.c')
-rwxr-xr-x | bxgen.c | 28 |
1 files changed, 18 insertions, 10 deletions
@@ -4357,6 +4357,8 @@ b8 link_with_libc(void) { // ============================================================ + b8 success = 1; + if (HOST_OS != OS_Linux) { LOG(INFO, "Skip running the executable. Host system is not compatible."); } else if (HO != LE) { @@ -4372,10 +4374,12 @@ b8 link_with_libc(void) { ret = system("./test_foo >/dev/null"); if (WEXITSTATUS(ret) != 42) - return 0; + success = 0; } - return 1; + system("rm test_foo"); + + return success; } b8 two_plus_two(void) { @@ -4390,6 +4394,8 @@ b8 two_plus_two(void) { u_elf_x86_64(u, "test_two_plus_two"); + b8 success = 1; + if (HOST_OS != OS_Linux) { LOG(INFO, "Skip running the executable. Host system is not compatible."); } else if (HO != LE) { @@ -4405,12 +4411,12 @@ b8 two_plus_two(void) { ret = system("./test_two_plus_two >/dev/null"); if (WEXITSTATUS(ret) != 4) - return 0; - - system("rm test_two_plus_two"); + success = 0; } - return 1; + system("rm test_two_plus_two"); + + return success; } b8 sixty_nine(void) { @@ -4425,6 +4431,8 @@ b8 sixty_nine(void) { u_elf_x86_64(u, "test_sixty_nine"); + b8 success = 1; + if (HOST_OS != OS_Linux) { LOG(INFO, "Skip running the executable. Host system is not compatible."); } else if (HO != LE) { @@ -4440,12 +4448,12 @@ b8 sixty_nine(void) { ret = system("./test_sixty_nine >/dev/null"); if (WEXITSTATUS(ret) != 69) - return 0; - - system("rm test_sixty_nine"); + success = 0; } - return 1; + system("rm test_sixty_nine"); + + return success; } #endif // HELPERS |