Lines Matching +full:pylib +full:- +full:tests
2 # SPDX-License-Identifier: Apache-2.0
29 # however, pylint complains that it doesn't recognized them when used (used-before-assignment).
40 from pylib.twister.twisterlib.statuses import TwisterStatus
44 # Constructs a single regex that tests for matches against the globs in
70 # return search(). (?:) is a non-capturing group.
139 cmd = [f"{zephyr_base}/scripts/twister", "-c"] + options + ["--save-tests", fname ]
141 cmd += ["--no-detailed-test-id"]
144 cmd+=["-T", root]
146 cmd.append("--integration")
149 cmd += ["--quarantine-list", q]
164 old_manifest_content = repo_to_scan.git.show(f"{args.commits[:-2]}:west.yml")
175 old_projs - new_projs))
178 new_projs - old_projs))
180 aprojs = new_projs - old_projs - uprojs
195 _options.extend(["-t", p ])
199 _options.extend(["-p", platform])
220 _options.extend(["-a", arch ])
226 _options.extend(["-p", platform])
258 with open(file, 'r', encoding='utf-8') as f:
277 _options.extend(["-p", board ])
284 tests = set()
294 tests.add(d)
305 tests.add(os.path.dirname(yaml))
314 for t in tests:
315 _options.extend(["-T", t ])
317 if len(tests) > self.tc_roots_th:
318 …logging.warning(f"{len(tests)} tests changed, this looks like a global change, skipping test handl…
323 logging.info(f'Potential test filters...({len(tests)} changed...)')
326 _options.extend(["-p", platform])
340 # tag._match_fn(path) tests if the path matches files and/or
341 # files-regex
342 tag._match_fn = _get_match_fn(x.get("files"), x.get("files-regex"))
344 # Like tag._match_fn(path), but for files-exclude and
345 # files-regex-exclude
347 _get_match_fn(x.get("files-exclude"), x.get("files-regex-exclude"))
362 self.tag_options.extend(["-e", tag ])
382 # Full twister run can be ordered by detecting great number of tests/boards changed
391 _options.extend(["-p", platform])
405 parser.add_argument('-c', '--commits', default=None,
407 parser.add_argument('-m', '--modified-files', default=None,
409 parser.add_argument('-o', '--output-file', default="testplan.json",
411 parser.add_argument('-P', '--pull-request', action="store_true",
413 parser.add_argument('-p', '--platform', action="append",
415 parser.add_argument('-t', '--tests_per_builder', default=700, type=int,
416 help="Number of tests per builder")
417 parser.add_argument('-n', '--default-matrix', default=10, type=int,
418 help="Number of tests per builder")
419 parser.add_argument('--testcase-roots-threshold', default=20, type=int,
422 parser.add_argument('--detailed-test-id', action='store_true',
423 help="Include paths to tests' locations in tests' names.")
424 parser.add_argument("--no-detailed-test-id", dest='detailed_test_id', action="store_false",
425 help="Don't put paths into tests' names.")
426 parser.add_argument('-r', '--repo-to-scan', default=None,
428 parser.add_argument('--ignore-path',
431 parser.add_argument('--alt-tags',
435 "-T", "--testsuite-root", action="append", default=[],
439 "'tests/' directories at the base of the Zephyr tree.")
441 "--quarantine-list", action="append", metavar="FILENAME",
444 "corresponding tests .yaml files. These scenarios "
462 commit = repo_to_scan.git.diff("--name-only", args.commits)
481 logging.info(f'Total tests gathered: {len(f.all_tests)}')
495 logging.info(f'Total tests to be run: {len(dup_free)}')