diff --git a/llvm/utils/lit/lit/cl_arguments.py b/llvm/utils/lit/lit/cl_arguments.py index e03e4c269d725c..06b1313cb8bb1a 100644 --- a/llvm/utils/lit/lit/cl_arguments.py +++ b/llvm/utils/lit/lit/cl_arguments.py @@ -58,10 +58,7 @@ def parse_args(): help="Display all commandlines and output", action="store_true") format_group.add_argument("-o", "--output", - dest="reports", - action="append", type=lit.reports.JsonReport, - default=[], help="Write test results to the provided path", metavar="PATH") format_group.add_argument("--no-progress-bar", @@ -102,10 +99,7 @@ def parse_args(): help="Don't execute any tests (assume PASS)", action="store_true") execution_group.add_argument("--xunit-xml-output", - dest="reports", - action="append", type=lit.reports.XunitReport, - default=[], help="Write XUnit-compatible XML test reports to the specified file") execution_group.add_argument("--timeout", dest="maxIndividualTestTime", @@ -190,6 +184,8 @@ def parse_args(): else: opts.shard = None + opts.reports = filter(None, [opts.output, opts.xunit_xml_output]) + return opts