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' | ...@@ -26,7 +26,7 @@ cat $FILES | grep '^void Test' |
echo \ echo \
' '
void RunAllTests(void) int RunAllTests(void)
{ {
CuString *output = CuStringNew(); CuString *output = CuStringNew();
CuSuite* suite = CuSuiteNew(); CuSuite* suite = CuSuiteNew();
...@@ -43,11 +43,11 @@ echo \ ...@@ -43,11 +43,11 @@ echo \
CuSuiteRun(suite); CuSuiteRun(suite);
CuSuiteDetails(suite, output); CuSuiteDetails(suite, output);
printf("%s\\n", output->buffer); printf("%s\\n", output->buffer);
return suite->failCount == 0 ? 0 : 1;
} }
int main() int main()
{ {
RunAllTests(); return RunAllTests();
return 0;
} }
' '
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