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"
```
This commit is contained in:
Uri Shaked
2024-04-19 17:39:16 +03:00
parent c74b14ac00
commit 7f56a586c0
+8 -1
View File
@@ -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"],