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.
54 # return search(). (?:) is a non-capturing group.
112 cmd = ["scripts/twister", "-c"] + options + ["--save-tests", fname ]
114 cmd.append("--integration")
145 _options.extend(["-a", arch ])
151 _options.extend(["-p", platform])
168 # Limit search to $ZEPHYR_BASE since this is where the changed files are
184 _options.extend(["-p", board ])
206 _options.extend(["-T", t ])
217 _options.extend(["-p", platform])
219 _options.append("--all")
231 tag.exclude = True
234 # tag._match_fn(path) tests if the path matches files and/or
235 # files-regex
236 tag._match_fn = _get_match_fn(x.get("files"), x.get("files-regex"))
238 # Like tag._match_fn(path), but for files-exclude and
239 # files-regex-exclude
241 _get_match_fn(x.get("files-exclude"), x.get("files-regex-exclude"))
248 t.exclude = False
252 if t.exclude:
256 self.tag_options.extend(["-e", tag ])
267 files = list(filter(lambda x: x, self.modified_files))
273 found.update(fnmatch.filter(files, pattern))
276 logging.debug(files)
278 if sorted(files) != sorted(found):
284 _options.extend(["-p", platform])
296 description="Generate twister argument files based on modified file",
298 parser.add_argument('-c', '--commits', default=None,
300 parser.add_argument('-m', '--modified-files', default=None,
301 help="File with information about changed/deleted/added files.")
302 parser.add_argument('-o', '--output-file', default="testplan.json",
304 parser.add_argument('-P', '--pull-request', action="store_true",
306 parser.add_argument('-p', '--platform', action="append",
308 parser.add_argument('-t', '--tests_per_builder', default=700, type=int,
310 parser.add_argument('-n', '--default-matrix', default=10, type=int,
319 files = [] variable
323 commit = repo.git.diff("--name-only", args.commits)
324 files = commit.split("\n") variable
327 files = json.load(fp) variable
329 if files:
330 print("Changed files:\n=========")
331 print("\n".join(files))
334 f = Filters(files, args.pull_request, args.platform)