toolchains = (getattr(TARGET_MAP[target_name], 'default_toolchain', 'ARM'),) else: toolchains = toolchain_list if options.toolchains: print "Only building using the following toolchains: %s" % (options.toolchains) toolchainSet = set(toolchains) toolchains = toolchainSet.intersection(set((options.toolchains).split(','))) for toolchain in toolchains: id = "%s::%s" % (target_name, toolchain) try: built_mbed_lib = build_mbed_libs(TARGET_MAP[target_name], toolchain, verbose=options.verbose, jobs=options.jobs, report=build_report, properties=build_properties) except Exception, e: print str(e) # Write summary of the builds if options.report_build_file_name: file_report_exporter = ReportExporter(ResultExporterType.JUNIT, package="build") file_report_exporter.report_to_file(build_report, options.report_build_file_name, test_suite_properties=build_properties) print "\n\nCompleted in: (%.2f)s" % (time() - start) print_report_exporter = ReportExporter(ResultExporterType.PRINT, package="build") status = print_report_exporter.report(build_report) if not status: sys.exit(1)
'auto-detected' if opts.auto_detect else opts.test_spec_filename) if test_spec: print print_test_configuration_from_json(test_spec) exit(0) if get_module_avail('mbed_lstools'): if opts.operability_checks: # Check if test scope is valid and run tests test_scope = get_available_oper_test_scopes() if opts.operability_checks in test_scope: tests = IOperTestRunner(scope=opts.operability_checks) test_results = tests.run() # Export results in form of JUnit XML report to separate file if opts.report_junit_file_name: report_exporter = ReportExporter( ResultExporterType.JUNIT_OPER) report_exporter.report_to_file(test_results, opts.report_junit_file_name) else: print "Unknown interoperability test scope name: '%s'" % ( opts.operability_checks) print "Available test scopes: %s" % (','.join( ["'%s'" % n for n in test_scope])) exit(0) # Verbose test specification and MUTs configuration if MUTs and opts.verbose: print print_muts_configuration_from_json(MUTs) if test_spec and opts.verbose: print print_test_configuration_from_json(test_spec)
try: built_mbed_lib = build_mbed_libs( TARGET_MAP[target_name], toolchain, verbose=options.verbose, jobs=options.jobs, report=build_report, properties=build_properties) except Exception, e: print str(e) # Write summary of the builds if options.report_build_file_name: file_report_exporter = ReportExporter(ResultExporterType.JUNIT, package="build") file_report_exporter.report_to_file( build_report, options.report_build_file_name, test_suite_properties=build_properties) print "\n\nCompleted in: (%.2f)s" % (time() - start) print_report_exporter = ReportExporter(ResultExporterType.PRINT, package="build") status = print_report_exporter.report(build_report) if not status: sys.exit(1)
print "Test specification in %s:" % ('auto-detected' if opts.auto_detect else opts.test_spec_filename) if test_spec: print print_test_configuration_from_json(test_spec) exit(0) if get_module_avail('mbed_lstools'): if opts.operability_checks: # Check if test scope is valid and run tests test_scope = get_available_oper_test_scopes() if opts.operability_checks in test_scope: tests = IOperTestRunner(scope=opts.operability_checks) test_results = tests.run() # Export results in form of JUnit XML report to separate file if opts.report_junit_file_name: report_exporter = ReportExporter(ResultExporterType.JUNIT_OPER) report_exporter.report_to_file(test_results, opts.report_junit_file_name) else: print "Unknown interoperability test scope name: '%s'" % (opts.operability_checks) print "Available test scopes: %s" % (','.join(["'%s'" % n for n in test_scope])) exit(0) # Verbose test specification and MUTs configuration if MUTs and opts.verbose: print print_muts_configuration_from_json(MUTs) if test_spec and opts.verbose: print print_test_configuration_from_json(test_spec) if opts.only_build_tests: # We are skipping testing phase, and suppress summary