util/x11: Propagate window resize events to piglit_width/height

When I switched Piglit from GLUT to Waffle, I broke detection of X11
window resizes. When the user resized the window, Piglit called
piglit_display() but neglected to update piglit_width/height.

This patch ensures that Piglit updates piglit_width/height correctly.

(It's amazing that it took this long for anyone to fix it. People must
rarely resize Piglit windows).

Reviewed-and-tested-by: Jordan Justen <jordan.l.justen@intel.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Detect if system has POSIX MONOTONIC clocks

Set CMake cache var PIGLIT_HAS_POSIX_CLOCK_MONOTONIC if
clock_gettime() is available with CLOCK_MONOTONIC.

Tests that need to measure time, such as GL_ARB_sync tests, will use
Posix clocks.

v2: (jordan.l.justen@intel.com)
 * PIGLIT_HAS_POSIX_CLOCKS => PIGLIT_HAS_POSIX_CLOCK_MONOTONIC
 * Link with librt. On older systems, clocks_gettime may be in
   librt rather than glibc.

CC: Nicholas Mack <nichmack@gmail.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
Cc: Chad Versace <chad.versace@linux.intel.com>
Cc: Ian Romanick <idr@freedesktop.org>
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
piglit-util: add piglit_get_microseconds

v2:
 * Use Chad's cmake detection
 * return value is signed, and a negative indicates an error

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
shader_runner: support SIZE in requirement section of a shader_test

If a test requires a certain size, it adds 'SIZE Width Height' to
the requirements section. Width and Height must be unsigned
integers.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
glsl-1.50: add size requirements to 3 shader_test tests

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
arb_seamless_cube_map: Fix a spurious test fail on non-GLSL-130 drivers.

Reviewed-by: Matt Turner <mattst88@gmail.com>
depthstencil-render-miplevels: Fix stencil drawing for width % 4 != 0.

It didn't affect test results, since we don't probe this data and it's
only in manual mode, but it did cause buffer overflow.

Reviewed-by: Paul Berry <stereotype441@gmail.com>
summary.py: Remove unused modules

There were two modules being imported but not used: string, and json.
This patch removes them.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Replace ``import from'' syntax with import

Don't clutter the namespace needlessly, just import the full module and
use it.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Replace try/except with a list comprehension

This is equivalent but simpler.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Replace Result class with load_result function

This is groundwork for getting us down to one loader for results.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
TestrunResult: Merge parseFile into the constructor

This adds an optional argument to the constructor for a results file.
This fixes a race condition where a TestrunResult is created, some
entries are added, and then parseFile is called, which overwrites the
contents of the TestrunResult.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Combine summary.load_results into core.loadTestResults

This reduces code duplication, since these two functions were very
similar to begin with.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
rename core.loadTestResults to core.load_results

This is in keeping with PEP8 sytle guidelines for function names:
"Function names should be lowercase, with words separated by underscores
as necessary to improve readability."

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: minor style changes

This changes some camelCase variables to lowercase underscore separated
variables per PEP8, and a few other minor style nits. There are no
functional changes.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: rename generate* methods

Fix style issues with camel case method names.

v2: - lowercase HTML to html

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Use with open(...) as syntax

This is the commonly accepted "right way" in python.

Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Fix regression in Summary class

Commit 450935b06f converts a try/except black into a list comprehension,
this comprehension works for cases where a single test result is fed to
it, but in cases where more than 1 it fails with a KeyError. This patch
corrects that by using a second get() method to catch this KeyError

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
tests: Add GL_ARB_texture_mirror_clamp_to_edge to texturing test.

Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
cl: Add test opencv-merge-hist