From 07d4b23a9a076d6971cd163218f6bab0e2a41d58 Mon Sep 17 00:00:00 2001 From: Luke Wren Date: Tue, 24 May 2022 16:16:12 +0100 Subject: [PATCH] Add option to pass test list to runtests --- test/sim/sw_testcases/runtests | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/sim/sw_testcases/runtests b/test/sim/sw_testcases/runtests index eab492a..4fada9c 100755 --- a/test/sim/sw_testcases/runtests +++ b/test/sim/sw_testcases/runtests @@ -4,11 +4,14 @@ import os import subprocess import sys -testlist = [] -for path in os.listdir(): - if os.path.isfile(path) and path.endswith(".c"): - testlist.append(path[:-2]) +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"): + testlist.append(path[:-2]) testlist = sorted(testlist) @@ -34,8 +37,9 @@ for test in testlist: continue 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, + stderr = subprocess.PIPE, timeout=10 ) with open(f"tmp/{test}.log", "wb") as f: