From c5568e86fe5c0c303ecb905b194d1ad66e68f4d2 Mon Sep 17 00:00:00 2001 From: Matt Guthaus Date: Wed, 4 Sep 2019 14:33:25 -0700 Subject: [PATCH] Enable spice and don't purge option to test 30 --- compiler/tests/30_openram_back_end_test.py | 18 +++++++++++------- compiler/tests/30_openram_front_end_test.py | 17 ++++++++++------- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/compiler/tests/30_openram_back_end_test.py b/compiler/tests/30_openram_back_end_test.py index c579bde6..de1bec05 100755 --- a/compiler/tests/30_openram_back_end_test.py +++ b/compiler/tests/30_openram_back_end_test.py @@ -38,9 +38,12 @@ class openram_back_end_test(openram_test): os.chmod(out_path, 0o0750) # specify the same verbosity for the system call - verbosity = "" + options = "" for i in range(OPTS.debug_level): - verbosity += " -v" + options += " -v" + + if OPTS.spice_name: + options += " -s {}".format(OPTS.spice_name) # Always perform code coverage if OPTS.coverage == 0: @@ -52,7 +55,7 @@ class openram_back_end_test(openram_test): cmd = "{0} -n -o {1} -p {2} {3} {4} 2>&1 > {5}/output.log".format(exe_name, out_file, out_path, - verbosity, + options, config_name, out_path) debug.info(1, cmd) @@ -83,10 +86,11 @@ class openram_back_end_test(openram_test): # now clean up the directory - if os.path.exists(out_path): - shutil.rmtree(out_path, ignore_errors=True) - self.assertEqual(os.path.exists(out_path),False) - + if OPTS.purge_temp: + if os.path.exists(out_path): + shutil.rmtree(out_path, ignore_errors=True) + self.assertEqual(os.path.exists(out_path),False) + globals.end_openram() # run the test from the command line diff --git a/compiler/tests/30_openram_front_end_test.py b/compiler/tests/30_openram_front_end_test.py index 3eb28537..dbe7fcb9 100755 --- a/compiler/tests/30_openram_front_end_test.py +++ b/compiler/tests/30_openram_front_end_test.py @@ -39,10 +39,12 @@ class openram_front_end_test(openram_test): os.chmod(out_path, 0o0750) # specify the same verbosity for the system call - verbosity = "" + options = "" for i in range(OPTS.debug_level): - verbosity += " -v" + options += " -v" + if OPTS.spice_name: + options += " -s {}".format(OPTS.spice_name) # Always perform code coverage if OPTS.coverage == 0: @@ -54,7 +56,7 @@ class openram_front_end_test(openram_test): cmd = "{0} -n -o {1} -p {2} {3} {4} 2>&1 > {5}/output.log".format(exe_name, out_file, out_path, - verbosity, + options, config_name, out_path) debug.info(1, cmd) @@ -84,10 +86,11 @@ class openram_front_end_test(openram_test): self.assertEqual(len(re.findall('WARNING',output)),0) - # now clean up the directory - if os.path.exists(out_path): - shutil.rmtree(out_path, ignore_errors=True) - self.assertEqual(os.path.exists(out_path),False) + # now clean up the directory + if OPTS.purge_temp: + if os.path.exists(out_path): + shutil.rmtree(out_path, ignore_errors=True) + self.assertEqual(os.path.exists(out_path),False) globals.end_openram()