Lines Matching +full:if +full:- +full:no +full:- +full:files +full:- +full:found

5 # SPDX-License-Identifier: Apache-2.0
9 into a JSON files compatible with Twister report schema making them ready for upload
13 The memory footprint input data files (rom.json, ram.json) are expected in directories
16 with the corresponding sub-directories.
18 For example, an input path `./**/*v3.6.0-rc3-*/footprints/**/frdm_k64f/` will be
19 expanded by bash to all sub-directories with the 'footprints' data `v3.6.0-rc3`
22 `shopt -s globstar`.
24 The output `twister_footprint.json` files will be placed into the same directories
25 as the corresponding input files.
29 This scripts has `--test-name` parameter to customize how to compose test names
48 VERSION_COMMIT_RE = re.compile(r".*-g([a-f0-9]{12})$")
68 log_level = LOG_LEVELS[log_level][0] if log_level in LOG_LEVELS else logging.ERROR
71 console.setFormatter(logging.Formatter('%(asctime)s - %(levelname)-8s - %(message)s'))
79 if verbose > len(levels):
81 if verbose <= 0:
95 parser.add_argument('-p', '--plan', metavar='PLAN_FILE_CSV', required=True,
100 parser.add_argument('-o', '--output-fname', metavar='OUTPUT_FNAME', required=False,
105 parser.add_argument('-z', '--zephyr_base', metavar='ZEPHYR_BASE', required=False,
111 parser.add_argument("--test-name",
117 parser.add_argument("--no-testsuite-check",
121 parser.add_argument('-v', '--verbose', required=False, action='count', default=0,
127 def read_plan(fname: str) -> list[dict]:
139 if not data_id['board']:
147 if not all(data_id.values()):
150 if f"{data_id['app']}/{data_id['feature']}/{data_id['board']}" in plan:
156 # not found
174 if not args.zephyr_base:
186 test_name_sep = '/' if '/' in args.test_name else '.'
194 if not os.path.isdir(p_head):
200 if data_id is None:
201 logging.warning(f"skipped '{report_path}' - not a correct report directory")
205 logging.info(f"filtered '{report_path}' - not in the plan")
211 if 'suite_name' in test_name_parts and 'suite_name' not in plan[r_plan]:
212 logging.info(f"filtered '{report_path}' - no Twister suite name in the plan.")
216 …suite_name = test_name_sep.join([plan[r_plan][n] if n in plan[r_plan] else '' for n in test_name_p…
219 if args.testsuite_check:
221 if len(suite_type) and suite_type[0] in TESTSUITE_FILENAME:
229 if not os.path.isfile(suite_conf_fname):
230 … logging.error(f"test configuration not found for '{report_path}' at '{suite_conf_fname}'")
237 version_sha = sha_match.group(1) if sha_match else data_id['version']
241 logging.error(f"SHA:'{version_sha}' is not found in ZEPHYR_BASE for '{report_path}'")
246 # Compose twister_footprint.json record - each application (test suite) will have its own
291 logging.info(f'found={len(args.input_paths)}, converted={converted}, '
296 if __name__ == '__main__':