mirror of https://github.com/ARMmbed/mbed-os.git
Removed mbed-ls dependency from test framework
parent
35cfd8ec82
commit
b5191580fd
|
@ -74,15 +74,14 @@ from workspace_tools.test_api import print_test_configuration_from_json
|
||||||
from workspace_tools.test_api import get_autodetected_MUTS
|
from workspace_tools.test_api import get_autodetected_MUTS
|
||||||
from workspace_tools.test_api import get_autodetected_TEST_SPEC
|
from workspace_tools.test_api import get_autodetected_TEST_SPEC
|
||||||
from workspace_tools.test_api import get_module_avail
|
from workspace_tools.test_api import get_module_avail
|
||||||
|
|
||||||
from workspace_tools.compliance.ioper_runner import IOperTestRunner
|
|
||||||
from workspace_tools.compliance.ioper_runner import get_available_oper_test_scopes
|
|
||||||
from workspace_tools.test_exporters import ReportExporter, ResultExporterType
|
from workspace_tools.test_exporters import ReportExporter, ResultExporterType
|
||||||
|
|
||||||
|
|
||||||
# Importing extra modules which can be not installed but if available they can extend test suite functionality
|
# Importing extra modules which can be not installed but if available they can extend test suite functionality
|
||||||
try:
|
try:
|
||||||
import mbed_lstools
|
import mbed_lstools
|
||||||
|
from workspace_tools.compliance.ioper_runner import IOperTestRunner
|
||||||
|
from workspace_tools.compliance.ioper_runner import get_available_oper_test_scopes
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -196,22 +195,23 @@ if __name__ == '__main__':
|
||||||
print print_test_configuration_from_json(test_spec)
|
print print_test_configuration_from_json(test_spec)
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
if opts.operability_checks:
|
if get_module_avail('mbed_lstools'):
|
||||||
# Check if test scope is valid and run tests
|
if opts.operability_checks:
|
||||||
test_scope = get_available_oper_test_scopes()
|
# Check if test scope is valid and run tests
|
||||||
if opts.operability_checks in test_scope:
|
test_scope = get_available_oper_test_scopes()
|
||||||
tests = IOperTestRunner(scope=opts.operability_checks)
|
if opts.operability_checks in test_scope:
|
||||||
test_results = tests.run()
|
tests = IOperTestRunner(scope=opts.operability_checks)
|
||||||
|
test_results = tests.run()
|
||||||
|
|
||||||
# Export results in form of JUnit XML report to separate file
|
# Export results in form of JUnit XML report to separate file
|
||||||
if opts.report_junit_file_name:
|
if opts.report_junit_file_name:
|
||||||
report_exporter = ReportExporter(ResultExporterType.JUNIT_OPER)
|
report_exporter = ReportExporter(ResultExporterType.JUNIT_OPER)
|
||||||
report_exporter.report_to_file(test_results, opts.report_junit_file_name)
|
report_exporter.report_to_file(test_results, opts.report_junit_file_name)
|
||||||
else:
|
else:
|
||||||
print "Unknown interoperability test scope name: '%s'" % (opts.operability_checks)
|
print "Unknown interoperability test scope name: '%s'" % (opts.operability_checks)
|
||||||
print "Available test scopes: %s" % (','.join(["'%s'" % n for n in test_scope]))
|
print "Available test scopes: %s" % (','.join(["'%s'" % n for n in test_scope]))
|
||||||
|
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|
||||||
# Verbose test specification and MUTs configuration
|
# Verbose test specification and MUTs configuration
|
||||||
if MUTs and opts.verbose:
|
if MUTs and opts.verbose:
|
||||||
|
|
|
@ -53,13 +53,12 @@ from workspace_tools.build_api import print_build_results
|
||||||
from workspace_tools.libraries import LIBRARIES, LIBRARY_MAP
|
from workspace_tools.libraries import LIBRARIES, LIBRARY_MAP
|
||||||
from workspace_tools.toolchains import TOOLCHAIN_BIN_PATH
|
from workspace_tools.toolchains import TOOLCHAIN_BIN_PATH
|
||||||
from workspace_tools.test_exporters import ReportExporter, ResultExporterType
|
from workspace_tools.test_exporters import ReportExporter, ResultExporterType
|
||||||
from workspace_tools.compliance.ioper_runner import get_available_oper_test_scopes
|
|
||||||
|
|
||||||
|
|
||||||
import workspace_tools.host_tests.host_tests_plugins as host_tests_plugins
|
import workspace_tools.host_tests.host_tests_plugins as host_tests_plugins
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import mbed_lstools
|
import mbed_lstools
|
||||||
|
from workspace_tools.compliance.ioper_runner import get_available_oper_test_scopes
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue