Add coverage exclusions. Add subprocess coverage.

This commit is contained in:
Matt Guthaus 2018-12-03 09:13:57 -08:00
parent 49f7022416
commit bcc6b95564
2 changed files with 22 additions and 7 deletions

View File

@ -4,6 +4,10 @@ omit =
*/.local/*
# omit everything in /usr
/usr/*
# ignore the unit tests themselves
*/tests/*
# ignore the debug utilities
debug.py
[paths]
source =
/home/gitlab-runner/builds/2fd64746/0
@ -12,3 +16,13 @@ source =
/home/gitlab-runner/builds/2fd64746/3
/home/gitlab-runner/builds/2fd64746/4
/home/gitlab-runner/builds/2fd64746/5
[report]
exclude_lines =
pragma: no cover
def __repr__
except Exception
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == "__main__":
if not OPTS.is_unit_test

View File

@ -42,13 +42,14 @@ class openram_test(openram_test):
OPENRAM_HOME = os.path.abspath(os.environ.get("OPENRAM_HOME"))
cmd = "python3 {0}/openram.py -n -o {1} -p {2} {3} config_20_{4}.py 2>&1 > {5}/output.log".format(OPENRAM_HOME,
out_file,
out_path,
verbosity,
OPTS.tech_name,
out_path)
# Always perform code 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,
out_path,
verbosity,
OPTS.tech_name,
out_path)
debug.info(1, cmd)
os.system(cmd)