Commit 72d872db authored by Free Ekanayaka's avatar Free Ekanayaka
Browse files

Make tests_main exit non-zero if any test fails

The make-tests.sh script has been modified so that the test program exists
non-zero in case of failures.
parent 0e755635
......@@ -26,7 +26,7 @@ cat $FILES | grep '^void Test' |
echo \
'
void RunAllTests(void)
int RunAllTests(void)
{
CuString *output = CuStringNew();
CuSuite* suite = CuSuiteNew();
......@@ -43,11 +43,11 @@ echo \
CuSuiteRun(suite);
CuSuiteDetails(suite, output);
printf("%s\\n", output->buffer);
return suite->failCount == 0 ? 0 : 1;
}
int main()
{
RunAllTests();
return 0;
return RunAllTests();
}
'
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment