summaryrefslogtreecommitdiff
path: root/test-chill/coverage.py
diff options
context:
space:
mode:
authorDerick Huth <derickhuth@gmail.com>2015-03-23 13:48:02 -0600
committerDerick Huth <derickhuth@gmail.com>2015-03-23 13:48:02 -0600
commite6b89c668036ff8424455d3d1d1a5d79a063fc92 (patch)
treee185ac16a4af9df7d29d189dde7ef3b8bd6c19e1 /test-chill/coverage.py
parent4d46b92b3030a4d38d7e09274f0463bbcb94694e (diff)
parent7e39433ddb5f3ac5298207d5f4e8072eb193fa7a (diff)
downloadchill-e6b89c668036ff8424455d3d1d1a5d79a063fc92.tar.gz
chill-e6b89c668036ff8424455d3d1d1a5d79a063fc92.tar.bz2
chill-e6b89c668036ff8424455d3d1d1a5d79a063fc92.zip
Merge pull request #5 from dhuth/master
Autotools Features
Diffstat (limited to 'test-chill/coverage.py')
-rw-r--r--test-chill/coverage.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/test-chill/coverage.py b/test-chill/coverage.py
index 9941a9a..8ff5af8 100644
--- a/test-chill/coverage.py
+++ b/test-chill/coverage.py
@@ -36,6 +36,14 @@ def print_nonexec(argsns, cov):
print('{}: {}'.format(str(lineno).rjust(5), code))
+def print_full_nonexec(argsns, cov):
+ for filename in cov.filenames:
+ with open('coverage_report/' + filename + '.txt', 'w') as f:
+ minline, maxline = map(int,argsns.linerange)
+ for lineno, count, code in linerange(nonexecuted(cov, filename), minline, maxline):
+ f.write('{}: {}\n'.format(str(lineno).rjust(5),code))
+
+
def make_argparser():
arg_parser = argparse.ArgumentParser('coverage.py')
cmd_parser_set = arg_parser.add_subparsers()
@@ -43,6 +51,9 @@ def make_argparser():
nonexec_cmd.add_argument('-f', dest='filename', default=None)
nonexec_cmd.add_argument('-r', dest='linerange', nargs=2, default=(0, 120000), metavar='STARTLINE ENDLINE')
nonexec_cmd.set_defaults(func=print_nonexec)
+ full_nonexec_cmd = cmd_parser_set.add_parser('full_nonexec')
+ full_nonexec_cmd.add_argument('-r', dest='linerange', nargs=2, default=(0, 120000), metavar='STARTLINE ENDLINE')
+ full_nonexec_cmd.set_defaults(func=print_full_nonexec)
return arg_parser