test: Split the spurious resize code out of PiglitGLTest

This patch splits that run method out into a separate mixin class that
overrides only the _run_command method. This split will be used in the
next patch to apply the same mixin to the GleanTest class, which
theoretically suffers from the same problem but doesn't have this catch.

v2: - add test for WindowResizeMixin

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
framework/test/base.py: Use a flag in _run_command

If there is an error in self._run_command return a flag of either True
or False, instead of checking for self.result['result'] == 'skip' in
Test.run() for early return check for the returned error flag. This
makes the early return mechanism much more flexible and extensible than
it was before, especially for mixins and subclasses that whish to extend
the _run_command method.

v2: - add test for _run_command return code

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
base.py: Extend the WindowResizeMixin to return early

In the event that we get more spurious window resizes than our threshold
(5), mark the test as fail, adds a message in out as to why it failed,
and then returns True so that Test.run() will return early.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
framework: Move PLATFORMS list to core

This allows the PLATFORMS list to be readily shared, and will be used in
the next patch.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
piglit_test.py: Automatically add -auto and -fbo when appropriate

There is a lot of logic in all.py to add -auto and possible -fbo to
tests when it is appropriate. This is rather silly as we can just make
the test class do this for us, which has the added advantage of reducing
the amount of memory each test needs by reducing the number of strings
stored by each instance.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
squash! piglit_test.py: Automatically add -auto and -fbo when appropriate

tests/all.py: Remove plain_test and concurrent_test wrappers

This patch removes the plain_test and concurrent_test wrappers, and
replaces them with PiglitGLTest constructor calls directly. For
plain_test this is all that is needed (because of the last patch), for
concurrent_test it additionally adds the run_concurrent=True keyword
argument to the constructor.

With the changes introduced in the last patch, this is minimally
invasive, but allows us to easily pass additional parameters to the
constructors of these tests, and will be used in subsequent patches to
do platform dependent skipping.

To maintain feature parity this patch needs to be squashed into the
previous patch, however for review I think that the patches make more
sense apart.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
piglit_test.py: Add arguments for platform restrictions to PiglitGLTest

This adds two new keyword arguments to the PiglitGLTest,
require_platform and exclude_platforms. These two arguments are mutually
exclusive and provide a mechanism to fast filter tests that have
platform restrictions.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
piglit_test.py: replace pattern match skipping with argument skip

Prior to this patch any test that had glx- in the name of the test would
be skipped. This patch replaces that with a more extensible mechanism, a
keyword argument for each test that allows a required_platform to be
set. If the test marks that it requires a platform, and that is not the
selected platform then the test will skip.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
tests/all.py: Skip EGL specific tests on a pure glx platform

wayland, X11, and gbm *can* be built with egl support, these are
determined by the driver. However, glx does not have egl support, and
probably cannot have egl support. In the case where a pure glx platform
is specified we can fast skip egl tests

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
piglit_test.py: fix potential bug in PiglitGLTest.is_skip()

Rather than returning False if is_skip() doesn't generate a True result,
it should return super().is_skip(). This fixes potential bugs caused by
introducing an is_skip() above PiglitGLTest in the class hierarchy.

Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>