[Piglit] [RFC 10/10] framework/resume: properly parse the no_retry option
Nicolai Hähnle
nhaehnle at gmail.com
Wed Oct 11 10:26:59 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
framework/programs/run.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/framework/programs/run.py b/framework/programs/run.py
index bf8a0e612..ecef3dead 100644
--- a/framework/programs/run.py
+++ b/framework/programs/run.py
@@ -380,20 +380,22 @@ def run(input_):
time_elapsed.end = time.time()
backend.finalize({'time_elapsed': time_elapsed.to_json()})
print('Thank you for running Piglit!\n'
'Results have been written to ' + args.results_path)
@exceptions.handler
def resume(input_):
+ unparsed = parsers.parse_config(input_)[1]
+
parser = argparse.ArgumentParser()
parser.add_argument("results_path",
type=path.realpath,
metavar="<Results Path>",
help="Path to results folder")
parser.add_argument("-f", "--config",
dest="config_file",
type=argparse.FileType("r"),
help="Optionally specify a piglit config file to use. "
"Default is piglit.conf")
@@ -402,32 +404,31 @@ def resume(input_):
action="store_true",
help="Do not retry incomplete tests")
parser.add_argument('-j', '--jobs',
dest='jobs',
action='store',
type=int,
default=core.PIGLIT_CONFIG.safe_get(
'core', 'jobs', '-1'),
help='Set the maximum number of jobs to run concurrently. '
'By default, the reported number of CPUs is used.')
- args = parser.parse_args(input_)
+ args = parser.parse_args(unparsed)
_disable_windows_exception_messages()
results = backends.load(args.results_path)
options.OPTIONS.execute = results.options['execute']
options.OPTIONS.valgrind = results.options['valgrind']
options.OPTIONS.sync = results.options['sync']
options.OPTIONS.deqp_mustpass = results.options['deqp_mustpass']
options.OPTIONS.process_isolation = results.options['process_isolation']
options.OPTIONS.jobs = args.jobs
-
- core.get_config(args.config_file)
+ options.OPTIONS.no_retry = args.no_retry
options.OPTIONS.env['PIGLIT_PLATFORM'] = results.options['platform']
results.options['env'] = core.collect_system_info()
results.options['name'] = results.name
# Resume only works with the JSON backend
backend = backends.get_backend('json')(
args.results_path,
file_start_count=len(results.results) + 1)
--
2.11.0
More information about the Piglit
mailing list