diff options
author | Karl Ramm <kcr@1ts.org> | 2009-08-01 19:55:13 +0000 |
---|---|---|
committer | Karl Ramm <kcr@1ts.org> | 2009-08-01 19:55:13 +0000 |
commit | 58477d8b58231a3ffb594aeb19bb616378b0701f (patch) | |
tree | dbe2ebd4dc180f6d6d5645e5f34eade9d5ea0f7e /lib | |
parent | eba1571011734123dc5b77c0958903bf9ac07027 (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-x | lib/zephyr_run_doctests | 10 |
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") |