projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b710700
)
Indicate test failure with an exit code.
author
Zac Medico
<zmedico@gentoo.org>
Fri, 8 Dec 2006 18:34:56 +0000
(18:34 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 8 Dec 2006 18:34:56 +0000
(18:34 -0000)
svn path=/main/trunk/; revision=5227
tests/__init__.py
patch
|
blob
|
history
tests/runTests
patch
|
blob
|
history
diff --git
a/tests/__init__.py
b/tests/__init__.py
index 1a235ff26f6bd174473e72f4a1b0901be84063f7..6acf0c99f6addf4ae89ce0666fed7751ce7426de 100644
(file)
--- a/
tests/__init__.py
+++ b/
tests/__init__.py
@@
-18,4
+18,4
@@
def main():
except ImportError:
pass
- unittest.TextTestRunner(verbosity=2).run(suite)
+ return unittest.TextTestRunner(verbosity=2).run(suite)
diff --git
a/tests/runTests
b/tests/runTests
index 74b853f0972bf71e0501913882738bd0d494410f..fed58f75db8a88f17c4f15f4a93bb1461b4d87d9 100755
(executable)
--- a/
tests/runTests
+++ b/
tests/runTests
@@
-16,5
+16,7
@@
sys.path.insert(0,'../pym')
sys.path.insert(0, osp.dirname(osp.dirname(osp.abspath(__file__))))
import tests
-
-tests.main()
+if __name__ == "__main__":
+ result = tests.main()
+ if result.failures:
+ sys.exit(1)