[Piglit] [PATCH 00/16] Framework: Use python exceptions better
Dylan Baker
baker.dylan.c at gmail.com
Tue Apr 21 15:44:17 PDT 2015
This series moves to introduce a standard set of exceptions for Piglit
to use, and a standard handler for them that operates on each entry
point.
This removes boilerplate from our code by allowing it to be pulled into
methods, making it easier to work with, and provides better error
messages when there are expected errors.
Also making use of these new exceptions is Test, which uses a non-error
exception for is_skip and for _run_command. This allows for easier error
message passing back to the main runner.
Dylan Baker (16):
framework/exceptions.py: add a new module for unified piglit
exceptions
framework/test: Use an exception for is_skip() rather than return
framework/test/base: Use an exception for _run_command failure
framework/core.py: Add a custom PiglitConfig class
tests/xts.py: use new error handling.
tests/igt.py: Use new piglit error handling
tests/oglconform.py: Use new error handling code
tests/deqp_gles3.py: Use PiglitConfig.safe_get
tests/es3conform: use Piglit exceptions
backends: replace error class with generic error
profile: use generic piglit exceptions
backends/junit.py: use piglit generic exceptions
glsl_parser_test.py: use piglit generic exceptions
shader_test.py: Use generic piglit exceptions
programs/run.py: use piglit exceptions
program/summary: use piglit exceptions
framework/backends/json.py | 7 +-
framework/backends/junit.py | 4 +-
framework/core.py | 56 ++++++++++-
framework/exceptions.py | 97 +++++++++++++++++++
framework/profile.py | 33 +++----
framework/programs/run.py | 20 ++--
framework/programs/summary.py | 23 ++---
framework/summary.py | 6 +-
framework/test/base.py | 65 ++++++-------
framework/test/gleantest.py | 9 +-
framework/test/glsl_parser_test.py | 29 +++---
framework/test/piglit_test.py | 14 ++-
framework/test/shader_test.py | 22 ++---
framework/tests/base_tests.py | 18 +---
framework/tests/core_tests.py | 53 ++++++++--
.../errors.py => tests/exceptions_tests.py} | 41 +++++++-
framework/tests/gleantest_tests.py | 28 ++++++
framework/tests/glsl_parser_test_tests.py | 107 +++++++--------------
framework/tests/integration_tests.py | 19 ++--
framework/tests/piglit_test_tests.py | 14 ++-
framework/tests/profile_tests.py | 15 ++-
framework/tests/run_parser_tests.py | 14 +--
framework/tests/shader_test_tests.py | 3 +-
framework/tests/utils.py | 35 +++++++
tests/deqp_gles3.py | 8 +-
tests/es3conform.py | 6 +-
tests/igt.py | 36 +++----
tests/oglconform.py | 9 +-
tests/xts.py | 9 +-
29 files changed, 502 insertions(+), 298 deletions(-)
create mode 100644 framework/exceptions.py
rename framework/{backends/errors.py => tests/exceptions_tests.py} (53%)
--
2.3.5
More information about the Piglit
mailing list