grouptools.py: make group separator a constant value

Graphics / Mesa 3D Graphics Library / Piglit - Dylan Baker [gmail.com] - 20 March 2015 13:04 UTC

This patch makes two changes to the way grouptools works, one as a result of the other. The primary change is that this uses a constant SEPARATOR to set the value used by the various functions to work with groups.

The second change is that this no longer wraps posixpath, which is necessary since posixpath doesn't allow the constant to be changed. (well, it does, but that's very fragile and not worth the pain.)

This also changes some of the tests to use the separator in their names using the DocFormatter decorator. This will allow changing the separator for groups with one trivial change (and the necessary JSON version updates of course)

Also converts the junit backend to use grouptools.SEPERATOR instead of a hardcoded value, and adds a testcase for this potential problem.

v2: - fix spelling error. SEPERATOR -> SEPARATOR (Emil)

81ec040 grouptools.py: make group separator a constant value
framework/backends/junit.py | 4 +-
framework/grouptools.py | 82 +++++++++++++++++++++++------------
framework/summary.py | 2 +-
framework/tests/backends_tests.py | 26 +++++++++++
framework/tests/grouptools_tests.py | 23 ++++++++--
framework/tests/utils.py | 38 ++++++++++++++++
6 files changed, 140 insertions(+), 35 deletions(-)

Upstream: cgit.freedesktop.org


  • Share