Skip to content

Commit

Permalink
Merge pull request #130 from dbungert/testrun-exit-1
Browse files Browse the repository at this point in the history
Fail testrun on test failure
  • Loading branch information
ndevilla authored Mar 16, 2021
2 parents f858275 + b7a2c29 commit 444303f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions test/make-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ cat $FILES | grep '^void Test' |
echo \
'
void RunAllTests(void)
int RunAllTests(void)
{
CuString *output = CuStringNew();
CuSuite* suite = CuSuiteNew();
int ret = 0;
'
cat $FILES | grep '^void Test' |
Expand All @@ -42,15 +43,16 @@ echo \
'
CuSuiteRun(suite);
CuSuiteSummary(suite, output);
if (suite->failCount > 0) ret = 1;
CuSuiteDetails(suite, output);
printf("%s\n", output->buffer);
CuStringDelete(output);
CuSuiteDelete(suite);
return ret;
}
int main(void)
{
RunAllTests();
return 0;
return RunAllTests();
}
'

0 comments on commit 444303f

Please sign in to comment.