diff options
author | Matt Clay <matt@mystile.com> | 2019-02-25 11:45:49 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2019-02-26 10:21:02 -0800 |
commit | c9f549e9c1dbec7584cd7587010f2d84f3d32012 (patch) | |
tree | ec0177dd1ee88260796b30360395e2c4724dd24e | |
parent | 80cc6417fa2577c8920b00d9c871b52015bdbed3 (diff) | |
download | ansible-c9f549e9c1dbec7584cd7587010f2d84f3d32012.tar.gz |
Fix integration test script coverage reporting.
Code coverage reporting was ignoring scripts executed during integration
tests when those scripts resided in the temporary working directory used
during an integration test run.
-rw-r--r-- | test/runner/lib/cover.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/runner/lib/cover.py b/test/runner/lib/cover.py index 3d7e162126..35e8bccd94 100644 --- a/test/runner/lib/cover.py +++ b/test/runner/lib/cover.py @@ -122,6 +122,11 @@ def command_coverage_combine(args): new_name = re.sub('^(/.*?)?/root/ansible/', root_path, filename) display.info('%s -> %s' % (filename, new_name), verbosity=3) filename = new_name + elif '/.ansible/test/tmp/' in filename: + # Rewrite the path of code running from an integration test temporary directory. + new_name = re.sub(r'^.*/\.ansible/test/tmp/[^/]+/', root_path, filename) + display.info('%s -> %s' % (filename, new_name), verbosity=3) + filename = new_name if group not in groups: groups[group] = {} |