cmake: Install under separate piglit directory

Install paths updated:
* $PREFIX/share/doc => $PREFIX/share/doc/piglit
* $PREFIX/lib => $PREFIX/lib/piglit/lib
* $PREFIX/bin => $PREFIX/lib/piglit/bin
* etc...

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
cmake: Add version suffix for install paths

If used, then piglit will be installed into a separate
path. For example, if '-DPIGLIT_INSTALL_VERSION=20140430'
was specified with cmake, then piglit would install
to $PREFIX/lib/piglit-20140430.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: move executable functions to modules

This moves piglit-run and piglit-resume main() functions to
framework.programs.run as run() and resume() respectively, and moves
piglit-summary-* to framework.programs.summary. It then creates
compatibility wrappers as piglit-*.py for the functions.

This is groundwork for a combined piglit interface. The original files
could not be imported directly since they have dash (-) in their name,
and python considers dash an illegal character for function, class, and
modules names, and python would raise an ImportError when attempting to
import one of them.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
piglit: Add a toplevel piglit command

This uses the functions created by the last commit to create a
all-in-one piglit command. It uses argparse to parse partial commands
and provide help for those functions.

It is also capable of handling all of the black magic for setting the
python sys.path and setting the PIGLIT_SOURCE_DIR environment variable.

v2: - Allow the name of the program to not be piglit (example:
      piglit-20140101)
    - Remove unused check from cmake
    - Install piglit as piglit${PIGLIT_INSTALL_VERSION}; when this
      variable is unset piglit will be installed simply as 'piglit'
v3: - split "../lib" into "..", "lib" in os.path.join()

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
framework/dmesg.py: add a filtering mechanism

Only update the test status if at least one of the lines in the dmesg
output matches the given regular expression.

v2: Style changes suggested by Ilia Mirkin and Dylan Baker
    Add a framework test for dmesg filtering

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
tests/igt.py: discard dmesg output that does not match certain keywords

v2: updated regular expression suggested by Daniel Vetter

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
tests/igt.py: check for pass or skip before timeout

Don't wait for the timeout thread if the process has already quit with
pass or skip status.

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
arb_seamless_cube_map/three-faces-average: remove hard-coded window/probe coords

Previously, the test would only pass with 150 x 150 window size.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
arb_viewport_array-render_scissor: fix probing for any window size

The float->int conversion can be sketchy for various window sizes.
Simply probe a slightly smaller rect region.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
glsl-1.50/execution/geometry: fix pixel probing for arbitrary window size

Probe a neighborhood of pixels to avoid missing the pixel in question.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
util: change default window size to 160 x 160

To avoid "Got spurious window resize" warnings and SKIP result
on Windows 8.  A while back we had changed the default window
size for Windows 7.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
etc1/etc2: move glViewport call to piglit_display(), use default window size

The initial version of this was suggested by Johney Guo.

Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
nv_conditional_render/blitframebuffer: remove unused 'red' variable

Trivial.
wrappers: Fix argument issue with new wrapper scripts

The new argument parsing wants the script name parameter
sys.argv[0] stripped off.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78421
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
util: Add include guards in piglit-log.h.

Oracle Solaris Studio does not support "#pragma once".

Fixes build error with Oracle Solaris Studio.

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
framework: bump cmake minimum requirement to 2.8.5

Commit dd1d13182bf61f1036c29ef7b4c244d3dae297a1 adds a requirement for a
feature added to cmake 2.8.5. This version of cmake was released in
July of 2011.

The only supported distribution not shipping cmake >= 2.8.5 is EL6,
however, the EPEL repository for EL provides a compatible version of
cmake.

bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78368
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
make_test_list.sh: Remove rotten file

This file has suffered from bit rot, and no one cared.
Remove old versions of make_tex_lod_tests.sh
remove old shell wrapper

This file was used before the new glsl parser was merged into mesa.
ARB_shader_texture_lod: Replace shell generator with python generator

This patch removes tests/spec/ARB_shader_texture_lod/compiler/*, which
is a shell script that generates a number of tests, and 47 generated
glsl parser tests.

It replaces them with a python generator (require less code than the
bash generator), that is run at build time by cmake. That means we don't
need to check these simple generated tests in VCS.

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