mirror of https://github.com/ARMmbed/mbed-os.git
Fixing traceback when listing tests
parent
653832e94b
commit
9e012bb2c2
|
@ -112,6 +112,7 @@ if __name__ == '__main__':
|
||||||
if options.list:
|
if options.list:
|
||||||
# Print available tests in order and exit
|
# Print available tests in order and exit
|
||||||
print_tests(tests, options.format)
|
print_tests(tests, options.format)
|
||||||
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
# Build all tests
|
# Build all tests
|
||||||
if not options.build_dir:
|
if not options.build_dir:
|
||||||
|
@ -146,7 +147,6 @@ if __name__ == '__main__':
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
library_build_success = False
|
library_build_success = False
|
||||||
print "Failed to build library"
|
print "Failed to build library"
|
||||||
print e
|
|
||||||
|
|
||||||
if library_build_success:
|
if library_build_success:
|
||||||
# Build all the tests
|
# Build all the tests
|
||||||
|
@ -158,9 +158,6 @@ if __name__ == '__main__':
|
||||||
macros=options.macros,
|
macros=options.macros,
|
||||||
verbose=options.verbose,
|
verbose=options.verbose,
|
||||||
jobs=options.jobs)
|
jobs=options.jobs)
|
||||||
|
|
||||||
if not test_build_success:
|
|
||||||
print "Failed to build some tests, check build log for details"
|
|
||||||
|
|
||||||
# If a path to a test spec is provided, write it to a file
|
# If a path to a test spec is provided, write it to a file
|
||||||
if options.test_spec:
|
if options.test_spec:
|
||||||
|
@ -181,13 +178,13 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# If a path to a JUnit build report spec is provided, write it to a file
|
# If a path to a JUnit build report spec is provided, write it to a file
|
||||||
if options.build_report_junit:
|
if options.build_report_junit:
|
||||||
report_exporter = ReportExporter(ResultExporterType.JUNIT)
|
report_exporter = ReportExporter(ResultExporterType.JUNIT, package="build")
|
||||||
report_exporter.report_to_file(build_report, options.build_report_junit, test_suite_properties=build_properties)
|
report_exporter.report_to_file(build_report, options.build_report_junit, test_suite_properties=build_properties)
|
||||||
|
|
||||||
if library_build_success and test_build_success:
|
if library_build_success and test_build_success:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
else:
|
else:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
except KeyboardInterrupt, e:
|
except KeyboardInterrupt, e:
|
||||||
print "\n[CTRL+c] exit"
|
print "\n[CTRL+c] exit"
|
||||||
|
|
Loading…
Reference in New Issue