fix: add return code to tests
This commit is contained in:
parent
a1b9ef6022
commit
2eda6ec549
|
@ -258,7 +258,8 @@ def run_tests():
|
|||
directory.
|
||||
'''
|
||||
compile_executable(Compilation_Mode.Test)
|
||||
subprocess.call([get_target_name(Compilation_Mode.Test)])
|
||||
return_code = subprocess.call([get_target_name(Compilation_Mode.Test)])
|
||||
exit(return_code)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
@ -22,7 +22,7 @@ main (const int argc, const char *const argv[])
|
|||
t_run (test_add);
|
||||
t_end_tests ();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
t_exit ();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define TEST_H_
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "common.h"
|
||||
#include "log.h"
|
||||
|
||||
|
@ -53,4 +54,9 @@ typedef struct {
|
|||
} \
|
||||
} while (0)
|
||||
|
||||
#define t_exit() \
|
||||
do { \
|
||||
exit (__test_results.failure == 0u ? EXIT_SUCCESS : EXIT_FAILURE); \
|
||||
} while (0)
|
||||
|
||||
#endif // TEST_H_
|
||||
|
|
Loading…
Reference in New Issue