summaryrefslogtreecommitdiff
path: root/piglit-print-commands.py
AgeCommit message (Collapse)AuthorFilesLines
2015-01-10piglit-print-commands.py: PEP8 fixes.Vinson Lee1-5/+6
piglit-print-commands.py:41:32: E251 unexpected spaces around keyword / parameter equals piglit-print-commands.py:41:34: E251 unexpected spaces around keyword / parameter equals piglit-print-commands.py:42:31: E221 multiple spaces before operator piglit-print-commands.py:42:31: E251 unexpected spaces around keyword / parameter equals piglit-print-commands.py:42:34: E251 unexpected spaces around keyword / parameter equals piglit-print-commands.py:43:32: E251 unexpected spaces around keyword / parameter equals piglit-print-commands.py:43:34: E251 unexpected spaces around keyword / parameter equals piglit-print-commands.py:44:29: E221 multiple spaces before operator piglit-print-commands.py:44:29: E251 unexpected spaces around keyword / parameter equals piglit-print-commands.py:44:34: E251 unexpected spaces around keyword / parameter equals piglit-print-commands.py:44:80: E501 line too long (89 > 79 characters) piglit-print-commands.py:57:24: E128 continuation line under-indented for visual indent Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-10-28piglit-print-commands.py: Fix bug with test packageDylan Baker1-2/+1
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85079 Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2014-07-17piglit-print-commands: make sure piglit.conf is readThomas Wood1-0/+1
Some test profiles require configuration values from piglit.conf before they can enumerate the tests. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Reveiwed-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-06-23core.py: rename Environment to OptionsDylan Baker1-4/+3
Environment doesn't really describe what the class is (although, honestly it's a pretty bad class design), but Options comes much closer to what it is. v7: - update piglit-print-commands.py - replace instance name 'env' with 'opts' - rename Test.ENV to Test.OPTS 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-04-29Fix piglit-print-commands.pyShuang He1-1/+1
Signed-off-by: Shuang He <shuang.he@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78719 reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-05-13framework: rename profile.loadTestProfile to profile.load_test_profileDylan Baker1-1/+1
This is a more pythonic name for this method. This patch was created with the following shell command: find . -name '*py' | \ xargs sed -i -e 's!loadTestProfile!load_test_profile!g' Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-04-17framework: fix regression from 7d2f441Dylan Baker1-1/+2
There was one consumer of TestProfile related functions that wasn't converted, piglit-print-commands.py. This fix is trivial Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-04-03exectest.py: Merge Test and ExecTest into a single classDylan Baker1-2/+2
Rather than have 2 base classes, let's just have one. v2: - remove test that no longer is valid v3: - fix igt using ExecTest instead of Test - fix Test setting two different run methods - fix piglit-print-commands.py, which also relied on ExecTest Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-03-12python: Convert from print statement to functionDylan Baker1-1/+2
One of the biggest changes between python2 and python3 is that print changed from a statement to a function. This change was backported to python2 in the __future__ module, and this patch makes that conversation to ease the transition from python2 to python3. v2: - Replace dict comprehension with dict(generator). This is for python 2.6 compatability Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> (v1)
2014-01-28piglit-print-commands: Remove unused importsDylan Baker1-2/+0
2013-10-23Use simplejson if availableDylan Baker1-1/+0
simplejson is a native code version of the json module in python (the json module in core python implements the simplejson api), which means that simplejson can be used in place of the json module, but it performs much better. This patch attempts to load simplejson, and falls back to normal json if it fails. In the summary path on a single run of quick.tests, simplejson is about 3-4 seconds faster than json, ~7 seconds vs ~11 seconds. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-08-28piglit-print-commands.py: Remove deprecated optionsDylan Baker1-19/+4
This patch removes deprecated options from piglit-print-commands. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-07-29piglit-print-commands.py: PEP8 complianceDylan Baker1-25/+22
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2013-06-27piglit-print-commands: Print relative paths for binaries.José Fonseca1-1/+6
Relative executable paths introduce no new requirements. The tests' arguments are already relative, so they already imply that the commands must be run from the top of the piglit directory for printed commands to work properly. The benefit of relative executable paths is that it makes it easier to run the tests on a different directory later on. Reviewed-by: Brian Paul <brianp@vmware.com>
2013-05-13python: Convert tabs to spacesDylan Baker1-50/+50
PEP 8 specifies that all indents should be either 4 spaces or an equivalent tab indent, but without mixing tabs and spaces, with a preference for spaces over tabs because they are absolute. Tabs and spaces should not be mixed because they lead to expected indent level errors. Currently piglit uses a mixture of spaces and tabs, this patch uses the python tools reindent.py to convert the tabs to spaces. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> v2: Rebase against master, fix apparent unintentional unindentation of help text in piglit-summary.py (changes by anholt) Reviewed-by: Eric Anholt <eric@anholt.net>
2013-03-10Move re.compile for regex into CoreDylan Baker1-14/+13
Move the re.compile into the core.Enivironment constructor, which reduces code duplication. It also allows us to pass environment data on initilization of the object, rather that having edit it's attributes individually. V2: - Does not remove deprecated options, only marks them as such V3: - Fixes deperecated warning for tests from V2 always being triggered Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-10Replaces getopt with argparseDylan Baker1-62/+36
This change gets us cleaner, more readable argument parsing code. Another advantage of this approach is that it automatically generates help menus, which means options will not be implemented without a help entry (like --resume) V2: - Does not remove deprecated options, only marks them as deprecated V3: - Fixes deprecated warning for tests from V2 always being triggered Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-10piglit-print-commands.py: Drop dead resume codeDylan Baker1-9/+0
This program does not support resume, but has some code copied from piglit-run.py for resuming interupted runs, so drop it. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-03-10Change --tests to --include-testsDylan Baker1-2/+10
Excluding tests already uses a similar syntax (--exclude-tests), so this is more consistent. V2: - Leaves --tests option, but marks it as deprecated Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2013-01-04piglit-print-commands: Remove the second parameter of 'loadTestProfile' when ↵Yi Sun1-1/+1
calling. Because of the modification of function loadTestProfile's defination, fix the parameters when calling it. This makes piglit-print-commands.py work again, which was broken by commit 9a4bc09db00dde770a648a9fccfc249e465bc262. Signed-off-by: Yi Sun <yi.sun@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-13piglit-print-commands: add more info, fix incorrect examplesBrian Paul1-5/+9
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
2012-05-10Add a new "piglit-print-commands.py" command.Kenneth Graunke1-0/+124
This prints a list of all the tests and how to run them: piglit test name ::: /path/to/piglit/bin/program <args> glean test name ::: PIGLIT_TEST='...' /path/to/piglit/bin/glean -v -v -v ... This may be of use to our QA team, who currently use their own infrastructure for running test suites. Having their runner launch piglit-run.py, which parses all.tests, for every test case, is incredibly expensive. This is not meant to be a long term solution. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Jose Fonseca <jfonseca@vmware.com>