Skip to content

Commit

Permalink
Fix Make Test Sets (The-OpenROAD-Project#1683)
Browse files Browse the repository at this point in the history
+ Add an option for `get_test_matrix` to return plaintext
~ Fix `Makefile` to use `get_test_matrix`
  • Loading branch information
donn authored Mar 16, 2023
1 parent 735c148 commit 2857b63
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
13 changes: 11 additions & 2 deletions .github/test_sets/get_test_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,14 @@
@click.option(
"--pdk", "pdks", multiple=True, default=["sky130A"], help="Specify which PDK to use"
)
@click.option(
"--json/--plain",
"use_json",
default=True,
help="Print as plain text joined by whitespace instead of a JSON file. Omits PDKs.",
)
@click.argument("test_sets", nargs=-1)
def main(pdks, test_sets):
def main(pdks, use_json, test_sets):

data_str = open(TEST_SETS_FILE).read()
data = yaml.safe_load(data_str)
Expand All @@ -40,7 +46,10 @@ def main(pdks, test_sets):
for design in test_set["designs"]:
designs.append({"name": design, "pdk": test_set["pdk"]})

print(json.dumps({"design": designs}), end="")
if use_json:
print(json.dumps({"design": designs}), end="")
else:
print(" ".join([design["name"] for design in designs]), end="")


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@ venv/created: ./requirements.txt ./requirements_dev.txt ./requirements_lint.txt

DLTAG=custom_design_List
.PHONY: test_design_list fastest_test_set extended_test_set
fastest_test_set: DESIGN_LIST=$(shell cat ./.github/test_sets/fastest_test_set)
fastest_test_set: DESIGN_LIST=$(shell python3 ./.github/test_sets/get_test_matrix.py --plain --pdk $(PDK) fastest_test_set)
fastest_test_set: DLTAG=$(FASTEST_TEST_SET_TAG)
fastest_test_set: test_design_list
extended_test_set: DESIGN_LIST=$(shell cat ./.github/test_sets/extended_test_set)
extended_test_set: DESIGN_LIST=$(shell python3 ./.github/test_sets/get_test_matrix.py --plain --pdk $(PDK) extended_test_set)
extended_test_set: DLTAG=$(EXTENDED_TEST_SET_TAG)
extended_test_set: test_design_list
test_design_list:
Expand Down
4 changes: 3 additions & 1 deletion designs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,6 @@
!*/script.tcl
*/run_*.json
*/run_*.tcl
*/matrix_*.json
*/matrix_*.json
*/*_config.json
*/*_config.tcl

0 comments on commit 2857b63

Please sign in to comment.