summaryrefslogtreecommitdiff
path: root/tox.ini
AgeCommit message (Collapse)AuthorFilesLines
2017-01-19CI: Add python 3.6 to build matrixDylan Baker1-4/+4
2016-09-09tox: add a streams target.Dylan Baker1-2/+4
Also enables the target in travis and appveyor. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-09-02tox: Don't use pytest 3.0.2Dylan Baker1-1/+1
There is a known issue[1], that causes this version to break piglit's unitests. There is a fix queued for 3.0.3, and when that's released this can be changed to '>=3.0.3'. In the meantime this patch fixes it by not letting tox install the bad version. [1] https://github.com/pytest-dev/pytest/issues/1905 Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-05framework: remove unused nose bitsDylan Baker1-5/+2
This deletes the quite extensive nose framework that was built up in piglit, and the tox dependencies. These have all been replaced with a combination of mock and pytest features instead. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-05unittests: replace json_tests with a schema and validatorDylan Baker1-0/+1
This module is really a want for a schema and enforcement for that schema, since there is in fact schema for JSON and several python libraries to enforce said schema, it would be much better to use use one of those, since that also makes the output format reproducible and portable. This adds the schema and the proper test, which currently this test xfails because bugs. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-05unittests: port test_lists to pytestDylan Baker1-2/+2
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-05unittests: port base_tests to pytestDylan Baker1-0/+1
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-05unittests: port core_tests to pytestDylan Baker1-1/+4
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-05unittests: port status module tests to py.testDylan Baker1-5/+6
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-08-05unittests: Port generator tests to pytest.Dylan Baker1-9/+15
This port uses a lot less code, is much simpler, and is able to mark tests as slow or very_slow (which is unfortunately necessary). Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-06-02unittests: Make skip less invasiveDylan Baker1-0/+1
I prefer that skip is just a decorator so that the test itself doesn't need to contain code to skip. And as a class Skip can have convenience methods to make doing common skipping patterns easier to write. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-06-02tox: split py27-accel for windowsDylan Baker1-7/+8
Some parts of the accel profile don't work on windows (or don't work easily) such as lxml and subprocess32. Because of this create two separate accel profiles, one for windows and one for posix platforms. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-04-14tox.ini: don't install psutil in the generator profileDylan Baker1-1/+1
It's not used by the generators. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-04-13unittests: move generator tests to unittestsDylan Baker1-1/+1
This is excluded in tox for the non-generator profile. This allows us to share the utils directory easily, and puts *all* of the tests in one directory. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-04-13generators: Add helper classes for GLSL version numbersDylan Baker1-2/+2
This adds a new module in the generated_tests/modules directory, which contains three classes, GLSLVersion, GLSLESVersion, and Version. Version is a factory that caches other versions and makes GLSLVersion and GLSLESVersion instances on demand. The goal of these classes is to provide a simple, unified method for dealing with GLSL version numbers, which is something that a lot of generators need to do. To that end it provides rich comparisons against each other and against ints and floats. The hope is that other generator writers could leverage this work in their generators to simplify things. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
2016-02-18dependencies: Bump numpy version to 1.7.0 in cmake and toxDylan Baker1-1/+1
The previous version (1.6.2) fails to compile against python 3, and is from 2012. Version 1.7.0 does compile against python 3, and is still from February 2013, old enough that even stable Linux distributions should have picked it up by now. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-02-18tox.ini: Set the mako version to the minimum version in cmakeDylan Baker1-1/+2
We actually define a minimum required mako version in cmake. Since tox is supposed to be useful for testing, we should test that version. Mako 1.0.2 contains bug fixes for python 3.5. For versions of python earlier than 3.5 0.8.0, is still sufficient, but for 3.5 1.0.2 is needed. CMake is updated to check this as well. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-02-11python: function with six version 1.5.2Dylan Baker1-2/+2
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>
2016-02-08tox.ini: add python 3.3-3.5 for standard tests.Dylan Baker1-5/+5
This refactors the tox.ini a little bit since some of the requirements of the accel platform on 2.7 (backports.lzma and subprocess32) are not required in 3.3+, and mock is not required on 3.3+ for any profile. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-02-08base_tests.py: make tests for timeout run on python 3.xDylan Baker1-1/+1
These tests are always valid on python 3, but only valid on python 2 if subprocess32 is installed. One unittest on python3 raises a warning. I've tracked it back to somewhere in the python stdlib. I think that for some reason a file is being unlinked twice, but I'm having trouble tracking it down, it works fine under python 2.7, and I think it's safe to ignore. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-02-08tox.ini: drop explicit coverage generationDylan Baker1-2/+2
Instead allow extra arguments to be passed to tox, which can be used to set the coverage options if wanted. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Jose Fonseca <jfonseca@vmware.com>
2016-01-21framework/test/base.py: use subprocess32 for timeouts.Dylan Baker1-0/+2
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>
2016-01-08tox.ini: compress tox file to be simplerDylan Baker1-23/+11
Instead of having a bunch of different testenv sections, use one with some compressed dependencies. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2016-01-08unittests: move framework/tests to unittestsDylan Baker1-2/+2
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>
2015-11-30dmesg_tests.py: rework entire module to be betterDylan Baker1-2/+2
This module reworks the dmesg testing to be much more robust, largely by taking advantage of the mock module. This allows us test test dmesg without actually calling dmesg, which eliminates the need for root privileges, and allowing all tests to run on all platforms. These tests also don't probe at the internal bits of the class, instead they probe at the public API. This significantly simplifies the tests, increases coverage, and improves the quality of the tests in many cases, while making some of the tests less fragile but less specific in other cases. v2: - add tests for dmesg wrapping. Tests for this functionality where present in the replaced implementation. - remove '--attr=\!privileged' from tox.ini. There are now no privileged tests, so no need to exclude them Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-10-29framework/tests/oglconform_tests.py: Add tests for tests/oglconform.pyDylan Baker1-0/+2
This adds a pretty extensive set of tests for oglconform.py, with the goal of making further cleanups and refactors easier and not introducing regressions. This adds a dependency of mock for the unittests. No production code needs this dependency, so this wont affect most (any?) piglit users. Mock allows for better testing, in fact, it allows oglconform to be tested even when it's not installed. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-10-19framework/tests: fix typo in attribute decoratorDylan Baker1-2/+2
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-10-19tox.ini: run generator tests with python 2.7 as wellDylan Baker1-1/+1
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-10-09tox: Also test python 3.{3-5} for the generators.Dylan Baker1-7/+19
This tests the test generators with python 3.x as well as 2.x. The generators have been supposed to build with python 3.3+ for some time, but haven't. This exposes a bug in the tessealation generators that keep them from building with python 3.x, and these tests fail. This is expected, and there are patches out for review to correct this. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-10-09tox: Add a test module for testing the generators.Dylan Baker1-1/+3
This test module provides a function that enumerates the test generators (it assumes that all files ending in .py are generators unless they're black listed), and generates a nose job for each of them. This allows us to ensure that the generators work in an automated fashion, and with a simple patch will allow us to test them with various versions of python (2.7 and 3.3+), which we claim to support with the generators. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-10-09framework: add tox testing supportDylan Baker1-0/+16
tox is a python test manager that runs the tests in isolated environments with their own copies of dependent libraries, and can be used to test against multiple versions of python. This allows us to easily test the framework with and without the acceleration modules it can optionally use (simplejson and lxml), it will also allow us to test against multiple versions of python 3.x (which we support for the generators, and presumably will support in the future) This uses the coverage module, and uses nose's cover-tests option. Unfortunately nose assumes that anything /[Tt]est/ is a test, and hides the tests for the test package. This might be resolvable by modifying the regex, but it isn't something straightforward to fix. Using --cover-tests will get us the test package, but it also gets us the tests package. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>