Lines Matching +full:get +full:- +full:coverage +full:- +full:files
3 # Copyright (c) 2018-2025 Intel Corporation
5 # SPDX-License-Identifier: Apache-2.0
46 from twisterlib.coverage import run_coverage_instance
76 completed = done - filtered_static
79 pass rate = passed / (total - filtered_configs)
80 case pass rate = passed_cases / (cases - filtered_cases - skipped_cases)
149 length = int(log10(-n))+2
153 selected_cases = self.cases - self.filtered_cases
154 selected_configs = self.done - self.filtered_static - self.filtered_runtime
509 config_re = re.compile('(CONFIG_[A-Za-z0-9_]+)[=]\"?([^\"]*)\"?$')
510 dt_re = re.compile('([A-Za-z0-9_]+)[=]\"?([^\"]*)\"?$')
564 duration = time.time() - start_time
639 gen_edt_args = "--edtlib-Werror"
650 f'-B{self.build_dir}',
651 f'-DTC_RUNID={self.instance.run_id}',
652 f'-DTC_NAME={self.instance.testsuite.name}',
653 f'-D{warning_command}={warnings_as_errors}',
654 f'-DEXTRA_GEN_EDT_ARGS={gen_edt_args}',
655 f'-G{self.env.generator}',
656 f'-DPython3_EXECUTABLE={pathlib.Path(sys.executable).as_posix()}'
661 '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON',
662 '-DCONFIG_ASSERT=y',
663 '-DCONFIG_COVERAGE=y'
667 cmake_args.append(f'-DZEPHYR_TOOLCHAIN_VARIANT={self.instance.toolchain}')
675 f'-DMODULES={",".join(filter_stages)}',
676 f'-P{canonical_zephyr_base}/cmake/package_helper.cmake',
682 f'-S{canonical_zephyr_base}/share/sysbuild',
683 f'-DAPP_DIR={self.source_dir}'
687 f'-S{self.source_dir}'
693 cmake_opts = [f'-DBOARD={self.platform.name}']
698 '-DSNIPPET={}'.format(';'.join(self.instance.testsuite.required_snippets))
727 duration = time.time() - start_time
769 self.log = "config-twister.log"
779 # Load domain yaml to get default domain build directory
834 # so --west-flash must be passed.
902 def trace(self) -> bool:
908 logger.info(f"{filename:-^100}")
916 # Remove any coverage data from the dumped logs
925 logger.info(f"{filename:-^100}")
981 op = message.get('op')
1064 if ret.get('returncode', 1) > 0:
1098 if not ret or ret.get('returncode', 1) > 0:
1137 next_op = "coverage" if self.options.coverage else "report"
1153 # Run per-instance code coverage
1154 elif op == "coverage":
1156 logger.debug(f"Run coverage for '{self.instance.name}'")
1157 self.instance.coverage_status, self.instance.coverage = \
1182 if not self.options.coverage:
1206 mode = message.get("mode")
1265 # This can happen if a ZTEST_SUITE name is macro-generated
1266 # in the test source files, e.g. based on DT information.
1296 tc_info = tc_keeper.get(testcase_id, {})
1302 testcase.status = tc_info.get('status', TwisterStatus.NONE)
1303 testcase.reason = tc_info.get('reason')
1321 # below ones are needed to make --test-only work as well
1363 def _get_artifact_allow_list_for_domain(self, domain: str) -> list[str]:
1365 Return a list of files needed to test a given domain.
1377 def _get_binaries(self) -> list[str]:
1379 Get list of binaries paths (absolute or relative to the
1391 # Get binaries for a single-domain build
1393 # Get binaries in the case of a multiple-domain build
1408 def _get_binaries_from_runners(self, domain='') -> list[str]:
1410 Get list of binaries paths (absolute or relative to the
1412 multiple-domain builds by passing in one domain at a time.
1431 binary_path = runners_config.get(binary_key)
1443 Sanitize files to make it possible to flash those file on different
1451 Replace absolute paths of binary files for relative ones. The base
1452 directory for those files is f"{self.instance.build_dir}/zephyr"
1470 binary_path = runners_config.get(binary_key)
1482 Remove Zephyr base paths from selected files.
1505 increment_value = -1 if decrement else 1
1544 total_to_do = results.total - results.filtered_static
1606 f"{results.done - results.filtered_static:>{total_tests_width}}/{total_to_do}"
1624 (float(results.done - results.filtered_static) / total_to_do) * 100
1627 unfiltered = results.done - results.filtered_static
1657 f"INFO - Total complete: {complete_section}"
1673 args_expanded = ["-D{}".format(a.replace('"', '\"')) for a in config_options]
1684 # merge overlay files into one variable
1697 args_expanded.extend(["-D{}".format(a.replace('"', '\"')) for a in cmake_extra_args])
1698 args_expanded.extend(["-D{}".format(a.replace('"', '')) for a in args])
1736 build_result = self.run_build(['--build', self.build_dir])
1789 build_result = self.run_build(['--build', self.build_dir, "--target", "footprint"])
1824 def __init__(self, instances, suites, env=None) -> None:
1877 self.results.done = self.results.total - self.results.failed
1880 self.results.done -= self.results.error
1904 retries = retries - 1
1930 f" {self.results.filtered_configs - self.results.filtered_static} at runtime)."