asmparsertest: Silence uninitialized variable warning.

Fix GCC maybe-uninitialized warning.

asmparsertest.c: In function 'piglit_init':
asmparsertest.c:243:10: warning: 'target' may be used uninitialized in this function [-Wmaybe-uninitialized]
   compile(argv[i], target, use_ARB);
          ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
fbo-rg: Silence uninitialized variable warning.

Fix GCC maybe-uninitialized warning.

fbo-rg.c:485:34: warning: 'internal_format' may be used uninitialized in this function [-Wmaybe-uninitialized]
  pass = render_and_check_textures(internal_format);
                                  ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
fbo-scissor-blit: Silence uninitialized variable warning.

Fix GCC maybe-uninitialized warning.

fbo-scissor-blit.c:109:5: warning: 'blit_to_fbo' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (blit_to_fbo)
     ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
fbo-stencil: Silence uninitialized warning.

Fix GCC maybe-uninitialized warning.

fbo-stencil.c:332:2: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized]
  return res;
  ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
glsl-link-test: Silence uninitialized variable warning.

Fix GCC maybe-uninitialized warning.

glsl-link-test.c: In function 'piglit_init':
glsl-link-test.c:124:10: warning: 'expect' may be used uninitialized in this function [-Wmaybe-uninitialized]
   fprintf(stderr,
          ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
glslparsertest: Silence uninitialized variable warnings.

Fix GCC maybe-uninitialized warnings.

glslparsertest.c: In function 'attach_dummy_shader':
glslparsertest.c:153:9: warning: 'shader_template' may be used uninitialized in this function [-Wmaybe-uninitialized]
  sprintf(shader_text,
         ^
glslparsertest.c: In function 'piglit_init':
glslparsertest.c:221:5: warning: 'type' may be used uninitialized in this function [-Wmaybe-uninitialized]
  if (type == GL_COMPUTE_SHADER) {
     ^
glslparsertest.c:199:9: note: 'type' was declared here
  GLenum type;
         ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
primitive-restart: Fix GCC warnings.

This patch fixes these GCC warnings.

primitive-restart.c: In function 'read_index_value':
primitive-restart.c:253:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
primitive-restart.c: In function 'test_draw_by_index':
primitive-restart.c:445:18: warning: 'restart_index' may be used uninitialized in this function [-Wmaybe-uninitialized]
    enable_restart(restart_index);
                  ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
shader_runner: Fix GCC warnings.

This patch fixes these GCC warnings.

shaders/shader_runner.c: In function 'compare':
shader_runner.c:376:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
shader_runner.c: In function 'comparison_string':
shader_runner.c:395:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
shader_runner.c: In function 'piglit_display':
shader_runner.c:1628:8: warning: 'parameter_name' may be used uninitialized in this function [-Wmaybe-uninitialized]
  value = lookup_enum_string(strings, &line, parameter_name);
        ^
shader_runner.c:1572:14: note: 'parameter_name' was declared here
  const char *parameter_name;
              ^
shader_runner.c:1629:17: warning: 'parameter' may be used uninitialized in this function [-Wmaybe-uninitialized]
  glTexParameteri(target, parameter, value);
                 ^
shader_runner.c:1571:9: note: 'parameter' was declared here
  GLenum parameter;
         ^

Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
tests/quick.py: Ensure glean receives the --quick parameter.

Which was lost as result of commit 5a12f3b9f0d6d93da1ac7a72c9806b1a831a1744.

Urgent. Trivial change.
framework/tests/summary.py: fix regression from bab84213

this fixes a syntax regression that prevents piglit's framework tests
from running at all. without this patch it is impossible to run the
framework tests, and this is clearly a copy/paste error.

Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
cmake: Suppress warning on cmake 2.8.12+

cmake 2.8.12 Introduced a new policy (CMP0022). Because there are two
policy options and piglit doesn't explicitly ask for one it defaults to
the OLD setting, but spews warnings. By setting OLD explicitly this
warning goes away.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Revert "cmake: Suppress warning on cmake 2.8.12+"

This reverts commit 43c3d2ab0c44ed53baeebd2ca568922bb34b835a.
tests/gpu: actually make it be a subset of the quick tests

Commit 12cf501da67 (tests/gpu.py: Don't use execfile) accidentally
switched from execfile'ing quick.py to importing tests.all. Change this
to import tests.quick.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
cl: Add test program-scope-arrays.

Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
Adds piglit framework test to test GleanTest.globalParams bug

This patch adds a framework test to show the problem with
GleanTest.globalParams. It makes use of nose, a python testing
framework, which is simple to write tests for, and is in widespread
usage for testing python code.

Acked-by: Jose Fonseca <jfonseca@vmware.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
Fix GleanTest.globalParams

The problem with the way global params work is that they surprise the
user, since they are applied at object initialization time. So the
following code doesn't do what one expects:
   a = GleanTest("basic")
   GleanTest.globalParams = ['--quick']
   b = GleanTest("basic")
   assert a.command == b.command

This would create an assertion failure with the current code, since
global params are applied at instance initialization. Since these params
are supposed to be global, one would expect them to be applied to all
instances, regardless of when the instance was created and the class
variable set.

This patch achieves that by converting Test to a new-type class,
allowing getters and setters to be created. It then creates a getter and
setter for ExecTest.command, and overwrites the getter in GleanTest to
return ``self.command + self.globalParams''. This allows an individual
gleantest to overwrite the global commands, but means that if a instance
hasn't created self.globalParams that the Gleantest.globalParams is
applied when self.command is called.

Acked-by: Jose Fonseca <jfonseca@vmware.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
tests/quick.tests: return to pep8 compliance

commit bab84213 exposed a behvarioral problem in GleanTest, and commit
832e498 worked around this bug by reordering code. While this was a
valid work around it wasn't pep8 compliant. Since the previous patch in
this series fixed the behvaior of GleanTest, there is no reason to keep
this change.

Acked-by: Jose Fonseca <jfonseca@vmware.com>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
framework/shader_test.py: fix bug from commit 260f211d

This patch fixes a minor bug. An exception catch calls a function with a
single leading underscore instead of two leading underscores.

Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
Signed-off-by: Dylan Baker <baker.dylan.c@gmail.com>
gles-3.0/texture-immutable-levels: Fix tex array size

We access tex[0] throught tex[3].
So, tex must have at least 4 elements.
This fixes a gcc warning:

warning: array subscript is above array bounds [-Warray-bounds]
  glBindTexture(GL_TEXTURE_3D, tex[3]);

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
all.tests: add texture-immutable-levels_gles3

This test was missing from all.tests.

Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>