summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorEric Engestrom <eric@igalia.com>2024-01-24 23:21:29 +0000
committerMarge Bot <emma+marge@anholt.net>2024-01-25 21:16:13 +0000
commit6825c67c991fc1fc6192f81a25e86f5bde7367d1 (patch)
treebce094207081fe026781fe7389f706896f7d4040 /bin
parenteeba409c54761d48bb5cd26233324e7a0ad9f8ac (diff)
ci_run_n_monitor: allow passing multiple targets
When generating the list of targets from a script, being able to just pass `--target "${list[@]}"` is very convenient. The list of targets is simply converted to an "or" regex, matching any of the `--target`s given. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27252>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/ci/ci_run_n_monitor.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/ci/ci_run_n_monitor.py b/bin/ci/ci_run_n_monitor.py
index 5cd08a468b4..3b5462b4287 100755
--- a/bin/ci/ci_run_n_monitor.py
+++ b/bin/ci/ci_run_n_monitor.py
@@ -269,6 +269,7 @@ def parse_args() -> None:
metavar="target-job",
help="Target job regex. For multiple targets, separate with pipe | character",
required=True,
+ nargs=argparse.ONE_OR_MORE,
)
parser.add_argument(
"--token",
@@ -381,10 +382,11 @@ if __name__ == "__main__":
print(f"Revision: {REV}")
print(f"Pipeline: {pipe.web_url}")
- target_jobs_regex = re.compile(args.target.strip())
+ target = '|'.join(args.target)
+ target_jobs_regex = re.compile(target.strip())
deps = set()
- print("🞋 job: " + Fore.BLUE + args.target + Style.RESET_ALL)
+ print("🞋 job: " + Fore.BLUE + target + Style.RESET_ALL)
deps = find_dependencies(
target_jobs_regex=target_jobs_regex, iid=pipe.iid, project_path=cur_project
)