Commit ae95c525 authored by Jérome Perrin's avatar Jérome Perrin

exit with 1 code if it fails, 0 if it succeeds.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5544 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ee38c87f
......@@ -111,7 +111,7 @@ def runUnitTestList(test_list) :
if (type(attr) == type(type)) and (hasattr(attr, '__module__')) and (attr.__module__ == test) :
suite.addTest(unittest.makeSuite(attr))
TestRunner().run(suite)
return TestRunner().run(suite)
if __name__ == '__main__' :
test_list = sys.argv[1:]
......@@ -119,4 +119,6 @@ if __name__ == '__main__' :
print "No test to run, exiting immediately."
print "Usage : %s UnitTest1 UnitTest2 ..." % sys.argv[0]
sys.exit(1)
runUnitTestList(test_list=test_list)
result = runUnitTestList(test_list=test_list)
if len(result.failures) or len(result.errors) :
sys.exit(1)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment