This makes all of the integrated tests use the new exceptions code, which simplifies testing and makes error messages nicer.
Signed-off-by: Dylan Baker <[email protected]> --- framework/tests/integration_tests.py | 11 ----------- tests/es3conform.py | 6 +++--- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/framework/tests/integration_tests.py b/framework/tests/integration_tests.py index 664fad1..dc584b3 100644 --- a/framework/tests/integration_tests.py +++ b/framework/tests/integration_tests.py @@ -28,7 +28,6 @@ errors and to ensure that the API hasn't changed without fixing these modules from __future__ import print_function, absolute_import import importlib -import ConfigParser from nose.plugins.skip import SkipTest @@ -53,16 +52,6 @@ def _import(name): except exceptions.PiglitFatalError: raise SkipTest('The module experienced a fatal error. ' 'This may be expected.') - except (ConfigParser.NoOptionError, ConfigParser.NoSectionError): - # FIXME: This is a legacy path - raise SkipTest('No config section for {}'.format(name)) - except SystemExit as e: - # FIXME: This is a legacy path - if e.code == 0: - # This means that it's a normal operation, but not that it's a pass - raise SkipTest('Profile exited normally.') - else: - raise Exception('Profile exited. code: {}.'.format(e.code)) def test_xts_import(): diff --git a/tests/es3conform.py b/tests/es3conform.py index cde2824..42080dc 100644 --- a/tests/es3conform.py +++ b/tests/es3conform.py @@ -21,12 +21,11 @@ # DEALINGS IN THE SOFTWARE. import re -import sys from os import path from framework.profile import TestProfile from framework.test import TEST_BIN_DIR, Test -from framework import grouptools +from framework import grouptools, exceptions __all__ = ['profile'] @@ -39,7 +38,8 @@ __all__ = ['profile'] ############################################################################# if not path.exists(path.join(TEST_BIN_DIR, 'GTF3')): - sys.exit(0) + raise exceptions.PiglitFatalError( + 'Missing GTF3 symlink. Unable to run es3conform tests.') profile = TestProfile() -- 2.4.0 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
