Exemple #1
0
        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)
                    report_exporter.report_to_file(test_results,
Exemple #2
0
        # 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)
                    report_exporter.report_to_file(test_results, opts.report_junit_file_name)
            else: