arb_explicit_location: Add tests without the extension enabled

Make sure that the correct error is generated.  The second 1.30 version
and the 1.40 of the test ensure that layout() exists at all by using a
different extension (or GLSL version).

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
framework: Fix mis-indentation of the test changes computation.

b66f365f23a5b6b31a1b3f6c5bb13d3983de2443 appears to have accidentally
indented this code, so that we would calculate the changes from the
1st to 2nd result again when looking at the 3rd result.

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: Make the set of tests per page always be a set.

Starting with appending to the dictionary entry as a list, then making
the entry into a set later is pretty weird.  Just always use a set.

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
glsl-1.50: Test compilation of interface blocks containing unsized arrays.

Although it's not explicitly stated in the GLSL 1.50 spec, unsized
arrays are allowed in interface blocks.

section 1.2.3 (Changes from revision 5 of version 1.5) of the GLSL
1.50 spec says:

    * Completed full update to grammar section.  Tested spec examples
      against it:

      ...

      * add unsized arrays for block members

And section 7.1 (Vertex and Geometry Shader Special Variables)
includes an unsized array in the built-in gl_PerVertex interface
block:

    out gl_PerVertex {
        vec4 gl_Position;
        float gl_PointSize;
        float gl_ClipDistance[];
    };

Furthermore, GLSL 4.30 contains an example of an unsized array
occurring inside an interface block.  From section 4.3.9 (Interface
Blocks):

    uniform Transform {  // API uses "Transform[2]" to refer to instance 2
        mat4           ModelViewMatrix;
        mat4           ModelViewProjectionMatrix;
        vec4           a[];  // array will get implicitly sized
        float          Deformation;
    } transforms[4];

This patch adds compiler tests to verify that in and out blocks can
contain unsized arrays.

Verified using the NVIDIA proprietary driver for Linux.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
framework_tests/summary.py: Tests Summary.py's assignment of statues

This code tests the way Summary.py assigns statuses to tests.
Specifically it tests regressions, fixes, changes, and problems,
assuring that only the correct permutations of these tests are added to
the list.

It uses python's builtin unittest framework, and a magical decorator to
limit code duplication.

This already reveals ~20 problems in the current implementation

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
piglit-framework-tests.py: Adds a utility for running piglit unit tests

This program gives the option to run the tests. These tests are meant to
test internal features of the piglit framework. Currently there are only
tests for the summary module's handling of regressions, fixes, changes,
and problems.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/summary.py: Fix problems with status handling

Fixes status hanlding (fixes, regressions, changes) to be compliant with
the status handling in framework_tests/summary.py. Mainly this addresses
notrun -> * and * -> notrun, as well as a few corner cases.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
status.py: Adds a new status class and subclasses

These status classes are intended to replace the string statuses
currently used by piglit summary.

They give a couple of very nice advantages, first, they can be directly
compared to each other to determine whether a status is worse than
another status. These statuses can also be compared to any object
implementing the __int__ magic method.

This will allow us to remove a number of special functions for sorting
representations of statuses.

v2: - Use larger numbers for the statuses, this should make adding
      addtional statuses easier, since there is room between the
      statuses.
    - Add a class for the "Not Run" status
    - Adds classes for dmesg-warn and dmesg-fail
    - Change statuses to match the standard set in the framework test

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
status: Make use of the status objects

This adds code in framework/summary.py and framework/core.py to make use
of the status classes in status.py. This makes comparisons between
statuses much simpler and cleaner

v2: - Instead of importing all of the classes into the local namespace
      use the ``import ... as'' syntax. This means that if additional
      statuses are added they can easily be used without updating
      imports
    - Correct the sorting for fixes and regressions
    - Fix bug in TestResult that caused Fail, Warn, and Crash to be
      assigned the wrong status Objects
    - Adds support for dmesg-warn and dmesg-fail

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary: Remove optimization with no impact

Generating these lists is rather trivial, so just generate them all the
time.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary: Fold __generate_lists into __init__

Since there is nothign special about __generate_lists anymore (it just
does the same thing all the time), just fold it back into the
constructor and save on having to call it.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>