[Piglit] [PATCH 00/24] Change Test to use only a list for 1st argument

Dylan Baker baker.dylan.c at gmail.com
Mon Jan 5 13:50:21 PST 2015

Currently Test takes a command argument, which can either be a list of
strings or a string. String by itself causes problems on cygwin (as
reported by Brian Paul), so it's worth fixing that. This also simplifies
the signature by not allowing Test to take string arguments.

Brian sent patches the fix the problem, but the it's still possible to
use either one. This series removes all uses of string arguments and
replaces them with lists.

I also took advantage of this test to make use of os.path and grouptools
for working with paths and groups instead of using string formatting and
concatenation for the same work. This accounts for most of the extra
LOC, since in many cases this is more verbose and made single lines so
long they were unreadable.

I have verified that all.py, quick.py, sanity.py, and xts.py still work.
I have touch tested igt, and cl.py, but I haven't run them to ensure
that they run to completion.

This series assumes my series from last week that fixes bugs in
grouptools and xts.

This series is available at my github:
https://github.com/dcbaker/piglit submit/command-list-only

Dylan Baker (24):
  framework: fix bug in Test class
  all.py: remove unnecessary ; on line ends
  all.py: replace tabs with four spaces
  all.py: change add_plain and add_concurrent to use list
  all.py: change add_single_param_test_set() to use a list for args
  all.py: change add_fbo_depthstencil_tests.py to use list for args
  all.py: change add_depthstencil_render_miplevel_tests to use list for
  all.py: change add_msaa_visual_plain_tests to use list for args
  all.py: change add_fbo_formats_tests to use list for args
  all.py: change add_msaa_formats_tests to use list for args
  all.py: change add_fbo* to use list for args
  all.py: change add_getactiveuniform_count to use list for args
  all.py: change texwrap_target to return list
  all.py: change add_fbo_* to use a list for args
  all.py: change add_color_buffer_float_test to use list for args
  all.py: Fix string arguments that are hard to fix with a script
  no upstream: add tool to fix all.py
  all.py: replace simple string arguments with lists
  all.py: use os.path.join for all path joining
  all.py: Use grouptools.join for joining group strings
  all.py: Replace some string concatenation with str.format()
  sanity.py: Make Test() command argument a list instead of string
  sanity.py: use grouptools.join instead of hardcoded '/' for groups
  Test: don't accept strings for command arguments.

 fix_all.py                           |   79 +
 framework/test/base.py               |   14 +-
 framework/tests/base_tests.py        |   38 +-
 framework/tests/gtest_tests.py       |    2 +-
 framework/tests/piglit_test_tests.py |   22 +-
 tests/all.py                         | 3996 +++++++++++++++++-----------------
 tests/sanity.py                      |    5 +-
 7 files changed, 2171 insertions(+), 1985 deletions(-)
 create mode 100755 fix_all.py


More information about the Piglit mailing list