From 5df6be3ad580abde5f3dde071aa99a5a6715d0cf Mon Sep 17 00:00:00 2001 From: Jarred Allen Date: Thu, 22 Apr 2021 13:29:55 -0400 Subject: [PATCH] Add buildroot to regression test --- .../regression/regression-wally.py | 71 ++++++++++++------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/wally-pipelined/regression/regression-wally.py b/wally-pipelined/regression/regression-wally.py index 83fa703e..1ddf00a4 100755 --- a/wally-pipelined/regression/regression-wally.py +++ b/wally-pipelined/regression/regression-wally.py @@ -8,8 +8,35 @@ # ################################## -# edit this line to add more configurations -confignames = ["rv32ic", "rv64ic", "busybear"] +from collections import namedtuple +# name: the name of this test configuration/script +# cmd: the command to run to test (should include the logfile as {}) +# grepstr: the string to grep through the log file for, success iff grep finds that string +Config = namedtuple("Config", ['name', 'cmd', 'grepstr']) + +# edit this list to add more configurations +configs = [ + Config( + name="busybear", + cmd="vsim -do wally-busybear-batch.do -c > {}", + grepstr="# loaded 800000 instructions" + ), + Config( + name="buildroot", + cmd="vsim -do wally-buildroot-batch.do -c > {}", + grepstr="# loaded 100000 instructions" + ), + Config( + name="rv32ic", + cmd="vsim > {} -c < {} -c <" + logname - os.system(cmd) - # check for success. grep returns 0 if found, 1 if not found - passed = search_log_for_text("# loaded 800000 instructions", logname) - else: - # Any other configuration loads that name from the config folder and runs vsim - cmd = "vsim -c >" + logname +" <