summaryrefslogtreecommitdiff
path: root/tools/coverage/coverage_report.py
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-07-31 11:36:45 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-31 15:51:57 +0000
commit52f24290b1b3d1620796c50866e7d8016a10807d (patch)
tree2b23e921ba05e61dffebf0a5e4878f15011263fc /tools/coverage/coverage_report.py
parentf0e9c849a3fd4efec3d7ee57fc4889814c45b0cd (diff)
downloadpdfium-52f24290b1b3d1620796c50866e7d8016a10807d.tar.xz
More fixes for coverage_report.py
Change the defaults for the directory arguments to be lists, since that is what argparse gives when the user provides a value. Also changed type of os.mkdirs to os.makedirs. Bug: Change-Id: I04c15323efedc9483327c01bab18d45ffffdc21b Reviewed-on: https://pdfium-review.googlesource.com/9590 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'tools/coverage/coverage_report.py')
-rwxr-xr-xtools/coverage/coverage_report.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/coverage/coverage_report.py b/tools/coverage/coverage_report.py
index c74b6bf49b..bb2d4e1396 100755
--- a/tools/coverage/coverage_report.py
+++ b/tools/coverage/coverage_report.py
@@ -87,7 +87,7 @@ class CoverageExecutor(object):
self.output_directory = args['output_directory']
if not os.path.exists(self.output_directory):
if not self.dry_run:
- os.mkdirs(self.output_directory)
+ os.makedirs(self.output_directory)
elif not os.path.isdir(self.output_directory):
parser.error('%s exists, but is not a directory' % self.output_directory)
self.coverage_totals_path = os.path.join(self.output_directory,
@@ -338,14 +338,12 @@ def main():
parser.add_argument(
'-s',
'--source_directory',
- nargs=1,
help='Location of PDFium source directory, defaults to CWD',
default=os.getcwd())
build_default = os.path.join('out', 'Coverage')
parser.add_argument(
'-b',
'--build_directory',
- nargs=1,
help=
'Location of PDFium build directory with coverage enabled, defaults to '
'%s under CWD' % build_default,
@@ -354,7 +352,6 @@ def main():
parser.add_argument(
'-o',
'--output_directory',
- nargs=1,
help='Location to write out coverage report to, defaults to %s under CWD '
% output_default,
default=os.path.join(os.getcwd(), output_default))