added warning to test 30 coverage is not installed

This commit is contained in:
Jesse Cirimelli-Low 2018-12-03 13:24:22 -08:00
parent 71bb1bb9f1
commit 2c12ef2161
2 changed files with 7 additions and 0 deletions

View File

@ -113,6 +113,11 @@ def check_versions():
except:
OPTS.datasheet_gen = 0
try:
import coverage
OPTS.coverage = 1
except:
OPTS.coverage = 0
def init_openram(config_file, is_unit_test=True):
"""Initialize the technology, paths, simulators, etc."""

View File

@ -43,6 +43,8 @@ class openram_test(openram_test):
OPENRAM_HOME = os.path.abspath(os.environ.get("OPENRAM_HOME"))
# Always perform code coverage
if OPTS.coverage == 0:
debug.warning("Failed to find coverage installation. This can be installed with pip3 install coverage")
exe_name = "coverage run -p {0}/openram.py ".format(OPENRAM_HOME)
cmd = "{0} -n -o {1} -p {2} {3} config_20_{4}.py 2>&1 > {5}/output.log".format(exe_name,
out_file,