KHR_debug: test PushDebugGroup() and PopDebugGroup()

V3:
- moved piglit_display to end of the file
- made while() more readable
- added check for max values of implementation
- to avoid getting messages we are not interested in
 test_push_pop_debug_group now only filters in the message types we want

v2:
- add in subtest I accidently removed when tidying the code

Pass: Intel i965 Mesa

Fail: AMD Radeon HD 6670 - Catalyst 13.251
Catalyst doesnt accept a -1 pararmeter when it should

Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au>
Reviewed-by: Fabian Bieler <fabianbieler@fastmail.fm>
khr_debug-push-pop-group: Use constant array sizes.

MSVC doesn't support VLAs.
framework/status.py: Update some docstrings

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/tests/status_tests.py: add initialization tests

Just a few simple tests to ensure that the various status classes
initialize.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/status.py: Convert from NotImplementedError to ABCMeta

Using pythons __metaclass__ = abc.ABCMeta allows us to set the abstract
Status class's __init__ to pass instead of raise NotImplementedError,
but still raise an exception if there is an attempt initialize it. This
reduces boilerplate by removing the need for each subclass to override
the __init__ method.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/tests/status.py: Add test for status in list syntax

Currently a comparison like this will raise an error:
framework.status.Pass() in ['pass']

This patch adds a test for this bug

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/status.py: Fix bug in Status.__eq__

Because Status.__eq__ didn't have the ability to compare str or unicode
instances, using Pass() in ['pass'] would raise an exception. With this
patch that is no longer the case, and that syntax works fine.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/tests/status_tests.py: remove equivalency tests

These tests are not actually relevant, they were for testing the
definition of a docstring that was incorrect. That docstring was
updated, but the corresponding tests where not completely removed, which
means these tests ended up testing pass == pass, skip == skip, etc. Not
very useful

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/tests/status_tests.py: Pretty up the output

This makes the changes cosmetically more pleasing, but doesn't affect
the functionality of the tests at all.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
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>
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>
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>
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>
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>
dmesg_tests.py: Add initializer tests

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary_tests.py: Add initializer test for Summary

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.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>
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>
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>
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>