-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dynamic generation of the CI test matrix (#52)
* Added a Python script for test name extraction Signed-off-by: Maciej Kurc <[email protected]> * Added dynamic building of the CI regression test matrix Signed-off-by: Maciej Kurc <[email protected]> * Changed rv32imac to rv32imc in the Makefile for tests Signed-off-by: Maciej Kurc <[email protected]> --------- Signed-off-by: Maciej Kurc <[email protected]>
- Loading branch information
Showing
3 changed files
with
54 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#!/usr/bin/env python3 | ||
import yaml | ||
|
||
def main(): | ||
|
||
# Load and parse YAML description | ||
file_name = "src/integration/stimulus/L0_regression.yml" | ||
with open(file_name, "r") as fp: | ||
yaml_root = yaml.safe_load(fp) | ||
|
||
# Get test list | ||
content = yaml_root["contents"][0] | ||
tests = content["tests"] | ||
paths = tests["paths"] | ||
|
||
# Extract test names from paths | ||
test_list = [] | ||
for path in paths: | ||
parts = path.split("/") | ||
|
||
for i, part in enumerate(parts): | ||
if part == "test_suites" and i + 1 < len(parts): | ||
test_list.append(parts[i+1]) | ||
break | ||
|
||
# Output names | ||
print(test_list) | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters