# 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
                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
        opts.suppress_summary = True

    single_test = SingleTestRunner(_global_loops_count=opts.test_global_loops_value,
                                   _test_loops_list=opts.test_loops_list,
                                   _muts=MUTs,
                                   _clean=opts.clean,
                                   _opts_db_url=opts.db_url,
                                   _opts_log_file_name=opts.log_file_name,
                                   _opts_report_html_file_name=opts.report_html_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

                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
        opts.suppress_summary = True

    single_test = SingleTestRunner(_global_loops_count=opts.test_global_loops_value,
                                   _test_loops_list=opts.test_loops_list,
                                   _muts=MUTs,
                                   _clean=opts.clean,
                                   _opts_db_url=opts.db_url,
                                   _opts_log_file_name=opts.log_file_name,
                                   _opts_report_html_file_name=opts.report_html_file_name,

                                   _opts_report_junit_file_name=opts.report_junit_file_name,