summary.py: Fix empty generation of problems, changes, etc

The list comprehension can be further refined to be fixed, but the
resulting code is much more difficult to read than the try/except
statement.

This reverts commit aaae592490a6459aba52bc306b819a7fcbaa3008.
This reverts commit 450935b06f8508d3f4177fe7336e3bdee3973a9e.

Tested-by: Paul Berry <stereotype441@gmail.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
cmake: fix out of tree Installation and package generation.

When building and installing out of source tree the generated
tests are not installed. This commit fixes that.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cmake: add *.geom to the list of installed files.

*.geom files are the shader files used for testing geometry
shaders.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cmake: add *.cl to the list of installed generated tests.

Files with the extension ".cl" are usually used for OpenCL and
this installs all .cl files that are in the generated_tests
folder when either making a package or actually installing the
tests on a system.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cmake: ignore the "CMakeFiles" folder in generated_tests installer

This is an Automatically generated file that is not used by any
test and only appears during build.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
config.h.in: add define for HAVE_STRNDUP

This fixes compile problems on various systems where strndup
can be found but the HAVE_STRNDUP define is not being set.

V2: Made the changes that Petri Latvala suggested. However the
    exact line for the define of HAVE_STRNDUP needed to be
    placed next to the other function defines in config.h.in

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
piglit-util-gl-common: Add Function to clear extensions list.

The default handling of Extension fall backs does not work in specific
cases where the list of supported extensions changes. The list of
extensions for a Core profile may be different from the same
context created using a Compatibility profile.

V2: applied the changes suggested by Chad to improve this function.
    In my previous submission of this I forgot to make note of this.
    This commit changed the new function to:

    piglit_gl_reinitialize_extensions

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
util/waffle: reinitialize extensions

Implements reinitialization on waffle based contexts to allow context
fallbacks to work as intended.

v2: applied the changes that Chad suggested.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Install *.txt files

All asmparsertest files end in '*.txt'. And the minmax tests require the
'mininum-maximums.txt' files. If we accidentally install any unneeded
'*.txt' files, no harm is done.

Add regexes to exclude installation of CMakeLists.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Install piglit-summary.py

All other toplevel python scripts were installed. This was the only
forgotten one.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
documentation: Remove directory

This directory contained two files:
  - GPL-2: A copy of the GPL-2 license. This file duplicates
    licenses/GPL-2.
  - build-results.sh: An ancient script superseded by Piglit's Python
    scripts.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Use simplejson if available

simplejson is a native code version of the json module in python
(the json module in core python implements the simplejson api), which
means that simplejson can be used in place of the json module, but it
performs much better. This patch attempts to load simplejson, and falls
back to normal json if it fails.

In the summary path on a single run of quick.tests, simplejson is about
3-4 seconds faster than json, ~7 seconds vs ~11 seconds.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Check that transform feedback size/type comes from gs, not vs.

When the current program has both a geometry shader and a vertex
shader, transform feedback needs to link with the geometry shader.
This test verifies that the type and size of the varyings captured by
transform feedback match their declarations in the geometry shader,
even if there are vertex shader outputs with the same names and
different types.

The test exercises one built-in shader output (gl_ClipDistance) and
one user-defined shader output.
Test that the fs gl_PrimitiveID input works even when there's no gs.

For i965/gen7 hardware, the driver has to go to extra work to make
gl_PrimitiveID work in the case where there is no geometry shader.  So
we need a separate test to make sure that works properly.
Test interpolation qualifiers inside of interface blocks.

Validated using the NVIDIA proprietary driver for Linux (version
313.18).
Test the "centroid" qualifier inside of interface blocks.

Validated using the NVIDIA proprietary driver for Linux (version
313.18).
Fix invalid gs qualifier "layout(triangles) out" in a few tests.

"triangles" is not a valid geometry shader output primitive type.
"triangle_strip" must be used instead.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Escape HTML output when generating test result pages.

If a test generates output containing '<', '>', or '&', we need to
HTML escape it so that the web browser doesn't interpret it as
containing HTML tags.

While we're at it, go ahead and HTML escape the traceback and dmesg
outputs too.

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
gs: Test that gl_MaxGeometryInputComponents can actually be achieved.
gs: Fix geometry layout case insensitivity tests.

These tests use check_link: true, which means that they each need to
specify a complete set of geometry shader layout qualifiers in order
to pass.