arb_gpu_shader_fp64: add preprocessor define tests

v2: import tests in tests/all.py

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
arb_gpu_shader_fp64: add vs input and fs output tests

Both of these tests are expected to fail as double cannot
be used as vs input or fs output.

v2: make sure we only fail because of wrong type

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Dave Airlie <airlied@redhat.com>
exectest.py: Remove {'result': 'skip'} from get_command_result()

Since 1012d68c an exception in Popen is no longer sent to
interpret_result(), instead it returns early, making this dead code.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Add message to out when is_skip() is True

This adds a note so that one knows why a specific test skipped.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: rename get_command_result to __run_command

This is shorter (and shorter is always better in a python), and it marks
the method as private (leading __) since it's only for use in a Test
method, not in it's children.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Add and update some docstrings

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: Fix formatting problems

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: rename GleanTest.globalParams to GLOBAL_PARAMS

This replaces the camel case name with an all caps constant name.

this patch generated by:
find . -name '*py' | xargs sed -i -e 's!globalParams!GLOBAL_PARAMS!g'

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: replace glean_executable with class variable

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gleantest.py: add docstring

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
exectest.py: Change the order of environment variable loading

This patch changes piglit such that it loads first from the global
environment, then it loads global test options (some of which are passed
as command line arguments, like -p/--platform), and finally any test
specific variables.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
util/wfl: Replace strcmp() with streq()

Because `strcmp(...) == 0` is crufty.

I generated this patch with the coccinelle patch below:

  @@
  expression E;
  @@

  -strcmp(env, E) == 0
  +streq(env, E)

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
util/wfl, run.py: Allow PIGLIT_PLATFORM="mixed_glx_egl"

If environment variable PIGLIT_PLATFORM is unset, then Piglit defaults
to choosing GLX for GL tests and X/EGL for GLES tests. This patch does
not change the default behavior.

Now PIGLIT_PLATFORM="mixed_glx_egl" explicitly selects that default
behavior.

v2: - Drop xegl name. (Dylan)

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
run.py: Explicitly set the piglit platform by using a default

This patch changes piglit such that the python framework always is aware
of the waffle platform being used. This does not change the default
platform, only that the python framework is aware of the default
platform.

v2: - Replace 'gl=>glx,gles=<xegl' name with 'mixed_glx_egl'. This name
      is not as descriptive as the previous name, but it is shorter and
      includes fewer strange symbols.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
exectest.py: rename check_for_skip_scenario to is_skip

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
gleantest.py: fix is_skip()

Gleantest skipping was implemented in PiglitTest, which is not an
ancestor of GleanTest, so it would never be triggered.

It also was set to skip only on 'gbm', however glean only runs on glx,
so if the platform isn't glx then it should be skipped.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
exectest.py: Fix PiglitTest.is_skip()

This fixes glx tests to skip on all platoforms except glx. This also
remove glean from PiglitTest.is_skip(), since glean doesn't descend from
PiglitTest it is dead code.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
exectest.py: Use ABC for Test

This uses the Abstract Base Class metaclass for Test, and it's
decorators to mark abstract classes. This has a couple of nice
advantages, first the abstract class cannot be initialized. Second, the
methods that are marked abstract must be overwritten in children or
initializing them will raise an error. Third, it is very easy to see
which methods need to be overwritten, even with an editor that folds
code.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
arb_shader_subroutine: Add initial minmax test

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
arb_shader_subroutine: add test for preprocessor define

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>