[Piglit] [PATCH] deqp: Rerun if tests fail to connect to X
Mark Janes
mark.a.janes at intel.com
Mon Mar 28 21:56:13 UTC 2016
Reviewed-by: Mark Janes <mark.a.janes at intel.com>
Dylan Baker <baker.dylan.c at gmail.com> writes:
> A pretty common error it seems is to get a failure to open display when
> using X11. This adds an extra method to the DEQPBaseTest class that
> reruns the test is it finds that error in the stderr. This affects only
> deqp based suite integration.
>
> This fixes a number of sporadically failing tests from our CI.
> ---
> framework/test/deqp.py | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/framework/test/deqp.py b/framework/test/deqp.py
> index 80ce156..c75577a 100644
> --- a/framework/test/deqp.py
> +++ b/framework/test/deqp.py
> @@ -26,10 +26,11 @@ import os
> import subprocess
>
> import six
> +from six.moves import range
>
> from framework import core, grouptools, exceptions
> from framework.profile import TestProfile
> -from framework.test.base import Test, is_crash_returncode
> +from framework.test.base import Test, is_crash_returncode, TestRunError
>
> __all__ = [
> 'DEQPBaseTest',
> @@ -177,3 +178,12 @@ class DEQPBaseTest(Test):
> # We failed to parse the test output. Fallback to 'fail'.
> if self.result.result == 'notrun':
> self.result.result = 'fail'
> +
> + def _run_command(self):
> + """Rerun the command if X11 connection failure happens."""
> + for _ in range(5):
> + super(DEQPBaseTest, self)._run_command()
> + if "FATAL ERROR: Failed to open display" not in self.result.err:
> + return
> +
> + raise TestRunError('Failed to connect to X server 5 times', 'fail')
> --
> 2.7.4
More information about the Piglit
mailing list