-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Eryk Szpotanski <[email protected]>
- Loading branch information
1 parent
308e82a
commit 6d806f5
Showing
5 changed files
with
183 additions
and
59 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,20 @@ | ||
from yaml import load, Loader | ||
from json import dumps | ||
from itertools import product | ||
|
||
RISCV_DV_TESTS = ['riscv_arithmetic_basic_test'] | ||
|
||
|
||
if __name__ == "__main__": | ||
with open('.github/workflows/test-riscv-dv.yml', 'rb') as fd: | ||
run_tests = load(fd, Loader=Loader)['jobs']['run-tests'] | ||
matrix = run_tests['strategy']['matrix'] | ||
isses = matrix['iss'] | ||
coverages = matrix['coverage'] | ||
result = [{ | ||
"test": test, | ||
"iss": iss, | ||
"coverage": coverage, | ||
"version": "pyflow", | ||
} for test, iss, coverage in product(RISCV_DV_TESTS, isses, coverages)] | ||
print(dumps(result)) |
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,29 @@ | ||
import sys | ||
from json import dumps | ||
from yaml import load, Loader | ||
from typing import Generator | ||
|
||
RISCV_DV_HOME = "third_party/riscv-dv/" | ||
|
||
|
||
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(RISCV_DV_HOME + import_path) | ||
elif 'test' in test: | ||
yield test['test'] | ||
|
||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) == 2: | ||
testlist = parse_yaml( | ||
RISCV_DV_HOME + f'target/{sys.argv[1]}/testlist.yaml') | ||
else: | ||
testlist = parse_yaml(RISCV_DV_HOME + '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