Less verbose output unless the -v option is used.

Also display a test summary at the end.
This commit is contained in:
Todd C. Miller
2022-03-01 16:09:32 -07:00
parent 2c329dbe42
commit dda14cb57a
2 changed files with 26 additions and 4 deletions

View File

@@ -62,7 +62,10 @@ char ** create_str_array(size_t count, ...);
#define RUN_TEST(testcase) \
do { \
int success = 1; \
printf("Running test " #testcase " ... \n"); \
ntests++; \
if (verbose) { \
printf("Running test " #testcase " ... \n"); \
} \
if (!init()) { \
printf("FAILED: initialization of testcase %s at %s:%d\n", #testcase, __FILE__, __LINE__); \
success = 0; \