framework tests: Adds tests to ensure builtin tests work

Specifically this adds initializer tests which would have exposed the
bug in 90a256411.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
tests: Add tests to import the test lists in tests/

These try to import all.py, all_cl.py etc, if they raise an error then
the test will fail. This is at least a little sanity around these fairly
insane modules.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
tests/r500.py: Fix bug

This module has had a bug for some time that would prevent it from
running.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
dmesg_tests.py: Fix Test derived class tests

These tests were not updated when the logging mechanism was updated, so
they would raise a runtime exception.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
core_tests.py: Add some basic initialization tests for core

These tests help to reduce obvious breakages in the core module by
making sure that there are no interpreter related bugs. In a language
like C one wouldn't need these kinds of tests because the compiler would
catch them.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
dmesg_tests.py: Add initializer tests

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
summary_tests.py: Add initializer test for Summary

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
framework/tests/utils.py: Add module for utility functions

As the framework tests grow the number of duplicated functions in each
module also grow. Adding a utilities module to store those shared
functions in makes a lot of sense.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
core_tests.py: Add test for parse_listfile

This adds some tests for core.parse_listfile, some of these tests
currently fail, and are addressed later in the series

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
framework/core.py: fix parse_listfile

This fixes the broken tests in the last patch. It's a trivial change,
instead of just stripping trailing newlines strip all leading and
trailing whitespace characters.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
summary_tests.py: Move resultsfiles function to utils

This is going to be needed in core_tests, so lets put it in the shared
module.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
core_tests.py: Add tests for load_results_folder

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
core_tests.py: Add tests for TestResult

Specifically TestResult should convert a 'result' value into a
status.Status derived object.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
python: Convert from print statement to function

One of the biggest changes between python2 and python3 is that print
changed from a statement to a function. This change was backported to
python2 in the __future__ module, and this patch makes that conversation
to ease the transition from python2 to python3.

v2: - Replace dict comprehension with dict(generator). This is for
      python 2.6 compatability

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
ARB_explicit_uniform_location: preprocessor define test

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
ARB_explicit_uniform_location: location qualifier compiler test

Test checks that shaders using a location qualifier for uniform
variable compile succesfully.

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
ARB_explicit_uniform_location: GL_MAX_UNIFORM_LOCATIONS enum test

Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
glx: Add a testcase for GLX_EXT_buffer_age

v2: Indent according to piglit style, fix copyright message, drop
    redundant glReadBuffer() setting. (changes by anholt).

Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Adel Gadllah <adel.gadllah@gmail.com> (v2)
glx-buffer-age: Test each frame rendered, and render enough frames.

An implementation might have up to 4 (!) buffers in its queue, so
render a bunch of frames and make sure each frame has a valid age.

Reviewed-by: Adel Gadllah <adel.gadllah@gmail.com>
glx-buffer-age: Test with vblank_mode=0.

Revealed a problem with the Mesa patches.  Interestingly,
glXSwapIntervalMESA(0) doesn't produce the same behavior.

Reviewed-by: Adel Gadllah <adel.gadllah@gmail.com>