Lines Matching +full:directory +full:- +full:to +full:- +full:scan
2 # SPDX-License-Identifier: Apache-2.0
5 # A script to generate twister options based on modified files.
29 # however, pylint complains that it doesn't recognized them when used (used-before-assignment).
59 # Construct a regex equivalent to the glob
69 # The glob regexes must anchor to the beginning of the path, since we
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:
272 …rds)} boards changed, this looks like a global change, skipping test handling, revert to default.")
277 _options.extend(["-p", board ])
315 _options.extend(["-T", t ])
318 …tests)} tests changed, this looks like a global change, skipping test handling, revert to default")
326 _options.extend(["-p", platform])
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 ])
388 logging.info(f'Need to run full or partial twister...')
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",
410 help="JSON file with the test plan to be passed to twister")
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,
417 parser.add_argument('-n', '--default-matrix', default=10, type=int,
419 parser.add_argument('--testcase-roots-threshold', default=20, type=int,
420 …help="Threshold value for number of modified testcase roots, up to which an optimized scope is sti…
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",
426 parser.add_argument('-r', '--repo-to-scan', default=None,
427 help="Repo to scan")
428 parser.add_argument('--ignore-path',
430 help="Path to a text file with patterns of files to be matched against changed files")
431 parser.add_argument('--alt-tags',
433 help="Path to a file describing relations between directories and tags")
435 "-T", "--testsuite-root", action="append", default=[],
436 help="Base directory to recursively search for test cases. All "
438 "called multiple times. Defaults to the 'samples/' and "
441 "--quarantine-list", action="append", metavar="FILENAME",
443 "the file need to correspond to the test scenarios names as in "
462 commit = repo_to_scan.git.diff("--name-only", args.commits)
495 logging.info(f'Total tests to be run: {len(dup_free)}')
506 logging.info(f'Total nodes to launch: {nodes}')