# Path: workspace_tools/test_exporters.py
# class ReportExporter():
#     CSS_STYLE = """<style>
#                    .name{
#                     border: 1px solid;
#                     border-radius: 25px;
#                     width: 100px;
#                    }
#                    .tooltip{
#                        position:absolute;
#                        background-color: #F5DA81;
#                        display:none;
#                    }
#                    </style>
#                 """
#     JAVASCRIPT = """
#                  <script type="text/javascript">
#                  function show (elem) {
#                      elem.style.display = "block";
#                  }
#                  function hide (elem) {
#                      elem.style.display = "";
#                  }
#                  </script>
#                  """
#         RESULT_COLORS = {'OK': 'LimeGreen',
#                          'FAIL': 'Orange',
#                          'ERROR': 'LightCoral',
#                          'OTHER': 'LightGray',
#                         }
#     def __init__(self, result_exporter_type):
#     def report(self, test_summary_ext, test_suite_properties=None):
#     def report_to_file(self, test_summary_ext, file_name, test_suite_properties=None):
#     def write_to_file(self, report, file_name):
#     def get_tooltip_name(self, toolchain, target, test_id, loop_no):
#     def get_result_div_sections(self, test, test_no):
#     def get_result_tree(self, test_results):
#     def get_all_unique_test_ids(self, test_result_ext):
#     def exporter_html(self, test_result_ext, test_suite_properties=None):
#     def exporter_junit_ioper(self, test_result_ext, test_suite_properties=None):
#     def exporter_junit(self, test_result_ext, test_suite_properties=None):


import sys
    import mbed_lstools
from os.path import join, abspath, dirname
from workspace_tools.utils import check_required_modules
from workspace_tools.build_api import mcu_toolchain_matrix
from workspace_tools.test_api import SingleTestRunner
from workspace_tools.test_api import singletest_in_cli_mode
from workspace_tools.test_api import detect_database_verbose
from workspace_tools.test_api import get_json_data_from_file
from workspace_tools.test_api import get_avail_tests_summary_table
from workspace_tools.test_api import get_default_test_options_parser
from workspace_tools.test_api import print_muts_configuration_from_json
from workspace_tools.test_api import print_test_configuration_from_json
from workspace_tools.test_api import get_autodetected_MUTS_list
from workspace_tools.test_api import get_autodetected_TEST_SPEC
from workspace_tools.test_api import get_module_avail
from workspace_tools.test_exporters import ReportExporter, ResultExporterType
    from workspace_tools.compliance.ioper_runner import IOperTestRunner
    from workspace_tools.compliance.ioper_runner import get_available_oper_test_scopes
            exit(-1)

        # Get extra MUTs if applicable
        MUTs = get_json_data_from_file(opts.muts_spec_filename) if opts.muts_spec_filename else None

        if MUTs is None:
            if not opts.muts_spec_filename:
                parser.print_help()
            exit(-1)

    if opts.verbose_test_configuration_only:
        print "MUTs configuration in %s:" % ('auto-detected' if opts.auto_detect else opts.muts_spec_filename)
        if MUTs:
            print print_muts_configuration_from_json(MUTs, platform_filter=opts.general_filter_regex)
        print
        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:

# Path: workspace_tools/test_exporters.py
# class ReportExporter():
#     CSS_STYLE = """<style>
#                    .name{
#                     border: 1px solid;
#                     border-radius: 25px;
#                     width: 100px;
#                    }
#                    .tooltip{
#                        position:absolute;
#                        background-color: #F5DA81;
#                        display:none;
#                    }
#                    </style>
#                 """
#     JAVASCRIPT = """
#                  <script type="text/javascript">
#                  function show (elem) {
#                      elem.style.display = "block";
#                  }
#                  function hide (elem) {
#                      elem.style.display = "";
#                  }
#                  </script>
#                  """
#         RESULT_COLORS = {'OK': 'LimeGreen',
#                          'FAIL': 'Orange',
#                          'ERROR': 'LightCoral',
#                          'OTHER': 'LightGray',
#                         }
#     def __init__(self, result_exporter_type):
#     def report(self, test_summary_ext, test_suite_properties=None):
#     def report_to_file(self, test_summary_ext, file_name, test_suite_properties=None):
#     def write_to_file(self, report, file_name):
#     def get_tooltip_name(self, toolchain, target, test_id, loop_no):
#     def get_result_div_sections(self, test, test_no):
#     def get_result_tree(self, test_results):
#     def get_all_unique_test_ids(self, test_result_ext):
#     def exporter_html(self, test_result_ext, test_suite_properties=None):
#     def exporter_junit_ioper(self, test_result_ext, test_suite_properties=None):
#     def exporter_junit(self, test_result_ext, test_suite_properties=None):


# Path: workspace_tools/singletest.py
import sys
    import mbed_lstools
from os.path import join, abspath, dirname
from workspace_tools.utils import check_required_modules
from workspace_tools.build_api import mcu_toolchain_matrix
from workspace_tools.test_api import SingleTestRunner
from workspace_tools.test_api import singletest_in_cli_mode
from workspace_tools.test_api import detect_database_verbose
from workspace_tools.test_api import get_json_data_from_file
from workspace_tools.test_api import get_avail_tests_summary_table
from workspace_tools.test_api import get_default_test_options_parser
from workspace_tools.test_api import print_muts_configuration_from_json
from workspace_tools.test_api import print_test_configuration_from_json
from workspace_tools.test_api import get_autodetected_MUTS_list
from workspace_tools.test_api import get_autodetected_TEST_SPEC
from workspace_tools.test_api import get_module_avail
from workspace_tools.test_exporters import ReportExporter, ResultExporterType
    from workspace_tools.compliance.ioper_runner import IOperTestRunner
    from workspace_tools.compliance.ioper_runner import get_available_oper_test_scopes

            exit(-1)

        # Get extra MUTs if applicable
        MUTs = get_json_data_from_file(opts.muts_spec_filename) if opts.muts_spec_filename else None

        if MUTs is None:
            if not opts.muts_spec_filename:
                parser.print_help()
            exit(-1)

    if opts.verbose_test_configuration_only:
        print "MUTs configuration in %s:" % ('auto-detected' if opts.auto_detect else opts.muts_spec_filename)
        if MUTs:
            print print_muts_configuration_from_json(MUTs, platform_filter=opts.general_filter_regex)
        print
        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)