framework: Dump the result of 'uname -a' in the report

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
tests/igt.py: add support for reading the test list from the file system

Signed-off-by: Thomas Wood <thomas.wood@intel.com>
cl: Add cl-api-enqueue-copy-buffer-rect test
gtest: Use correct fuction signature for interpret_result

This was changed in fb6c545d880791f8e3057bbd86dd5cdf1bf3a3d3
and gtest.py was not updated.
util: Move MSVC's inline macro to piglit-util.h

So that it is more widely defined.

This should fix MSVC build.

Trivial change, which does not affect non-Windows builds in any way.
Allow setting a cwd to execute tests from.

Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/core.py: Add pre_run and post_run hooks to TestProfile

These hooks no-op in the default TestProfile class, however they are
intended to give versatility and power to external test suites, which
may have specific environment requirements, setup requirements, or
teardown requirements, by allowing them to subclass TestProfile and set
these methods.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
python: Add results_dir to TestProfile

This is needed specifically by XTS, but it might be useful for other
external suites that want to move files out of their runtime directories
into the saved directory. Specifically if those files are linked into
the summary.

v3: - Add the results_dir name definition to the constructor

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net> (v2)
tests/xts.py: Add a tests file for the X Test suite.

This adds support for running XTS from piglit.

This patch was original written by Eric Anholt, but I've cleaned it up
and reworked parts of it for upstreaming, and as a result I've attached
my name as the author so ``git bisect'' and ``git blame'' will send
angry mail my way instead of Eric's.

v2: - Don't break dmesg reporting
    - Use str.format consistently
    - populate profile after check for xtest symlink
v3: - rebase against master
    - fix spelling errors

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
fbo-depth-sample-compare: Eliminate dependency on glutSolidSphere.

Reviewed-by: Brian Paul <brianp@vmware.com>
util: Create core profiles with GLUT when supported by freeglut.

Handy until we have waffle everywhere.

Reviewed-by: Brian Paul <brianp@vmware.com>
junit: Results' stdout and stderr is now in `out` in `err`.
profile: Fix mixed concurrency runs

Currently we call join after initializing both of the pools, which means
that they run simultaneously. This patch fixes that by creating a helper
function which sets off the pool, closes it, and then joins it. This
fixes the problem by forcing each pool to run in series.

v2: - Fix typo that put all tests in a multithreaded pool
    - split lines differently for improved readability

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
framework/core.py: Remove unused imports and fix __all__

After profile was split out of the core module it's imports were not
removed. This has a small overhead cost and drive the code quality
checking tools crazy.

__all__ is a module name that controls the values exported when running
help() or pydoc. Setting these to reflect proper values helps python
tools to function better and makes the documentation accurate.

None of these changes affect running code at all.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/exectest.py: Fix a few pylint warnings

This removes some unreachable code, adds an name definition to the Test
constructor, and comments a bare except. There are only a couple of
cases where a bare except is appropriate, most of the time it is a
problem, but we are using one the few cases where it is okay, we're
logging all exceptions to a file.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/exectest.py: Use flyweight pattern for Test

This uses python's __slots__ attribute on Test. This limits the
attributes of the class to exclusively those defined by the __slots__
attribute. This saves memory since python doesn't need to allocate
additional memory for new attributes that might be added.

It is perfectly valid to extend this in a subclass by setting __slots__,
that list is appended to the lists in the parent classes, so only new
names need to be added.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework: put GleanTest class in exectest module

This is the first step to merging the builtin test classes into a single
module. Also fixes some problems with GleanTest.interpret_result()
framework/exectest.py: Actually pass *args and **kwags in GleanTest

GleanTest has accepted **kwargs for some time, but didn't actually pass
them to the super() call in it's constructor. This patch fixes that and
also adds *args. At the moment we don't take addition args for the
constructor, but we might at some point want to.
framework/exectest.py: Make glean_executable constant PEP8 compliant

Changes internally used glean_executable to _GLEAN_EXECUTABLE, this is in
keeping with python interface standards and PEP8.
framework: rename GleanTest.globalParams to GleanTest.GLOBAL_PARAMS

This is in keeping with PEP8

This commit generated via:
find . -name '*py' | xargs sed -i -e 's!globalParams!GLOBAL_PARAMS!g'

With manual cleanups in framework/tests/exectest_tests.py