Add option to pass test list to runtests
This commit is contained in:
parent
2df1179994
commit
07d4b23a9a
|
@ -4,9 +4,12 @@ import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
testlist = []
|
|
||||||
|
|
||||||
for path in os.listdir():
|
if len(sys.argv) > 1:
|
||||||
|
testlist = sys.argv[1:]
|
||||||
|
else:
|
||||||
|
testlist = []
|
||||||
|
for path in os.listdir():
|
||||||
if os.path.isfile(path) and path.endswith(".c"):
|
if os.path.isfile(path) and path.endswith(".c"):
|
||||||
testlist.append(path[:-2])
|
testlist.append(path[:-2])
|
||||||
|
|
||||||
|
@ -34,8 +37,9 @@ for test in testlist:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
test_run_ret = subprocess.run(
|
test_run_ret = subprocess.run(
|
||||||
["../tb_cxxrtl/tb", "--bin", f"tmp/{test}.bin", "--cycles", "1000000"],
|
["../tb_cxxrtl/tb", "--bin", f"tmp/{test}.bin", "--cycles", "1000000", "--vcd", f"tmp/{test}.vcd"],
|
||||||
stdout = subprocess.PIPE,
|
stdout = subprocess.PIPE,
|
||||||
|
stderr = subprocess.PIPE,
|
||||||
timeout=10
|
timeout=10
|
||||||
)
|
)
|
||||||
with open(f"tmp/{test}.log", "wb") as f:
|
with open(f"tmp/{test}.log", "wb") as f:
|
||||||
|
|
Loading…
Reference in New Issue