summaryrefslogtreecommitdiff
path: root/pactest/pactest.py
diff options
context:
space:
mode:
Diffstat (limited to 'pactest/pactest.py')
-rwxr-xr-xpactest/pactest.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/pactest/pactest.py b/pactest/pactest.py
index 7cda2556..f95ef3c1 100755
--- a/pactest/pactest.py
+++ b/pactest/pactest.py
@@ -93,13 +93,18 @@ if __name__ == "__main__":
env.pacman["valgrind"] = opts.valgrind
env.pacman["manual-confirm"] = opts.manualconfirm
- if len(opts.testcases) == 0:
+ if opts.testcases is None or len(opts.testcases) == 0:
print "no tests defined, nothing to do"
+ sys.exit(2)
else:
- for i in opts.testcases: env.addtest(i)
+ for i in opts.testcases:
+ env.addtest(i)
# run tests and print overall results
env.run()
env.results()
+ if env.failed > 0:
+ sys.exit(1)
+
# vim: set ts=4 sw=4 et: