summaryrefslogtreecommitdiff
path: root/piglit-resume.py
AgeCommit message (Collapse)AuthorFilesLines
2020-02-13drop python2 supportDylan Baker1-10/+2
This removes all of the python code for handling python 2.x vs 3.x, now only 3.6+ is supported. This also drops all uses of the six module, as its no longer needed. Python 2.x and <= 3.5 are all EOL, it doesn't make sense to continue to support version of python that are at the end of their lives and are being removed from operating systems. Acked-by: Eric Engestrom <eric@engestrom.ch> Part-of: <https://gitlab.freedesktop.org/mesa/piglit/merge_requests/223>
2018-11-08python: add explicit utf-8 encodingEric Engestrom1-0/+1
I went with `# coding=utf-8` as it was the most common format in the existing code: 24 # coding=utf-8 21 ## coding=utf-8 19 # encoding=utf-8 9 ## encoding=utf-8 6 # -*- coding: utf-8 -*- I added it as the first line after the shebang, if any. Suggested-by: Dylan Baker <dylan@pnwbakers.com> Signed-off-by: Eric Engestrom <eric@engestrom.ch> Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
2016-05-02framework: update the rest of the piglit-* commands to be py3Dylan Baker1-3/+8
Convert the rest of the commands using six to make them both python 2 and python 3 safe. This also changes the default chbang to python instead of python2, which should only be a change on Arch linux. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.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-1/+5
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>
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-05-08wrappers: Fix argument issue with new wrapper scriptsJordan Justen1-1/+1
The new argument parsing wants the script name parameter sys.argv[0] stripped off. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=78421 Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
2014-05-06framework: move executable functions to modulesDylan Baker1-86/+22
This moves piglit-run and piglit-resume main() functions to framework.programs.run as run() and resume() respectively, and moves piglit-summary-* to framework.programs.summary. It then creates compatibility wrappers as piglit-*.py for the functions. This is groundwork for a combined piglit interface. The original files could not be imported directly since they have dash (-) in their name, and python considers dash an illegal character for function, class, and modules names, and python would raise an ImportError when attempting to import one of them. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2014-04-24python: Add results_dir to TestProfileDylan Baker1-0/+1
This is needed specifically by XTS, but it might be useful for other external suites that want to move files out of their runtime directories into the saved directory. Specifically if those files are linked into the summary. v3: - Add the results_dir name definition to the constructor Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> (v2)
2014-04-17framework: Split TestProfile and related out of coreDylan Baker1-1/+2
This solves a dependency loop between core and exectest, laying the groundwork for future improvements to the exectest module. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-04-02Remove extra newline from the end of run messageThomas Wood1-2/+1
The extra newline is no longer necessary as the final summary line includes one. Signed-off-by: Thomas Wood <thomas.wood@intel.com> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-03-12python: Convert from print statement to functionDylan Baker1-0/+1
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-02-20log: add verbose loggerDylan Baker1-1/+2
This adds a verbose logger option, similar to that of the old piglit logger, but with some of the flair of the new one. v2: - Use different method to set Log.__string - fix typo env.concurrent to correct env.verbose - resume uses stored verbosity settings Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
2014-02-06tests/igt: restore dmesg-by-defaultDaniel Vetter1-1/+3
This regression has been introduced in commit 90a25641164c8a0c8cc09a5515864b654df9d368 Author: Dylan Baker <baker.dylan.c@gmail.com> Date: Mon Jan 27 11:23:28 2014 -0800 Use the new dmesg class The original logic to always capture dmesg for igt tests has been added in commit da3819f07ca2b74b386ee96b8af1e141c36ec8ce Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Mon Nov 11 22:04:32 2013 +0100 igt: Enable dmesg checking by default Cc: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2014-02-04Use the new dmesg classDylan Baker1-0/+1
This actually makes use of the new dmesg class rather than the dmesg functions. It touches a lot of files, but almost all of these changes are code removal rather than code addition. v5: - Fix dmesg handling in resume Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> (v4)
2014-01-12Add support to load multiple test profilesDylan Baker1-1/+1
This patch gives piglit run the ability to take one or more test proflies as arguments rather than just one. It loads the profiles, merging them from left to right, overwriting conflicting results. This will allow the oglconform and es3conform loaders to be taken out of all.tests. Acked-by: Daniel Vetter <daniel@ffwll.ch> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2014-01-09Save and restore platform for piglitDylan Baker1-0/+7
This patch adds support in piglit-run to save the -p platform information if it was provided, and adds support in piglit-resume to restore this information if it is stored. Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-12-30piglit-resume.py: pep8 fixesDylan Baker1-8/+8
This fixes pep8 whitespace errors Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-12-26piglit-resume.py: Fix bug in resumeDylan Baker1-2/+1
This patch removes an additional JSONWriter.close_dict() call. This extra call closed the tests dictionary after writing the tests from the run into it; meaning when the JSONWriter instance is passed into TestProfile.run() the tests dictionary is already closed and new tests are not written into the root dictionary. Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
2013-11-19Split resume functionality out of piglit-run.pyDylan Baker1-0/+84
The resume functionality actually shares only a little boilerplate with the run functionality, and there is a lot of extra boilerplate that exists (or should exist) to make resumes work correctly with all of the command line options allowed by piglit-run. Therefore, it makes more sense to split it out into it's own file. Reviewed by: Kenney Phillis <Kkphillisjr@gmail.com> Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>