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
commitf178835e323d5abbfb0f249326bbde24cecb15b7 (patch)
tree59f6c1ca04077b35bb9ceabdeff9e63297a537d5 /coverage/cmdline.py
parentb61d05fa1f80f375d49aefe59a4c46d083f0fe08 (diff)
parente114efc35ad2c2134f7d4c24a7a4fac286f9e50a (diff)
downloadpython-coveragepy-f178835e323d5abbfb0f249326bbde24cecb15b7.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 2be3294..66a76fa 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.