Skip to content
Browse files

exit with number of failures.

  • Loading branch information...
1 parent b1fcd21 commit 5bef77681231a71b5b3be388ef92d8ebfd845047 Matthew Hooker committed Dec 1, 2011
Showing with 5 additions and 2 deletions.
  1. +4 −1 awscompat/runner.py
  2. +1 −1 run_tests.py
View
5 awscompat/runner.py
@@ -139,10 +139,11 @@ def post_error(self, obj):
self.errors.append((obj, 'post'))
def flush_messages(self):
- """log errors & failures. flush messages."""
+ """log errors & failures. flush messages. Return number of failures"""
if not len(self.failures) and not len(self.errors):
log.info('OK')
+ return 0
if len(self.errors):
for err in self.errors:
@@ -152,4 +153,6 @@ def flush_messages(self):
if len(self.failures):
log.info("failures: %d" % len(self.failures))
+ failures = len(self.failures)
self.failures = []
+ return failures
View
2 run_tests.py
@@ -91,4 +91,4 @@ def build_connection(config, connect):
classes = collector.collect(test_dir, include_modules=args.modules)
runner = runner.Runner(classes)
runner.run()
-runner.flush_messages()
+sys.exit(runner.flush_messages())

0 comments on commit 5bef776

Please sign in to comment.
Something went wrong with that request. Please try again.