This project is a fork of the piglit.git project. If you have that one already cloned locally, you can use
git clone --reference /path/to/your/piglit.git/incarnation mirror_URL
to save bandwidth during cloning.
 
descriptionnone
ownerhramrach@centrum.cz
last changeThu, 2 Sep 2010 02:43:50 +0000 (1 19:43 -0700)
content tags
add:
README
Piglit
------
1. About
2. Setup
3. How to run tests
4. Available test sets
5. How to write tests
6. Todo


1. About
--------

Piglit is a collection of automated tests for OpenGL implementations.

The goal of Piglit is to help improve the quality of open source
OpenGL drivers by providing developers with a simple means to
perform regression tests.

The original tests have been taken from
- Glean ( http://glean.sf.net/ ) and
- Mesa ( http://www.mesa3d.org/ )


2. Setup
--------

First of all, you need to make sure that the following are installed:

  - Python 2.4 or greater
  - cmake (http://www.cmake.org)
  - GL, glu and glut libraries and development packages (i.e. headers)
  - X11 libraries and development packages (i.e. headers)
  - libpng, libtiff and related development packages (i.e. headers)

Now configure the build system:

  $ ccmake .

This will start cmake's configuration tool, just follow the onscreen
instructions. The default settings should be fine, but I recommend you:
 - Press 'c' once (this will also check for dependencies) and then
 - Set "CMAKE_BUILD_TYPE" to "Debug"
Now you can press 'c' again and then 'g' to generate the build system.
Now build everything:

  $ make



3. How to run tests
-------------------

Make sure that everything is set up correctly:

  $ ./piglit-run.py tests/sanity.tests results/sanity.results

This will run some minimal tests. Use

  $ ./piglit-run.py

to learn more about the command's syntax. Have a look into the tests/
directory to see what test profiles are available:

  $ cd tests
  $ ls *.tests
     ...
  $ cd ..

See also section 4.

To create some nice formatted test summaries, run

  $ ./piglit-summary-html.py summary/sanity results/sanity.results

Hint: You can combine multiple test results into a single summary.
      During development, you can use this to watch for regressions:

  $ ./piglit-summary-html.py summary/compare results/baseline.results results/current.results

      You can combine as many testruns as you want this way(in theory;
      the HTML layout becomes awkward when the number of testruns increases)

Have a look at the results with a browser:

  $ xdg-open summary/sanity/index.html

The summary shows the 'status' of a test:

 pass  This test has completed successfully.

 warn  The test completed successfully, but something unexpected happened.
       Look at the details for more information.

 fail  The test failed.

 skip  The test was skipped.

[Note: Once performance tests are implemented, 'fail' will mean that the test
       rendered incorrectly or didn't complete, while 'warn' will indicate a
       performance regression]
[Note: For performance tests, result and status will be different concepts.
       While status is always restricted to one of the four values above,
       the result can contain a performance number like frames per second]


4. Available test sets
----------------------

Test sets are specified as Python scripts in the tests directory.
The following test sets are currently available:

sanity.tests
    This suite contains minimal sanity tests. These tests must
    pass, otherwise the other tests will not generate reliable results.

all.tests
    This suite contains all tests.

quick.tests
    Run all tests, but cut down significantly on their runtime
    (and thus on the number of problems they can find).
    In particular, this runs Glean with the --quick option, which
    reduces the number of visuals and state combinations tested.

radeon.tests
r300.tests
r500.tests
    These test suites are adaptations of all.tests, with some tweaks
    to account for hardware limitations in Radeon chips.


5. How to write tests
---------------------

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.

All new tests must be added to the all.tests 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.

 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.

Rules of thumb:
  Test process that exit with a nonzero returncode are considered to have
  failed.

  Output on stderr causes a warning.


6. Todo
-------

 Get automated tests into widespread use ;)

 Automate and integrate tests and demos from Mesa
   Add code that automatically tests whether the test has rendered correctly

 Performance regression tests
   Ideally, this should be done by summarizing / comparing a history of
   test results
   Note that while some small artificial micro-benchmark could be added to
   Piglit, the Phoronix test suite is probably a better place for
   realistic performance testing.
shortlog
2010-09-02 Kenneth GraunkeAdd more structure constructor tests.master
2010-09-01 Kenneth GraunkeAdd some GLSL 1.20 matrix-from-matrix constructor tests.
2010-09-01 Vinson Leedepth-clamp-range: Use glColor3fv with a 3-argument...
2010-09-01 Vinson Leeall.tests: Correct glsl-fs-discard-02 to be a plain...
2010-09-01 Eric Anholtglsl-fs-dot-vec2-2: New test for a bug in the 965 driver.
2010-09-01 Ian RomanickAdd execution tests for the all function
2010-09-01 Ian Romanickglslparsertest: Add a test for local function declarati...
2010-09-01 Ian Romanickglslparsertest: Add several array-of-structure construc...
2010-09-01 Ian RomanickAdd shader tests for the abs function
2010-08-31 Eric Anholtglsl-fs-discard-02: Test that early depth writes don...
2010-08-31 Eric Anholtocclusion-query-discard: Test that "discard" frags...
2010-08-31 Kenneth GraunkeActually commit the file.
2010-08-31 Kenneth GraunkeAdd a negative test for bitwise not used in a larger...
2010-08-31 Eric Anholtglsl-uniform-linking-1: New test for a failure in unifo...
2010-08-31 Kenneth GraunkeAdd a shader runner test that overrides a builtin function.
2010-08-30 Ian RomanickTweak glsl-array-varying-01 so no adjacent varyings...
...
tags
15 years ago piglit-v1
heads
13 years ago winname
13 years ago wip
13 years ago master