summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Baker <dylanx.c.baker@intel.com>2014-10-17 15:24:37 -0700
committerDylan Baker <dylanx.c.baker@intel.com>2014-10-28 19:45:25 -0700
commit71e41624be6f840e2c144dad9d990c00ea9b591c (patch)
tree0b1eadd01f18b21a166f370a047f853927a01109
parent78775f3d67dc06ca5527447dda545810368fd83b (diff)
README: update test classes information
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r--README57
1 files changed, 42 insertions, 15 deletions
diff --git a/README b/README
index 1a56b6cdc..8672df800 100644
--- a/README
+++ b/README
@@ -294,28 +294,55 @@ Every test is run as a separate process. This minimizes the impact that
severe bugs like memory corruption have on the testing process.
Therefore, tests can be implemented in an arbitrary standalone language.
-I recommend C, C++ and Python, as these are the languages that are already
-used in Piglit.
+C is the prefered language for compiled tests, piglit also supports its own
+simple formats for test shaders and glsl parser input.
-All new tests must be added to the all.py profile. The test profiles
-are simply Python scripts. There are currently two supported test types:
-
- PlainExecTest
- This test starts a new process and watches the process output (stdout and
- stderr). Lines that start with "PIGLIT:" are collected and interpreted as
- a Python dictionary that contains test result details.
+All new tests must be added to the appropriate profile, all.py profile for
+OpenGL and cl.py for OpenCL. There are a few basic test classes supported by the
+python framework:
GleanTest
This is a test that is only used to integrate Glean tests
-Additional test types (e.g. for automatic image comparison) would have to
-be added to core.py.
+ PiglitBaseTest
+ A shared base class for all native piglit tests.
+
+ It starts each test as a subprocess, captures stdout and stderr, and waits
+ for the test to return.
+
+ It provides test timeouts by setting the instances 'timeout' attribute to an
+ integer > 0 which is the number of seconds the test should run.
+
+ It interprets output by reading stdout and looking for 'PIGLIT: ' in the
+ output, and then reading any trailing characters as well formed json
+ returning the test result.
+
+ This is a base clas and shouldn't be used directly, but provides an
+ explination of the bahvior of the following classes
+
+ PiglitGLTest
+ A test class for native piglit OpenGL tests.
+
+ In addition to the properties of PiglitBaseTest it provides a mechanism for
+ detecting test window resizes and rerunning tests as well as keyword
+ arguments for platform requirements.
+
+ PiglitCLTest
+ A test class for native piglit OpenCL tests.
+
+ It currently provides no specail features
+
+ GLSLParserTest
+ A class for testing a glsl parser.
+
+ It is generally unecissary to call this class directly as it uses a helper
+ function to search directories for tests
-Rules of thumb:
- Test process that exit with a nonzero returncode are considered to have
- failed.
+ ShaderTest
+ A class for testing using OpenGL shaders
- Output on stderr causes a warning.
+ It is generally unecissary to call this class directly as it uses a helper
+ function to search directories for tests
6. Todo