Age | Commit message (Collapse) | Author | Files | Lines |
|
Replaces mkdir with makedirs. Trivial
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Rather than removing the results_path unconditionally (if it exists),
this requires the that -o/--overwrite switch is provided to overwrite.
This is the same syntax that `summary html` uses, and provides users a
little bit of protection so they don't overwrite something they meant to
keep.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Currently piglit will run if a directory already exists, or die in a
fire if the results_directory is pointed at a file.
Both are bad, in the fist case if there are already X+Y tests in the
'tests' directory, and the current run only writes X tests, then Y-X
tests from the previous run will be included (which can overwrite tests
depending on the order that they were written).
This clears those out, solving the problem.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Currently if one passes a bad directory to `piglit summary aggregate`
then piglit will fail with an internal exception. This patch fixes that,
catching the exception, and printing a helpful message and closing
gracefully.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
CMake actually marks that we require six 1.4.0, however, I can't find
any packages anywhere for 1.4.0, and the lowest version I've seen
requested is 1.5.2.
This fixes requirements for working with six 1.5.2, and sets tox to use
1.5.2 (and a suitable version of mock). Primarily there are a few things
we're using that are not available: six.moves.getcwd, six.viewvalues,
six.python_2_unicode_compatible.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Tested-by: Brian Paul <brianp@vmware.com>
|
|
This fixes a run-time error with python 3.4.
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
|
|
During the hybridization this little bit was missed, causing the to
subprocess to return bytes, while the rest of the code expected unicode.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
|
|
In python 3 the current implementation provides bytes instead of
unicode, but the write mode is set for unicode.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This makes the GLSLParserTest class only support str (unicode in python
2), and not bytes (str in python 2).
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This changes collect_system_info to convert the raw output of each
command to unicode before returning it.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This changes the junit.py script to always convert bytes into unicode
before writing, since we do declare that our xml is encoded in unicode.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
In python 2 < 2.6, generators define a next() method. In python 2.6+
(including 2.7) they should define a __next__ method and are called with
the next() function.
In python 2.6 and 2.7 both are supported, but in 3.x only the __next__
method is supported
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Also fix unittest that relied on compare to None having python 2
behavior.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Mostly this involves marking str (unicode) and bytes explicitly and not
mixing the two.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Apparently these aren't inherited in python 3, which makes sense.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
In python 2 the write mode should be 'w', and the read 'r', but in
python 3 they need to be 'wt', and 'rt' respectively. Python 3 also has
an lzma module built in, which vastly simplifies supporting xz.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Convert to unicode, this requires reworking the tests to ensure that
they provide bytes instances in the right places, or they trip up on the
decode method call, which in python 3 is only available on str
(unicode), and not on bytes.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Use unicode_literals from __future__. This makes undecorated strings
(those not using and b or u prefix) into unicode instead of bytes in
python 2. This means that bytes strings need to have a b prefix now.
This also fixes a couple of unittests that broke during the transition.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This wraps the subprocess32/not subprocess32 in a six.PY2 block, and for
python 3.x just imports subprocess and sets _EXTRA_ARGS appropriately.
For MS Windows the timeout is disabled. This could be fixed, but I don't
have any interest in getting it working.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This implements the same behavior, but with a fallback parameter.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
There wasn't ever a need to use a comprehension here, this is simpler
and easier to read and maintain. It might even be faster.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This was initially generated via the following sed command:
sed -i \
-e 's@in \(.*\)\.iter\(values,keys,items\)()@in six.iter\2(\1)@g' \
-e 's@in \(.*\..*\)\.iter\(values,keys,items\)()@in six.iter\2(\1)@g'
Then cleaned up by hand, including changes for view*.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
All of these changes are submitted to upstream six, and are ontrack for
landing.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This is not feature complete for python 3.x in and of itself, but it
gets started by using six functions rather than str and unicode.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This makes metaclasses work on both python 3 and python 2, which have a
different syntax for setting the metaclass of a class.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This is the fast C based version on python 2, and is adapative on
python3, importing the C based version if it's available and falling
back if necessary.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
six.moves.zip is itertools.izip on python 2, and builtins.zip in python
3. Which are the same lazy function
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This is another shim for something that moved between python3 and
python2.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This module is a compatibility shim for python 3.x and 2.x
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This is xrange on python 2.x and range on 3.x
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
These are the three python3 like behaviors that piglit should rely on.
The only other applicable future import is unicode_literals. Although my
plan is to use unicode_literals, that will actually cause behavioral
changes in some cases, where these cause minimal changes to the code.
Piglit will not be targeting < 3.2, they are old, unsupported, and have
fewer features than 2.7.
Piglit now has division (using / as floating division, and // as integer
division), print as a function (rather than a statement), and
absolute import, which changes the way import works when there's a
conflict between a local import and a system wide one. Absolute import
makes more sense, and copies the behavior of python 3
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Acked-by: Jose Fonseca <jfonseca@vmware.com>
|
|
This variable allows timeouts to be disabled, which can be useful for
debugging tests.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Previously a timeout would be marked as pass, but that makes no sense.
This marks it as an error.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Subprocess32 provides a backport of python 3.2's subprocess module,
which has a timeout parameter for Popen.communicate. When the timeout
runs out then an exception is raised, and when that exception is caught
we can kill the process.
This is fairly similar to the way the current timeout mechanism works,
except that the current mechanism is not thread safe. Since one of the
major features of piglit is that it offer's processes isolated
concurrency of tests, it makes sense to make the effort to provide a
timeout mechanism that supports concurrency. Unfortunately there isn't a
good cross platform mechanism for this in python 2.x, even with
subprocess 32 only *nix systems are supported, not windows.
The big advantage of this is it allows consistent behavior between
python 2.x and 3.x as we look toward the future and the possibility of
using a hybrid approach to transition to python 3.x while maintaining
2.x support until it's not needed.
This patch look pretty substantial. It's not as big as it looks, since
it adds some fairly big tests.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Exceptions were not reaching it.
Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
|
|
Currently the framework is pretty confusing. There's 'test' which is a
package containing test classes, then there's 'tests' which contains
unit tests for the framework. This is obviously not optimal. Beyond that
the unittests get installed, and that isn't really necessary.
As a bonus this removes the unit tests from coverage reports, which is a
nice plus.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
This is more groundwork to move the unit tests out of the framework
directory.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Setting PIGLIT_NO_FAST_SKIP will disable the fast skipping mechanism
altogether.
It does this by shadowing FastSkipMixin at import time. This method is
robust and cheap, but makes testing difficult.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
This commit was generated with the following sed commands:
sed -i -e 's@from framework.tests import utils@from . import utils@g'
sed -i -e 's@import framework.tests.utils as utils@from . import utils@g'
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Use a path relative to the unit test. This is groundwork for moving the
unit tests out of the framework folder.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Vinson Lee <vlee@freedesktop.org>
|
|
This adds a new environment variable, PIGLIT_FORCE_GLSLPARSER_DESKTOP,
which forces glsl_parser_test.py to use "glslparsertest" for GLES tests
(instead of "glslparsertest_gles2").
This could be used to force testing ES_<ver>_compatibility extensions
even when OpenGL ES tests are being built.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
This patch fixes the behavior of glsl_parser_test in cases other that
OpenGL and OpenGL ES are available. This means that if OpenGL ES isn't
available then OpenGL ES shaders will be passed to the regular version
of glslparsertest, which can run them with an ARB_ES<ver>_compatibility
extension. When a test is for desktop OpenGL, but only OpenGL ES is
available, then the test will skip in the python layer.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
v3: - Rebase on top of now upstream fast-skipping patches
- When using glslparsertest to run GLES tests add
ARB_ES<ver>_compatibility to gl_required, to integrate with fast
skipping.
- Fix some tests. These tests are pretty fragile and probably just
need to be reworked.
- small refactors, make use of the _is_gles_version helper
- Split skip conditions into a private method
v4: - Fix bug where ARB_ES<ver>_compatibility skip requirement would be
overwritten if the test had other extension requirements (and
update tests to catch this bug)
- Rename some constants to be more clear
- Remove use of flag for skipping.
|
|
There are two versions of glslparsertest, an undecorated one for desktop
OpenGL, and a '_gles2' suffixed one for OpenGL ES. Piglit should pass 3.1
and 3.2 to the '_gles2' version like it does for GLES 2 and GLES 3.0
This also extends the test generator to cover these new cases (and a few
it should have been covering before). It now covers 1.00, 3.00, 3.10,
3.20, 3.00 es, 3.10 es, and 3.20 es.
v5: - fix the wording of a comment
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
This information can be used on linux in conjunction with scripts to
associate information in dmesg with information in piglit results.
Adds the pid information to both the json and junit backends, and adds
tests for both.
This information is not published into any of the summary modes on
purpose. It's usefulness is limited to the system on which the test was
ran, and only while a log of dmesg exists.
v2: - remove extra newline in junit stderr (Mark)
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
|
|
This slightly refactors these test classes, fixing time time tests, and
making the to_json test not do a dict -> test result -> dict conversion,
skipping the first dict stage.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Reviewed-by: Mark Janes <mark.a.janes@intel.com>
|
|
This extends the version handling methods of the WflInfo class to handle
two kinds of errors. First, it handles getting a patch version in OpenGL
and GLSL version strings. Second, it handles getting back
WFLINFO_GL_ERROR, such as is returned on the nvidia blob driver because
of the patch version.
v2: - update tests to cover more tests (Jose)
- update gl_extensions to not return set(['WFLINFO_GL_ERROR']). This
wouldn't break anything, but it wasn't strictly correct.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|
|
Previously a stack trace would be suppressed in all instances unless
the PIGLIT_DEBUG environment variable was truthy. This was suboptimal
for a number of reasons.
This patch removes that functionality, now only a subset of piglit
specific exceptions that are meant to be suppressed are. All other
exceptions are directly raised, stopping the runner immediately. Other
piglit specific exceptions have been extended to have custom error
messages rather than relying on the handler to add them.
v2: - remove unit tests that no longer apply
Reviewed-by: Jose Fonseca <jfonseca@vmware.com> (v1)
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
|