Skip to content

Commit

Permalink
CxxTestMain: return a non-zero exit status if there are failed tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
FooBarWidget committed Mar 14, 2009
1 parent 113bf45 commit 6839691
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/CxxTestMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ int main() {
setenv("TESTING_PASSENGER", "1", 1);
try {
tut::runner.get().run_tests();
if (reporter.all_ok()) {
return 0;
} else {
return 1;
}
} catch (const std::exception &ex) {
std::cerr << "Exception raised: " << ex.what() << std::endl;
return 1;
return 2;
}
return 0;
}

0 comments on commit 6839691

Please sign in to comment.