summaryrefslogtreecommitdiff
path: root/piglit
AgeCommit message (Collapse)AuthorFilesLines
2016-10-26piglit: Only catch parsed.func AttributeErrorDylan Baker1-2/+2
Fixes catching AttributeErrors it shouldn't. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Tested-by: Mark Janes <mark.a.janes@intel.com> Tested-by: Michel Dänzer <michel.daenzer@amd.com>
2016-08-29framework: Fix piglit-commandDylan Baker1-1/+5
This actually fixes the help message for the piglit command, but doesn't break using other commands, like the last patch. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-08-26Revert "piglit: Print help instead of excepting if no arguments are given"Dylan Baker1-1/+0
This reverts commit da99d336fa6dedb378affdf50dea163939e8c8a1. Which completely breaks the ./piglit command. I'll try a different approach. sigh Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-25piglit: Print help instead of excepting if no arguments are givenDylan Baker1-0/+1
This fixes a small bug that causes piglit to print an exception when ./piglit is called with no arguments. It will, with this patch, print the help message and exit. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2016-05-10framework: Add piglit-print-commands to the piglit commandDylan Baker1-0/+5
This is mostly just restructuring code so that piglit-print-command works like the other piglit-* commands, calling back into the same module that the main piglit application does. This allows the addition of the 'piglit print-cmds' for those who prefer that (or who use an installed piglit and don't have piglit-*. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2016-04-16piglit: Fix spelling mistakesEric Engestrom1-1/+1
Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com> Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2016-03-28framework: fix unicode command line arguments with python 2.xDylan Baker1-4/+13
In python 3.x input is unicode by default, but in python 2.x everything is a byte string by default (which assumes ascii encoding), this includes input. Currently when running with python 3.x it's possible to use unicode for input, but python 2.x will choke when it tries to encode the bytes into unicode using the ascii codec. For example, this will work with python 3.x but no with python 2.x: (The character is yuki, Japanese for snow, if memory serves) ./piglit run quick 雪 -c This is actually pretty easy to fix, when running with python 2.x decode each input element into unicode using utf-8 as soon as the input is received. This fixes the above example to work. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Tested-by: Marek Olšák <marek.olsak@amd.com>
2016-02-08piglit: change piglit command to python 3Dylan Baker1-1/+1
This makes the piglit executable run with python 3 instead of python 2, the legacy scripts (piglit-run, piglit-summary-html, etc) still run with python 2. The goal of this series has been to make python 2.7 a fallback rather than a main option. If one wants to use python 2, it's a trivial change to the python script to get that. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2015-11-24framework: Add support for feature readiness.Feceoru, Gabriel1-0/+4
This adds a new "summary feature" command to piglit which creates a HTML table with the feature x DUT status (useful for multiple features, multiple DUTs). Another use case is the feature status for subsequent test results (depending on the meaning of that test result - DUT or build) A feature readiness is defined by the piglit regexp which selects the tests relevant for that feature and the acceptance percentage threshold (pass rate). It requires an input json file containing the list of features, in the following format (this is just an example): { "glsl" : { "include_tests" : "glsl", "exclude_tests" : "", "target_rate" : 90 }, "arb" : { "include_tests" : "arb_gpu", "exclude_tests" : "", "target_rate" : 10 } } v3: Changed json rate to int instead of string Applied other review comments v2: Apply review comments (Dylan, Thomas) Fixed 2nd round of review comments Signed-off-by: Gabriel Feceoru <gabriel.feceoru@intel.com> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
2015-03-23summary: Add an aggregate functionDylan Baker1-0/+4
This summarizer can be used to aggregate a set of individual tests together into a single results file. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com>
2015-01-07Change placment of the orientation of sys.pathMatěj Cepl1-2/+2
The modification should to the beginning of sys.path not to the end, because otherwise it hits every package which has tests submodule (which seems to be like all of them ;)). The first change is just to make abs_libdir more pretty. Signed-off-by: Matěj Cepl <mcepl@redhat.com> Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-11-21framework/summary/junit: Remove.José Fonseca1-4/+0
Deprecated by JUnit backend. Tested with json backend + summary html to ensure nothing's broken. Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-10-14framework: Move tests derived classes into a packageDylan Baker1-1/+1
This moves all of the classes that derive from Test into a package called test. This patch looks very large, but is mostly just moving files around and changing imports to account for this. So why all of this code churn? The big advantage is that through __init__.py magic there is one module to be imported, framework.test. This module contains all of the public classes, functions, and constants, in one place while hiding the rest, but allowing them to be accessed explicitly. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-10-01summary: add a csv output optionThomas Wood1-0/+4
v2: small style fix (Dylan Baker) Signed-off-by: Thomas Wood <thomas.wood@intel.com> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-08-01piglit(script): Fix module search pathChad Versace1-31/+68
See the bug description in the previous commit, with subject "self-tests: Test that installed piglit script sets sys.path correctly". Test: self-tests/test-installed-piglit-script-imports-correct-framework-module --force . Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
2014-06-23framework: Don't rely on os.environ so muchDylan Baker1-9/+6
There are some problems with using os.environ, all of which are caused shell child-variable relationships. Most of these problems are easy to solve, since we don't actually need to have environment variables set except during test execution, and that can be passed to Popen (or it's helper wrappers). This gives us much better assurance that things are happening in the way we expect. v7: - use itertools.chain instead of nested iterations - fix piglit.conf default case - reorder environment overrides so that variables passed in by the user (or exported) override the builtin values instead of vice-versa Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-06-19python: change she-bang to python2Dylan Baker1-1/+1
This replaces #!/usr/bin/env python with #!/usr/bin/env python2, which fixes the build on archlinux. This has been proposed before, but at that time debian didn't provide a python2 executable, so it would break debian. Debian sid as of today provides python2. v2: - fix piglit as well Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-06-16piglit (executable): Make PIGLIT_SOURCE_DIR detection more robustDylan Baker1-12/+33
The initial implementation I committed was a bit hackish and I knew it at the time, but it seemed to work for all the cases that I tested. However, there were corner cases. The biggest of these cases is problems running out of tree with piglit built in tree. ex: src/piglit/piglit run ... This patch makes the handling more robust by explicitly searching for three distinct cases: 1) piglit is run from the source dir, built in the source dir 2) piglit is run from outside the source dir, built in the source dir 3) piglit has been installed out of tree I have tested all three of these cases, and case 3 if piglit is installed as piglit.py. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2014-06-04cmake: Install piglit as piglit.py on Windows.José Fonseca1-0/+4
Windows doesn't support #!. Instead it determines how to execute scripts based on their file extensions. Reviewed-by: Brian Paul <brianp@vmware.com>
2014-05-09piglit: Don't override user's definition of the PIGLIT_SOURCE_DIR env ↵Tom Stellard1-1/+2
variable v2 reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-05-06piglit: Add a toplevel piglit commandDylan Baker1-0/+88
This uses the functions created by the last commit to create a all-in-one piglit command. It uses argparse to parse partial commands and provide help for those functions. It is also capable of handling all of the black magic for setting the python sys.path and setting the PIGLIT_SOURCE_DIR environment variable. v2: - Allow the name of the program to not be piglit (example: piglit-20140101) - Remove unused check from cmake - Install piglit as piglit${PIGLIT_INSTALL_VERSION}; when this variable is unset piglit will be installed simply as 'piglit' v3: - split "../lib" into "..", "lib" in os.path.join() Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>