Skip to content

Commit

Permalink
fix: CTest always reports success even when there are failed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomghuang committed Nov 24, 2019
1 parent 71550cf commit fef63d8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/testall.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ CuSuite* get_argcmd_testsuite();
CuSuite* get_arghashtable_testsuite();
#endif

void RunAllTests(void) {
int RunAllTests(void) {
CuString* output = CuStringNew();
CuSuite* suite = CuSuiteNew();

Expand All @@ -67,9 +67,10 @@ void RunAllTests(void) {
CuSuiteSummary(suite, output);
CuSuiteDetails(suite, output);
printf("%s\n", output->buffer);

return suite->failCount;
}

int main(void) {
RunAllTests();
return 0;
return RunAllTests();
}

0 comments on commit fef63d8

Please sign in to comment.