[Piglit] [PATCH] oclconform: Fix PEP 8 issues.
Dylan Baker
baker.dylan.c at gmail.com
Mon Nov 16 11:44:31 PST 2015
On Sat, Nov 14, 2015 at 11:20:33PM -0800, Vinson Lee wrote:
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> framework/test/oclconform.py | 39 +++++++++++++++++++++++++--------------
> 1 file changed, 25 insertions(+), 14 deletions(-)
>
> diff --git a/framework/test/oclconform.py b/framework/test/oclconform.py
> index 14ce902..eb3adb4 100644
> --- a/framework/test/oclconform.py
> +++ b/framework/test/oclconform.py
> @@ -41,20 +41,24 @@ __all__ = [
> def get_test_section_name(test):
> return 'oclconform-{}'.format(test)
>
> -class OCLConform(Test):
>
> +class OCLConform(Test):
> def interpret_result(self):
> if self.result.returncode != 0 or 'FAIL' in self.result.out:
> self.result.result = 'fail'
> else:
> self.result.result = 'pass'
>
> +
> def add_sub_test(profile, test_name, subtest_name, subtest):
> - profile.test_list[grouptools.join('oclconform', test_name, subtest_name)] = subtest
> + profile.test_list[grouptools.join('oclconform', test_name,
> + subtest_name)] = subtest
> +
>
> def add_test(profile, test_name, test):
> profile.test_list[grouptools.join('oclconform', test_name)] = test
>
> +
> def add_oclconform_tests(profile):
> section_name = 'oclconform'
> if not PIGLIT_CONFIG.has_section(section_name):
> @@ -68,30 +72,37 @@ def add_oclconform_tests(profile):
> for test in tests:
> test_section_name = get_test_section_name(test)
> if not PIGLIT_CONFIG.has_section(test_section_name):
> - print("Warning: no section defined for {}".format(test), file=stderr)
> + print("Warning: no section defined for {}".format(test),
> + file=stderr)
> continue
>
> test_name = PIGLIT_CONFIG.get(test_section_name, 'test_name')
> - should_run_concurrent = PIGLIT_CONFIG.has_option(test_section_name, 'concurrent')
> + should_run_concurrent = PIGLIT_CONFIG.has_option(test_section_name,
> + 'concurrent')
> if PIGLIT_CONFIG.has_option(test_section_name, 'list_subtests'):
> - list_tests = PIGLIT_CONFIG.get(test_section_name, 'list_subtests')
> - subtest_regex = PIGLIT_CONFIG.get(test_section_name, 'subtest_regex')
> + list_tests = PIGLIT_CONFIG.get(test_section_name,
> + 'list_subtests')
> + subtest_regex = PIGLIT_CONFIG.get(test_section_name,
> + 'subtest_regex')
> subtest_regex.encode('string_escape')
> run_subtests = PIGLIT_CONFIG.get(test_section_name, 'run_subtest')
> - list_tests =list_tests.split()
> + list_tests = list_tests.split()
>
> - subtests = subprocess.check_output(args=list_tests, cwd=bindir).split('\n')
> + subtests = subprocess.check_output(args=list_tests,
> + cwd=bindir).split('\n')
> for subtest in subtests:
> m = re.match(subtest_regex, subtest)
> if not m:
> continue
> subtest = m.group(1)
> - subtest_command = join(bindir, run_subtests.replace('<subtest>', subtest))
> + subtest_command = join(bindir,
> + run_subtests.replace('<subtest>',
> + subtest))
> add_sub_test(profile, test_name, subtest,
> - OCLConform(command=subtest_command.split(),
> - run_concurrent=should_run_concurrent))
> + OCLConform(command=subtest_command.split(),
> + run_concurrent=should_run_concurrent))
> else:
> run_test = PIGLIT_CONFIG.get(test_section_name, 'run_test')
> - add_test(profile, test_name, OCLConform(command=run_test.split(),
> - run_concurrent=should_run_concurrent))
> -
> + add_test(profile, test_name,
> + OCLConform(command=run_test.split(),
> + run_concurrent=should_run_concurrent))
> --
> 2.4.9 (Apple Git-60)
>
Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/piglit/attachments/20151116/e7a9a570/attachment.sig>
More information about the Piglit
mailing list