summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorYusuke Suzuki <utatane.tea@gmail.com>2014-03-03 03:32:26 +0900
committerYusuke Suzuki <utatane.tea@gmail.com>2014-03-03 03:32:26 +0900
commitd83a16f46cbc504028a2ccae8cd26bca1dd84f64 (patch)
tree60ce8aef2830363e59b397ea02a0698997fe7259 /tools
parent9b669da66c78bd583bc130a7ca3151258e4681a1 (diff)
downloadqtdeclarative-testsuites-d83a16f46cbc504028a2ccae8cd26bca1dd84f64.tar.gz
Propagate error code when test cases are failed
Diffstat (limited to 'tools')
-rwxr-xr-xtools/packaging/test262.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/tools/packaging/test262.py b/tools/packaging/test262.py
index f9c1fe628..eaeb3f261 100755
--- a/tools/packaging/test262.py
+++ b/tools/packaging/test262.py
@@ -503,6 +503,7 @@ class TestSuite(object):
print
print "Use --full-summary to see output from failed tests"
print
+ return progress.failed
def WriteLog(self, result):
name = result.case.GetName()
@@ -530,6 +531,7 @@ class TestSuite(object):
cases[0].Print()
def Main():
+ code = 0
parser = BuildOptions()
(options, args) = parser.parse_args()
ValidateOptions(options)
@@ -551,16 +553,17 @@ def Main():
if options.cat:
test_suite.Print(args)
else:
- test_suite.Run(options.command, args,
- options.summary or options.full_summary,
- options.full_summary,
- options.logname,
- options.junitname)
+ code = test_suite.Run(options.command, args,
+ options.summary or options.full_summary,
+ options.full_summary,
+ options.logname,
+ options.junitname)
+ return code
if __name__ == '__main__':
try:
- Main()
- sys.exit(0)
+ code = Main()
+ sys.exit(code)
except Test262Error, e:
print "Error: %s" % e.message
sys.exit(1)