[Piglit] [PATCH 2/4] framework/programs/summary.py: parse config for aggregate
Dylan Baker
baker.dylan.c at gmail.com
Thu Aug 6 14:43:07 PDT 2015
This fixes a bug where aggregate will only honor the default compression
mode or one set by an environment variable.
Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
framework/programs/summary.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/framework/programs/summary.py b/framework/programs/summary.py
index 069aed9..23a4eb8 100644
--- a/framework/programs/summary.py
+++ b/framework/programs/summary.py
@@ -28,6 +28,7 @@ import sys
import errno
from framework import summary, status, core, backends, exceptions
+from . import parsers
__all__ = [
'aggregate',
@@ -183,7 +184,10 @@ def csv(input_):
@exceptions.handler
def aggregate(input_):
"""Combine files in a tests/ directory into a single results file."""
- parser = argparse.ArgumentParser()
+ unparsed = parsers.parse_config(input_)[1]
+
+ # Adding the parent is necissary to get the help options
+ parser = argparse.ArgumentParser(parents=[parsers.CONFIG])
parser.add_argument('results_folder',
type=path.realpath,
metavar="<results path>",
@@ -191,7 +195,7 @@ def aggregate(input_):
parser.add_argument('-o', '--output',
default="results.json",
help="name of output file. Default: results.json")
- args = parser.parse_args(input_)
+ args = parser.parse_args(unparsed)
assert os.path.isdir(args.results_folder)
--
2.5.0
More information about the Piglit
mailing list