dlist-beginend: Fix up subtest names.

For better or worse, the "/" in a test name is interpreted as a group
separator.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
util: Bind fixed attrib locations for "piglit_vertex" and "piglit_texcoord"

This will let us easily use piglit_draw_rect_tex() in ES-only shader
tests, and is a step toward having the same shaders usable between ES
and desktop without going to full VBO setup in shader_runner.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
util: Make an even simpler interface for building simple shaders.

The previous piglit_link_simple_program() interface required you to
compile your shaders up front, and tests routinely have issues with
either not checking that the component shaders compiled, or not
checking that the program linked, and then confusingly fail later in
the test.  This one enforces that the program actually compiled and
linked before continuing, so you don't need to worry about error
checking.

Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
varying-struct-centroid: Convert to new piglit_build_simple_program().

I'm not intentionally singling this test out (which would have tried
to continue if a shader stage failed to compile), it's just the first
thing I looked at when I was going to crib code for a new GLES test,
and decided to go work on new util functions instead.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
util: egl: support for skipping unsupported extension tests

v2: Remove exit() call already implied by piglit_report_result()
    (review by Chad, change by anholt)

Signed-off-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
glsl-1.50: allow the same name for uniform and varying interface

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
shader_runner: program must be in use for vertex data upload

If the shader_test wants to upload vertex data, then we make
sure the program linked and is in use. If not, then the test
will fail.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
piglit-run.py: Fix Path resolution.

Path resolution should always be a resolved from relative path to absolute path.
This is to allow for distributed testing where you build a single copy of
piglit and then redistribute it over a network.

Signed-off-by: Kenney Phillis <kphillisjr@gmail.com>

v2: Correct whitespace errors
    Convert tabs to spaces
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/core.py: fix path resolution when loading test results.

This has two main improvements that can be seen.
1) Relative paths can be used in lists files. This works great since it means
that simpler scripts can be used to generate the list file itself.
2) Relative paths can be specified at all stages and it will not cause the
scripts to break

Signed-off-by: Kenney Phillis <kphillisjr@gmail.com>
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/summary.py: Replace Section heading with docstrings

The sections headings are not really that useful, but they might as well
be kept as class level docstrings instead of being thrown away.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/summary.py: Adds new summary class and two support classes

This new summary class (currently NewSummary), is a complete redesign of
the summary generation system. Much of the code in summary was not
commented, and also not clear as to what it was doing, making it very
difficult to maintain and even more difficult to improve. The other
problem with the code was architecturally it was clobbered together,
doing some of the work in the summary.py file, and some of the work in
the piglit-summary-html.py file.

The new summary class does all of it's work in the summary.py file, and
from an API point of view, in one class. The summary class uses it's
constructor to build lists of passes, failures, skips, problems, etc.
and then uses methods to generate output. The reference implementation
of that kind of method is for generating HTML, but in theory it could be
used to generate anything: XML, CSV lists, printed lists ala
piglit-summary, etc.

Also updates the .gitignore file to ignore some generated content
created by this class.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
templates: adds mako templates for new summary code

Adds the actual templates used to by the new mako based summary code.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
piglit-summary-py: Use the new summary class to generate HTML

Drops almost all of the code used in this file, all of that
functionality is now handled in the summary class. Instead, the majority
of this file is just the argparse instance, and a few short lines
calling the new summary class.

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

These template files are no longer used, and so they should be removed

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
templates/index.css: make some css more exclusive

Change the div:nth-child for operating on everything except head to only
working on group. This is lays groundwork for some other changes.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary: Build subdirectories for subtest result pages

With 10,000+ tests all living in the same folder it can be hard to
identify a single file, especially when trying to work with the HTML
generation itself. This patch changes the behavior so that each test
has a directory tree for the group results with tests under it (ie
spec/GLSL 1.0/foo/bar/test.html)

A side effect of this is that the group names of tests don't have to be
altered to create a valid name (since the slashes in the group names
just become the slashes in the folder structure) and this was the single
most expensive operation of HTML generation (about 1/3 of the total
time). This is a tidy little speedup.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
test_result.mako: Drop redundant status and result field

In the old summary code one was set equal to the other, and then
written. In order to produce the same output they were both brought over
to the mako code. But they're rather silly and worthless and only one
should be kept.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
HTML summary: Provides means to exclude generating test result files

This provides a switch and method for excluding the generation of the
test result HTML files (those that live under <testrun name>/). This
allows the user to trade some verbosity in the results for a significant
increase in generation speed. A run of quick.tests with all options
enabled takes ~5.5 seconds, with just pass and skip disabled it only
takes ~2.5 seconds. This only becomes more significant as more testsruns
are added the HTML page.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
HTML Summary: Don't generate empty pages

Previously every page (fixes, regressions, etc) was generated regardless
of whether there was anything on that page. That is simply silly, this
patch does a quick check and only generates pages that actually have
content, and add those pages to the link bar at the top of the page.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
summary.py: Change skip to N/A for tests not run

When comparing two test results the current behavior sets a status of
skip for tests that were not run in one set of results. This is
confusing and silly, so instead give them a status of N/A which gives a
clear understanding of what skipped, and what simply didn't run either
by exclusion or because it didn't exist yet.

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