summaryrefslogtreecommitdiff
path: root/coverage/cmdline.py
diff options
context:
space:
mode:
authorNed Batchelder <nedbat@gmail.com>2015-04-24 20:17:09 -0400
committerNed Batchelder <nedbat@gmail.com>2015-04-24 20:17:09 -0400
commitbb03090a714dc9f9c9a5b0ea3b36af05cfe7bc1a (patch)
tree407ffb056d4e08f0a8238ee766856a17af1ca83d /coverage/cmdline.py
parent5d35a6e0ce6b96b37843a0e8f0fa52f3d015cb10 (diff)
parent22612b88e8cb8c61edaed97827d7910b11130415 (diff)
downloadpython-coveragepy-git-bb03090a714dc9f9c9a5b0ea3b36af05cfe7bc1a.tar.gz
Merged in clytwynec/coverage.py/combine-from-multiple-dirs (pull request #51)
Added ability to combine coverage data files from multiple directories into one file via command line args.
Diffstat (limited to 'coverage/cmdline.py')
-rw-r--r--coverage/cmdline.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/coverage/cmdline.py b/coverage/cmdline.py
index 2be32947..66a76fa6 100644
--- a/coverage/cmdline.py
+++ b/coverage/cmdline.py
@@ -249,10 +249,13 @@ CMDS = {
),
'combine': CmdOptionParser("combine", GLOBAL_ARGS,
- usage = " ",
+ usage = "<dir1> <dir2> ... <dirN>",
description = "Combine data from multiple coverage files collected "
"with 'run -p'. The combined results are written to a single "
- "file representing the union of the data."
+ "file representing the union of the data. The positional "
+ "arguments are directories from which the data files should be "
+ "combined. By default, only data files in the current directory "
+ "are combined."
),
'debug': CmdOptionParser("debug", GLOBAL_ARGS,
@@ -430,7 +433,8 @@ class CoverageScript(object):
self.do_run(options, args)
if options.action == "combine":
- self.coverage.combine()
+ data_dirs = argv if argv else None
+ self.coverage.combine(data_dirs)
self.coverage.save()
# Remaining actions are reporting, with some common options.