gtf: Update arguments for current GLES conformance from upstream.

They switched the default for imagefileio, so they renamed the option
(while leaving out support for the old option, making our tests fail).
This happened some time between our last ES2 drop, and ES3.  Since the
current stuff still contains all the ES2 tests, we don't need support
for the old version.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
gtf: Parse either the old or new GLES conformance suite output.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
glsl-1.30: add test for default in switch not after all case statements

By the looks of it "default" is not required to appear as last statement
in a switch expression, and c rules should be followed (which is probably
a mess to implement thanks to fallthrough).
Seems to fail with mesa glsl compiler (at least with tgsi translation).

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
cl: Fix Windows build.

Fixes two trivial issues:

- on Windows large integers like 0xff000001 are not `int` objects, but
  rather `long` objects, so accept both types.

- and the error message caused exception

   TypeError: cannot concatenate 'str' and 'long' objects
Rework the PIGLIT_GL_VISUAL flags, fix RGB vs RGBA vs ALPHA confusion

Changes:
- SINGLE is removed, because its value was 0
- ALPHA is removed, because it becomes redundant with this change
- RGB asks for an RGB visual
- RGBA asks for an RGBA visual
- if RGB and RGBA are unset, it asks for a visual without RGB(A)

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

v2: fix glut
framework: Fix "inconsistent use of tabs and spaces in indentation" warnings.

These warnings have become fatal errors in Python 3.x.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
framework: Consistently use Python 2.6+ syntax for exception objects.

The old syntax is no longer supported in Python 3.x.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
framework: Consistently use Python 2.2+ syntax for dictionary key checks.

The old syntax is no longer supported in Python 3.x.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
framework: Port from string.find to str.find (required by python 3.x)

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
framework: Don't use automatic tuple parameter unpacking.

It is no longer supported in Python 3.x, but unpacking the tuple parameter
inside the function works just fine on both old and new Python versions.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
framework: Catch "No such file or directory" by errno, not strerr.

In Python 3.x the strerr is more verbose, and thus fails the equals
test.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
util: remove old comment about GLUT vs PIGLIT flags

Pointed out by Chad Versace.
arb_internalformat_query-minmax: initialise buffer_size_in_elements

Since we never bail on the first failure in this test, we can return
from the GetInternalformativ without buffer_size_in_elements ever
being touched, due to misc GL error (mesa_base_fbo_format fails),
this then causes us to loop a lot later and print error messages
than make piglit eat all the pies^WRAM.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
ARB_ubo/maxuniformblocksize: unmap buffer before drawing with it

From the description of glMapBuffer:
"A mapped data store must be unmapped with glUnmapBuffer before its
buffer object is used.
Otherwise an error will be generated by any GL command that
attempts to dereference the buffer object's data store."
arb_texture_multisample: add test to check sample positions v3

v3: Made more readable, report observed sample positions of failure.
add a simple glinfo "test" program

When doing a full piglit run it's helpful to have all the OpenGL
driver version/vendor/extension info.  The piglit framework tries
to run glxinfo/wglinfo and include the output in the results file,
but sometimes those programs aren't installed.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by Tom Gall <tom.gall@linaro.org>
add new piglit-summary.py script for printing summaries of results file(s)

If only one result file is specified, just print all the tests
followed by the outcome.  For example:

fbo/FBO blit from missing attachment: pass
fbo/FBO blit to missing attachment: fail
fbo/fbo-1d: pass
fbo/fbo-3d: crash
[...]

If multiple result files are specified, we'll print pass/fail/etc
for each file.  Example:

fbo/FBO blit from missing attachment: pass pass
fbo/FBO blit to missing attachment: fail pass
[...]

If -s (--summary) is specified, only print a summary of the number of
passes, fails, crashes, etc.

if -d (-diff) is specified with multipe result files, only print the
tests which had different outcomes.  Good for spotting regressions.

v2: fix -l option issues

Reviewed-by: José Fonseca <jfonseca@vmware.com>
cl: Fix char/short test names

Several tests still had '%' in the test names, which Tom made an illegal
character a ways back.

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
cl: Add test of get_global_size(dim)

Based on the test cases for get_global_id

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>
piglit-summary.py: remove unused imports

As suggested by Dylan Baker.