summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-09igt.py: add docstrings.Dylan Baker1-9/+20
In some cases this is really just about formatting. v3: - remove accidental whitespace insertion (Ian) v4: - Update the module docstring to be accurate after commit 443abf5 (Thomas) v5: - Fix small typo (Thomas) Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Thomas Wood <thomas.wood@intel.com>
2015-03-09igt.py: Use PEP8 specified whitespaceDylan Baker1-0/+5
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Thomas Wood <thomas.wood@intel.com>
2015-03-09igt.py: fix invalid name errorsDylan Baker1-10/+14
Make constants all caps, per PEP8, make functions all lowercase with underscores, and move some toplevel work into helper functions. v2: - drop one pylint disable line that wasn't needed (Thomas) v5: - Fix replacment of IGTTestProfile with TestProfile. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Thomas Wood <thomas.wood@intel.com>
2015-03-09igt.py: Replace igtTestRoot with PEP8 compliant IGT_TEST_ROOTDylan Baker1-9/+9
v2: - Add this patch to the series Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Thomas Wood <thomas.wood@intel.com>
2015-03-09igt.py: Change an empty string to a listDylan Baker1-4/+2
Currently there is a function that in some cases could return '', but the output is assumed to be a list. This patch ensures that it always returns a list. v3: - further simplify the function by using two return statements instead of a single return and assignment Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Thomas Wood <thomas.wood@intel.com>
2015-03-09igt.py: Fix whitepace warnings for pylintDylan Baker1-11/+9
v2: - Also remove stderr from subprocess.Popen Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Thomas Wood <thomas.wood@intel.com>
2015-03-08Delete redundant condition-07.vert test.Kenneth Graunke1-26/+0
This test is redundant with: glsl-1.20/compiler/structure-and-array-operations/array-selection.vert Both contain the same shader code and the same spec citation - the only difference is variable names and the exact portion of the text quoted. The other one has a better name, so keep it and delete condition-07. Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
2015-03-08framework: Try to fix the exclusions of llvmpipe test list.Jose Fonseca2-1/+7
The del profile.test_list[key] statement was silently failing because the TestDict's key lowering magic was not happening for deleted items. Unfortunately this still is not enough to fix the glean exclusions: somehow all glean test names are being munged with extra whitespace. For example: $ ./piglit-print-commands.py tests/llvmpipe.py | grep '^glean/p' warning: test glean/pointAtten does not exist warning: test glean/texCombine does not exist [...] glean/p o i n t a t t e n ::: bin/glean -o -v -v -v -t +pointAtten --quick Reviewed-by: Dylan Baker <baker.dylan.c@gmail.com>
2015-03-06tests/all.py: Fix typo that switched arb with extDylan Baker1-1/+1
This fixes several tests on platforms that support arb_transform_feedback3. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Reviewed-by: Mark Janes <mark.a.janes@intel.com>
2015-03-05all.py: Fix copy and paste errorDylan Baker1-1/+1
This corrects a copy and paste error in all.py that matches the wrong binary with a test name. This causes an artificial piglit regression on mesa, at least for the Intel driver. This patch fixes that typo. Trivial Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: disable pylint's bad-continuation errorDylan Baker2-0/+9
This is a bug (https://bitbucket.org/logilab/pylint/issue/461/incorrect-hanging-indent-detection-with) that misdetects the hanging indent of the context manager. This silences roughly 300 warnings. v2: - also turn this warning off in quick.py Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: use __future__ functionsDylan Baker1-3/+4
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: Remove run_concurrent=True flagDylan Baker2-1642/+1224
The previous commit made True the default value. This removes ~400 LOC from all.py (about 10%) Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05piglit_test.py: Change run_concurrent to True by defaultDylan Baker2-4/+4
This will flip the value of the flag for PiglitGLTest, ShaderTest, and GLSLParserTest. It will not affect PiglitCLTest (That's OpenCL), because of the previous patch, which causes PiglitCLTest to use a unique concurrency setting method. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: Set run_concurrent=False explicitlyDylan Baker1-506/+588
This will allow us to flip the default value of run_concurrent to True in the next patch. Since the majority of tests are concurrent safe (and honestly many of them that are marked not safe are), this change will help to reduce the number of tests that are marked serial by default by copy-n-paste. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05framework: Override run_concurrent for CL test classesDylan Baker3-30/+22
This patch changes where the OpenCL tests get their run_concurrent flag from. After this patch it is computed automatically, leaving no need to set the flag manually unless one wants to force a non default behavior for their platform. v2: - fix some formatting XXX: This assumes Thomas Stellard's "opencv: Automatically run tests concurrently..." patch Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: Use group_manager default_args for exclude_platformsDylan Baker1-59/+50
This simplifies a egl specific tests.
2015-03-05all.py: Use TestProfile.group_manager default_args to set require_platformsDylan Baker1-175/+118
This allows the simplification of a large number of tests, reducing them to one argument, or at least reducing the number of lines that they occupy (or should occupy with reasonable line wrapping).
2015-03-05profile.py: Add kwargs to TestProfile.group_managerDylan Baker2-2/+42
This adds the ability for the group_manager method to take additional keyword arguments that are passed to the underlying Test constructor. This allows groups that all need the same arguments (say platform requirements), but be passed to the constructor and be added by the adder. >>> prof = TestProfile() >>> with prof.group_manater(Test, 'group', required_platforms=['glx']) as g: ... g(['glx-foobar']) >>> prof.test_list['group/glx-foobar'].required-platforms == ['glx'] True
2015-03-05profile.py: Remove TestProfile.testsDylan Baker2-149/+2
This removes the tests attribute from TestProfile, which has been deprecated for some time. The problem with tests is that it uses a nested tree structure, which has to be flattened before tests can be run. This creates a significant amount of overhead. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05opencv.py: use test_list instead of tests.Dylan Baker1-2/+2
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05cl.py: Use flat list for program test dirsDylan Baker1-10/+11
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> TODO: tests this..
2015-03-05cl.py: simplify add_program_test_dirDylan Baker1-13/+4
This drops some nested functions, and makes a few calls simpler. TODO: Test this... Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05cl.py: Use TestProfile.group_managerDylan Baker1-99/+93
v2: - Fix function to work if run_concurrent is not set Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05sanity.py: Use TestProfile.group_managerDylan Baker1-2/+4
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: add asmparser tests automatically with loopDylan Baker1-443/+17
This works much like the shader_test and glsl parser test options, the difference being that rather than searching the whole tree only the directories with asmparser tests are searched. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: Convert all.py to use TestProfile.group_managerDylan Baker3-3219/+4233
This patch is massive, with a huge amount of churn, because it rewrites almost the entirety of all.py. It has to touch all of the helper functions as well. Of these I modified them appropriately or removed them. Criteria for removal was based on the complexity of the wrapper, and the frequency of use. Very simple functions or those used only a couple of times were removed. v2: - remove duplicate tests entries. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05profile.py: Add a context_manager to TestProfile for adding tests.Dylan Baker3-0/+107
This adds a very powerful method to the TestProfile class, group_manager. This group_manager method is a context_manager (it's used with the 'with' statement), and is passed a test class and a flattened group name (such as one returned by grouptools.join), and yields a callable that is used to add tests to the profile. This gives us a lot of advantages. First, it means that tests are added in a context, so if we need to define data structures for adding tests to a specific group (say a list of texture formats supported by a specific version of GL), that data structure is defined in a nested scope, so it cannot be accidentally be used in a different group. Second, it means not passing a group around anymore, in fact, it creates an abstraction on top of the group data structure so it doesn't matter how we're representing it. Third the function itself is more flexible than anything we've had before. It can either take an explicit name, or it can call ' '.join() on the arguments to the Test, and use that as a name, which can help make Test assignments much less verbose. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: move all of the helper functions to the top of the fileDylan Baker1-153/+149
This makes it a lot easier to read and work with all.py, which is still absolutely massive. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: use profile.test_list instead of profile.test for glean testsDylan Baker2-5/+14
These tests are already formated using grouptools, with no intermediate tree structures. Moving them to the flat test list reduces the amount of time spent migrating them to test_list before running tests. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05all.py: remove extra newline in list.Dylan Baker1-2/+1
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-05arb_program_interface_query: Remove unused variable.Vinson Lee1-1/+1
Fix GCC unused-variable warning. resource-index.c: In function ‘piglit_init’: resource-index.c:211:23: warning: unused variable ‘i’ [-Wunused-variable] GLuint prog, shader, i; ^ Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2015-03-04shader_runner: fix uniform array name lookupsArthur Huillet1-7/+26
Don't look up uniform names for non-zero array elements, as this is illegal per GL4.5. >From the discussion of GetProgramResourceIndex in the GL4.5 spec: If name exactly matches the name string of one of the active resources for programInterface, the index of the matched resource is returned. Additionally, if name would exactly match the name string of an active resource if "[0]" were appended to name, the index of the matched resource is returned. Otherwise, name is considered not to be the name of an active resource, and INVALID_INDEX is returned. Note that if an interface enumerates a single active resource list entry for an array variable (e.g., "a[0]"), a name identifying any array element other than the first (e.g., "a[1]") is not considered to match. Instead, strip the "[xxx]" part of the name for the lookup. The NVIDIA proprietary driver enforces this rule of the specification, while Mesa is more permissive. Piglit shouldn't rely on the implementation being lax. Signed-off-by: Arthur Huillet <ahuillet@nvidia.com> Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2015-03-04gl-1.0-readpixsanity: Fix Clang absolute-value warning.Vinson Lee1-1/+1
readpix.c:238:10: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value] dd = abs(actual - expected); ^ readpix.c:238:10: note: use function 'fabs' instead dd = abs(actual - expected); ^~~ fabs Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Laura Ekstrand <laura@jlekstrand.net>
2015-03-04arb_direct_state_access: Fix Clang absolute-value warning.Vinson Lee1-1/+1
getcompressedtextureimage.c:121:7: warning: using floating point absolute value function 'fabs' when argument is of integer type [-Wabsolute-value] if (fabs((int)data[i] - (int)expected[i]) > tolerance) { ^ getcompressedtextureimage.c:121:7: note: use function 'abs' instead if (fabs((int)data[i] - (int)expected[i]) > tolerance) { ^~~~ abs Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Laura Ekstrand <laura@jlekstrand.net>
2015-03-04CMakeList.txt: Install OpenCL inc files.Dylan Baker1-1/+8
These are needed to pass tests, but they weren't being installed for running out of tree. Fixes ~100 warns when running out of tree with beignet. Trivial. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
2015-03-04max-varyings: Use logical-OR instead of if statement to set failed.Matt Turner1-6/+4
By flattening the if statements we cut 213 instructions from the fragment shader (601 -> 388, or 35%), and we remove all register spilling on i965. Reduces runtime of "ext_transform_feedback-max-varyings" by -73.0547% +/- 0.682694% (n=27). Reviewed-by: Mark Janes <mark.a.janes@intel.com>
2015-03-04varying-packing: Use logical-OR instead of if statement to set failed.Matt Turner1-12/+5
By flattening the if statements we cut 288 instructions from the fragment shader (806 -> 518, or 35%), and we remove all register spilling on i965. Reduces runtime of "varying-packing-simple int separate" by -81.4453% +/- 0.255875% (n=483). Also consistently print 3 digits in the varying's names, to make reading/sorting simpler. Reviewed-by: Mark Janes <mark.a.janes@intel.com>
2015-03-04shaders: Add test for conditional mod propagation with different types.Matt Turner1-0/+37
The i965 driver has a pass that merges comparisons with zero into the instruction that generated the result. For example: add tmp x y cmp.ge.f0 null tmp 0.0 is optimized into add.ge.f0 tmp x y If the types of tmp are different in the add and cmp, comparisons against zero might not work the same. For instance if the addition is on unsigned integers, they may generate a result of 0x80000000 which is -0.0 reinterpreted as a float. I think this test triggers the same bug as this bug report. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89317 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2015-03-04all.py: Fix two tests being assigned the same nameDylan Baker1-1/+1
commit 36b63cbbe7 fixed the execution of two tests, but didn't fix the fact that two tests are stored with the same name, thereby replacing the first with the second. This corrects that. Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com> Acked-by: Laura Ekstrand <laura@jlekstrand.net> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2015-03-04arb_program_interface_query: GetProgramResourceIndex testTapani Pälli3-0/+286
Test passes on Nvidia GTX 660 (binary driver version 331.38). v2: separate atomic counter index subtest (Ilia Mirkin) + code and shader cleanups + added subroutine index query test v3: fix indentation (argh!) Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
2015-03-03framework/backends/junit: Report expected failures/crashes as skipped.Jose Fonseca1-1/+3
I recently tried the junit backend's ability to ignore expected failures/crashes and found it a godsend -- instead of having to look as test graph results periodically, I can just tell jenkins to email me when things go south. The only drawback is that by reporting the expected issues as passing it makes it too easy to forget about them and misinterpret the pass-rates. So this change modifies the junit backend to report the expected issues as skipped, making it more obvious when looking at the test graphs that these tests are not really passing, and that whatever functionality they target is not being fully covered. This change also makes use of the junit `message` attribute to explain the reason of the skip. (In fact, we could consider using the `message` attribute on other kind of failures to inform the piglit result, instead of using the non-standard `type`.) Reviewed-by: Mark Janes <mark.a.janes@intel.com> Acked-by: Dylan Baker <baker.dylan.c@gmail.com>
2015-03-03cmake: Use -Werror=pointer-arith on GCC builds.Jose Fonseca1-0/+6
Void pointer arithmetic is not supported on MSVC, so passing -Werror=pointer-arith will make it easier for everybody to catch this sort of portability issues as the code is written. Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2015-03-03cl-program-tester: Avoid void pointer arithmetic.Jose Fonseca1-1/+1
Although CL tests are not built with MSVC, this is the single instance of void pointer arithmetic in them, so updating it to not use void pointer arithmetic will enable us to use -Werror=pointer-arith option universally in a follow on change. Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
2015-03-03arb_direct_state_access: Avoid void pointer arithmetic.Jose Fonseca1-2/+2
It's not supported by MSVC. Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
2015-03-03arb_framebuffer_srgb/blit: Fix command line option 'disabled'Antia Puentes1-1/+1
To test the blit with FRAMEBUFFER_SRGB disabled, if the option 'disabled' was passed to the command line, was not being done. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
2015-03-03arb_direct_state_access: Added *NamedRenderbuffer* testsMartin Peres3-0/+187
v2: review from Tapani - add some documentation - set the minimum GL version to 2.0 v3: - set the minimum GL version to 3.1 core (Ilia) - do some clean up at the end of the test Signed-off-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2015-03-03arb_direct_state_access: Added glCreateRenderbuffers testsMartin Peres3-0/+165
v2: - rename some subtests (Ian) v3: review from Tapani - add some documentation - set the minimum GL version to 2.0 v4: - set the minimum GL version to 3.1 core (Ilia) - do some clean up at the end of the test Signed-off-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2015-03-03arb_direct_state_access: Added glCreateSamplers testsMartin Peres3-0/+162
v2: - rename some subtests (Ian) v3: review from Tapani - add some documentation - set the minimum GL version to 2.0 v4: - set the minimum GL version to 3.1 core (Ilia) - do some clean up at the end of the test Signed-off-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
2015-03-03arb_direct_state_access: Added glCreateProgramPipelines testsMartin Peres3-0/+160
v2: - rename some subtests (Ian) v3: review from Tapani - add some documentation - set the minimum GL version to 2.0 v4: review from Tapani - verify that the GL extension is present before testing it v5: - set the minimum GL version to 3.1 core (Ilia) - explicitly skip tests instead of silently skipping them - do some clean up at the end of the test Signed-off-by: Martin Peres <martin.peres@linux.intel.com> Reviewed-by: Tapani Pälli <tapani.palli@intel.com>