From b370be4a8a207bf54d59acc80c9e2e44b6521757 Mon Sep 17 00:00:00 2001 From: Noah Boorstin Date: Tue, 2 Feb 2021 22:05:35 +0000 Subject: [PATCH] Add busybear testbench to nightly regression checking If you don't like how I did this please feel free to undo it --- .../regression/regression-wally.py | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/wally-pipelined/regression/regression-wally.py b/wally-pipelined/regression/regression-wally.py index f97202d4..4d794e40 100755 --- a/wally-pipelined/regression/regression-wally.py +++ b/wally-pipelined/regression/regression-wally.py @@ -9,7 +9,7 @@ ################################## # edit this line to add more configurations -confignames = ["rv32ic", "rv64ic"] +confignames = ["rv32ic", "rv64ic", "busybear"] import multiprocessing, os @@ -18,18 +18,34 @@ fail = 0 def test_config(config, print_res=True): """Run the given config, and return 0 if it suceeds and 1 if it fails""" logname = "wally_"+config+".log" - cmd = "vsim -c >" + logname +" <" + logname + os.system(cmd) + + # check for success. grep returns 0 if found, 1 if not found + cmd = "grep -e 'no more .* to read' " + logname + "> /dev/null" + grepval = os.system(cmd) + if (grepval): + if print_res:print(logname+": failures detected") + return 1 + else: + if print_res:print(logname+": Success") + return 0 + - # check for success. grep returns 0 if found, 1 if not found - cmd = "grep 'All tests ran without failures' " + logname + "> /dev/null" - grepval = os.system(cmd) - if (grepval): - if print_res:print(logname+": failures detected") - return 1 else: - if print_res:print(logname+": Success") - return 0 + cmd = "vsim -c >" + logname +" < /dev/null" + grepval = os.system(cmd) + if (grepval): + if print_res:print(logname+": failures detected") + return 1 + else: + if print_res:print(logname+": Success") + return 0 pool = multiprocessing.Pool(min(len(confignames), 12)) fail = sum(pool.map(test_config, confignames))