summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-02-09 19:37:18 +0000
committerVedant Kumar <vsk@apple.com>2017-02-09 19:37:18 +0000
commit162e055c2bd275339781a18a8da99354beafe0de (patch)
tree503c72366a8534aa81d31d678e4aad4d5b42b6ee
parent3e8303014828be8ed93f9d4f14f81a9a3fa39a8e (diff)
[utils] coverage: Add help text about the --restrict flag (NFC)
Passing the --restrict flag to the coverage prep script before other positional arguments is wrong, because it prevents the argparse module from telling apart arguments to --restrict versus positional arguments. Pointed out by Sean Callanan! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294616 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/prepare-code-coverage-artifact.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/utils/prepare-code-coverage-artifact.py b/utils/prepare-code-coverage-artifact.py
index 726375e899c..883cdd78049 100644
--- a/utils/prepare-code-coverage-artifact.py
+++ b/utils/prepare-code-coverage-artifact.py
@@ -6,6 +6,9 @@ from __future__ import print_function
- Collate raw profiles into one indexed profile.
- Generate html reports for the given binaries.
+
+Caution: The positional arguments to this script must be specified before any
+optional arguments, such as --restrict.
'''
import argparse
@@ -84,7 +87,8 @@ if __name__ == '__main__':
help='Emit a unified report for all binaries')
parser.add_argument('--restrict', metavar='R', type=str, nargs='*',
default=[],
- help='Restrict the reporting to the given source paths')
+ help='Restrict the reporting to the given source paths'
+ ' (must be specified after all other positional arguments)')
args = parser.parse_args()
if args.use_existing_profdata and args.only_merge: