[Piglit] [PATCH 0/8] Refactor TestResult object

Dylan Baker baker.dylan.c at gmail.com
Fri Aug 21 17:21:12 PDT 2015


This reworks the internal representation of the TestResult object from a
dict to a proper object. This has a number of implications for piglit,
but mainly that we can finally treat the result as a property, which
means that calling TestResult.result will return the worst subtest
result if there are subtests, which is what we've wanted but been unable
to do.

This is groundwork for reworking the summary code to be better.

This has been tested with quick.py and cl.py, and touch tested with
xts.py (I can't rung igt because of the way my system is setup)

The first two patches have already been sent as a separate series, but
are required for this one to work correctly.

This is available at my github:
https://github.com/dcbaker/piglit submit/result-object

Dylan Baker (8):
  framework/tests: Add tests for recompressing results
  framework/backends/abstract: Fix doubling compression suffixes
  status.py: Make StatusException a child of PiglitInternalError
  utils.py: Make the TestFailure exception print better message
  status.py: Add early return to status_lookup
  framework: replace TestResult dict with an object
  framework/results: make the result of a test the worst of its subtests
  framework: move unicode conversion handling to TestResult

 framework/backends/abstract.py               |  10 +-
 framework/backends/json.py                   |  42 ++++-
 framework/backends/junit.py                  |  30 +--
 framework/dmesg.py                           |   9 +-
 framework/programs/run.py                    |   2 +-
 framework/results.py                         | 154 ++++++++++++----
 framework/status.py                          |  17 +-
 framework/summary.py                         |  30 ++-
 framework/test/base.py                       |  71 +++-----
 framework/test/deqp.py                       |  10 +-
 framework/test/gleantest.py                  |   6 +-
 framework/test/gtest.py                      |   8 +-
 framework/test/oclconform.py                 |   6 +-
 framework/test/piglit_test.py                |   7 +-
 framework/tests/base_tests.py                |  38 ++--
 framework/tests/compressed_backend_tests.py  |  33 ++++
 framework/tests/deqp_tests.py                |  16 +-
 framework/tests/dmesg_tests.py               |  51 +++---
 framework/tests/gleantest_tests.py           |   4 +-
 framework/tests/json_backend_tests.py        |  57 +++---
 framework/tests/json_results_update_tests.py |  87 +++++++--
 framework/tests/junit_backends_tests.py      |  87 ++++-----
 framework/tests/piglit_test_tests.py         |  20 +-
 framework/tests/results_tests.py             | 263 ++++++++++++++++++++++++++-
 framework/tests/summary_tests.py             |  37 ++--
 framework/tests/utils.py                     |  46 +++--
 templates/test_result.mako                   |  24 +--
 tests/es3conform.py                          |   6 +-
 tests/igt.py                                 |  14 +-
 tests/xts.py                                 |  40 ++--
 30 files changed, 847 insertions(+), 378 deletions(-)

-- 
2.5.0



More information about the Piglit mailing list