From 7f56a586c024d56951b58b042f41aaaf1110c525 Mon Sep 17 00:00:00 2001 From: Uri Shaked Date: Fri, 19 Apr 2024 17:39:16 +0300 Subject: [PATCH] feat(configure): support for loading only a subset of the projects specified by the `TT_ONLY_PROJECTS` environment variable, e.g.: ```bash TT_ONLY_PROJECTS="tt_um_chip_rom,tt_um_factory_test" ``` --- configure.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure.py b/configure.py index cec3084..f79a587 100755 --- a/configure.py +++ b/configure.py @@ -31,6 +31,10 @@ class Projects: if not os.path.exists(self.project_dir): os.makedirs(self.project_dir) + only_projects = os.getenv("TT_ONLY_PROJECTS") + if only_projects: + only_projects = only_projects.split(",") + self.projects: List[Project] = [] project_list = [ entry @@ -47,7 +51,7 @@ class Projects: commit_id_file = os.path.join(project_dir, "commit_id.json") if not os.path.exists(commit_id_file): - logging.warning(f"no commit_id.json in {project_dir}, skipping") + logging.warning(f"no commit_id.json in {project_dir}, skippinggi") continue commit_id_data = json.load(open(commit_id_file)) @@ -55,6 +59,9 @@ class Projects: logging.warning(f"skipping {project_dir} (skip flag set)") continue + if only_projects and project_id not in only_projects: + continue + project = Project( index, commit_id_data["repo"],