[Piglit] [RFC 0/9] Finish abstracting the backends

Dylan Baker baker.dylan.c at gmail.com
Mon Apr 6 14:30:10 PDT 2015


Currently piglit has a sort of half abstracted backend, where json
results are still assumed in a number of places, but where non-json
results can be selected in others. This leads to a number of problems
when trying to cleanup or work with other places in the code.

As far as I've been able to test this series produces no regressions in
behavior, but does allow for a couple of new features.

First, because it fully decouples TestrunResult and the json backend.
Which is good from a code cleanliness point of view, and also de-tangles
a number of modules, especially in the backend.

Second, it allows junit results to be aggregated and summarized, with
the final patch, junit results can even be compared to json results
using the piglit summary infrastructure.

This series moves a lot of code around, but doesn't actually add too
much code, especially when copyright headers are considered.

This is available at my github:
https://github.com/dcbaker/piglit rfc/backend-abstraction

Dylan Baker (9):
  results.py: initialize wglinfo member in TestrunResult initializer
  results.py: remove serialized keys
  backends: don't * import into backends __init__
  framework backends: treat backends more like plugins
  framework: move json functions out of results into backends.json
  framwork: Add helper functions to abstract the backend better
  framework: split junit and generic backend tests
  backends: implemented loading support for junit.
  backends/junit.py; use a unique replacement character for '.'

 framework/backends/__init__.py                     | 167 ++++++++-
 framework/backends/{__init__.py => errors.py}      |  25 +-
 framework/backends/json.py                         | 398 ++++++++++++++++++++-
 framework/backends/junit.py                        |  81 ++++-
 framework/backends/{__init__.py => register.py}    |  28 +-
 framework/programs/run.py                          |  10 +-
 framework/programs/summary.py                      |  10 +-
 framework/results.py                               | 389 +-------------------
 framework/summary.py                               |   8 +-
 framework/tests/backends_tests.py                  | 376 +++++++------------
 framework/tests/dmesg_tests.py                     |   2 +-
 framework/tests/json_backend_tests.py              | 288 +++++++++++++++
 .../{backends_tests.py => junit_backends_tests.py} | 276 +++++++-------
 framework/tests/results_tests.py                   | 156 +-------
 framework/tests/results_v0_tests.py                |  11 +-
 framework/tests/results_v1_tests.py                |  10 +-
 framework/tests/results_v2_tests.py                |   4 +-
 framework/tests/results_v3_tests.py                |   5 +-
 framework/tests/results_v4_tests.py                |   6 +-
 framework/tests/utils.py                           |  28 +-
 20 files changed, 1258 insertions(+), 1020 deletions(-)
 copy framework/backends/{__init__.py => errors.py} (64%)
 copy framework/backends/{__init__.py => register.py} (64%)
 create mode 100644 framework/tests/json_backend_tests.py
 copy framework/tests/{backends_tests.py => junit_backends_tests.py} (54%)

-- 
2.3.5



More information about the Piglit mailing list