-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3a2d35
commit 8170d3e
Showing
4 changed files
with
149 additions
and
21 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,26 @@ | ||
import sys | ||
from json import dumps | ||
from yaml import load, Loader | ||
from typing import Generator | ||
|
||
|
||
def parse_yaml(path: str) -> Generator[str, None, None]: | ||
with open(path, 'rb') as fd: | ||
tests = load(fd, Loader=Loader) | ||
for test in tests: | ||
if 'import' in test: | ||
import_path = test['import'].split('/', 1)[1] | ||
yield from parse_yaml(import_path) | ||
elif 'test' in test: | ||
yield test['test'] | ||
|
||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) == 2: | ||
testlist = parse_yaml(f'target/{sys.argv[1]}/testlist.yaml') | ||
else: | ||
testlist = parse_yaml('yaml/base_testlist.yaml') | ||
testlist = list(testlist) | ||
# remove, will cause incomplete sim, need customized RTL | ||
testlist.remove("riscv_csr_test") | ||
print(dumps(testlist)) |
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
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