summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGravatar Karl Ramm <kcr@1ts.org>2009-08-01 19:55:13 +0000
committerGravatar Karl Ramm <kcr@1ts.org>2009-08-01 19:55:13 +0000
commit58477d8b58231a3ffb594aeb19bb616378b0701f (patch)
treedbe2ebd4dc180f6d6d5645e5f34eade9d5ea0f7e /lib
parenteba1571011734123dc5b77c0958903bf9ac07027 (diff)
More explicitly print the test results, and exit 1 if there was a failure
so that make check will fail.
Diffstat (limited to 'lib')
-rwxr-xr-xlib/zephyr_run_doctests10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/zephyr_run_doctests b/lib/zephyr_run_doctests
index 03e111b..6bcb2cb 100755
--- a/lib/zephyr_run_doctests
+++ b/lib/zephyr_run_doctests
@@ -1,6 +1,12 @@
#!/usr/bin/python
-import doctest
+import sys, doctest
+
+failures, tests = doctest.testfile("zephyr_tests.txt")
+
+print failures, 'failures out of', tests, 'tests.'
+if failures:
+ sys.exit(1)
+
-print doctest.testfile("zephyr_tests.txt")