Changes in uspace/lib/pcut/src/report/tap.c [4b54bd9:098e16a5] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/src/report/tap.c
r4b54bd9 r098e16a5 35 35 #include "report.h" 36 36 37 #ifndef __helenos__ 37 #ifdef __helenos__ 38 #define _REALLY_WANT_STRING_H 39 #endif 40 38 41 #pragma warning(push, 0) 39 42 #include <string.h> 40 #pragma warning(pop)41 #endif42 43 #pragma warning(push, 0)44 43 #include <stdio.h> 45 44 #pragma warning(pop) … … 57 56 /** Counter of failed tests in current suite. */ 58 57 static int failed_tests_in_suite; 58 59 /** Comma-separated list of failed test names. */ 60 static char *failed_test_names; 59 61 60 62 /** Initialize the TAP output. … … 170 172 171 173 print_by_lines(extra_output, "# stdio: "); 174 175 if (outcome != PCUT_OUTCOME_PASS) { 176 if (failed_test_names == NULL) { 177 failed_test_names = strdup(test_name); 178 } else { 179 char *fs = NULL; 180 if (asprintf(&fs, "%s, %s", 181 failed_test_names, test_name) >= 0) { 182 free(failed_test_names); 183 failed_test_names = fs; 184 } 185 } 186 } 172 187 } 173 188 … … 178 193 } else { 179 194 printf("#> Done: %d of %d tests failed.\n", failed_test_counter, test_counter); 195 printf("#> Failed tests: %s\n", failed_test_names); 180 196 } 181 197 }
Note:
See TracChangeset
for help on using the changeset viewer.