Regression delete wkdir files to prevent spurious failures

This commit is contained in:
David Harris 2022-12-15 10:24:58 -08:00
parent 3bef12b108
commit 97a432570a
2 changed files with 8 additions and 2 deletions

1
.gitignore vendored
View file

@ -117,3 +117,4 @@ pipelined/srt/testgen
pipelined/srt/qslc_r4a2
pipelined/srt/qslc_r4a2.sv
pipelined/srt/testvectors
pipelined/regression/wkdir

View file

@ -10,7 +10,7 @@
# output.
#
##################################
import sys,os
import sys,os,shutil
class bcolors:
HEADER = '\033[95m'
@ -26,6 +26,7 @@ class bcolors:
from collections import namedtuple
regressionDir = os.path.dirname(os.path.abspath(__file__))
os.chdir(regressionDir)
TestCase = namedtuple("TestCase", ['name', 'variant', 'cmd', 'grepstr'])
# name: the name of this test configuration (used in printing human-readable
# output and picking logfile names)
@ -158,9 +159,13 @@ def main():
try:
os.chdir(regressionDir)
os.mkdir("logs")
#print(os.getcwd())
#print(regressionDir)
shutil.rmtree("wkdir")
except:
pass
os.mkdir("wkdir")
if '-makeTests' in sys.argv:
os.chdir(regressionDir)
os.system('./make-tests.sh | tee ./logs/make-tests.log')