Lines Matching +full:files +full:- +full:exclude
2 # SPDX-License-Identifier: Apache-2.0
5 # A script to generate twister options based on modified files.
24 # however, pylint complains that it doesn't recognized them when used (used-before-assignment).
63 # return search(). (?:) is a non-capturing group.
123 cmd = [f"{zephyr_base}/scripts/twister", "-c"] + options + ["--save-tests", fname ]
125 cmd += ["--no-detailed-test-id"]
128 cmd+=["-T", root]
130 cmd.append("--integration")
145 old_manifest_content = repo_to_scan.git.show(f"{args.commits[:-2]}:west.yml")
156 old_projs - new_projs))
159 new_projs - old_projs))
161 aprojs = new_projs - old_projs - uprojs
174 _options.extend(["-t", p ])
178 _options.extend(["-p", platform])
205 _options.extend(["-a", arch ])
211 _options.extend(["-p", platform])
256 _options.extend(["-p", board ])
294 _options.extend(["-T", t ])
305 _options.extend(["-p", platform])
307 _options.append("--all")
318 tag.exclude = True
321 # tag._match_fn(path) tests if the path matches files and/or
322 # files-regex
323 tag._match_fn = _get_match_fn(x.get("files"), x.get("files-regex"))
325 # Like tag._match_fn(path), but for files-exclude and
326 # files-regex-exclude
328 _get_match_fn(x.get("files-exclude"), x.get("files-regex-exclude"))
335 t.exclude = False
339 if t.exclude:
343 self.tag_options.extend(["-e", tag ])
364 # or if not all modified files were resolved (corresponding scope found)
372 _options.extend(["-p", platform])
384 description="Generate twister argument files based on modified file",
386 parser.add_argument('-c', '--commits', default=None,
388 parser.add_argument('-m', '--modified-files', default=None,
389 help="File with information about changed/deleted/added files.")
390 parser.add_argument('-o', '--output-file', default="testplan.json",
392 parser.add_argument('-P', '--pull-request', action="store_true",
394 parser.add_argument('-p', '--platform', action="append",
396 parser.add_argument('-t', '--tests_per_builder', default=700, type=int,
398 parser.add_argument('-n', '--default-matrix', default=10, type=int,
400 parser.add_argument('--detailed-test-id', action='store_true',
402 parser.add_argument("--no-detailed-test-id", dest='detailed_test_id', action="store_false",
404 parser.add_argument('-r', '--repo-to-scan', default=None,
406 parser.add_argument('--ignore-path',
408 help="Path to a text file with patterns of files to be matched against changed files")
409 parser.add_argument('--alt-tags',
413 "-T", "--testsuite-root", action="append", default=[],
415 "testcase.yaml files under here will be processed. May be "
428 files = [] variable
434 commit = repo_to_scan.git.diff("--name-only", args.commits)
435 files = commit.split("\n") variable
438 files = json.load(fp) variable
440 if files:
441 print("Changed files:\n=========")
442 print("\n".join(files))
445 f = Filters(files, args.ignore_path, args.alt_tags, args.testsuite_root,