[Piglit] [PATCH] cl/math: Add some basic ilogb builtin tests

2016-02-10 Thread Aaron Watry
Note: Doesn't test 0 or NaN as those inputs support multiple possible output 
values.

Signed-off-by: Aaron Watry 
---
 generated_tests/gen_cl_math_builtins.py | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/generated_tests/gen_cl_math_builtins.py 
b/generated_tests/gen_cl_math_builtins.py
index df4e94b..6406495 100644
--- a/generated_tests/gen_cl_math_builtins.py
+++ b/generated_tests/gen_cl_math_builtins.py
@@ -56,6 +56,7 @@ CLC_VERSION_MIN = {
 'fmax' : 10,
 'fmin' : 10,
 'fmod' : 10,
+'ilogb' : 10,
 'ldexp' : 10,
 'log10' : 10,
 'log1p' : 10,
@@ -307,6 +308,15 @@ tests = {
 ],
 'tolerance' : 0
 },
+'ilogb' : {
+'arg_types': [I, F],
+'function_type': 'ttt',
+'values': [
+[0, 3, 1, 10, 2147483647, 2147483647],
+[1.0, 10.0, -3.0, 1234.5, float("inf"), float("-inf")]
+],
+'tolerance' : 0
+},
 'ldexp' : {
 'arg_types': [F, F, I],
 'function_type': 'tss',
-- 
2.5.0

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 1/3] completions/bash: Add a completion file for piglit

2016-02-10 Thread Dylan Baker
This file is a bash completion library for the 'piglit' command, it is
as complete and accurate as I can get it with my limited knowledge and
patience for bash.

It does require the _filedir function from bash_completions, which is
provided by most Linux distributions, the BSD's, and can be installed on
OSX via homebrew or macports. I made this decisions over using the
builtin features from bash because the builtins don't handle spaces in
file and folder names, and don't allow restrictions to be placed on the
type or extension like _filedir does.

Signed-off-by: Dylan Baker 
---
 completions/bash/piglit | 435 
 1 file changed, 435 insertions(+)
 create mode 100644 completions/bash/piglit

diff --git a/completions/bash/piglit b/completions/bash/piglit
new file mode 100644
index 000..1227ab6
--- /dev/null
+++ b/completions/bash/piglit
@@ -0,0 +1,435 @@
+#!/bin/bash
+
+# Bash completions for piglit
+# Copyright © 2016 Intel Corporation
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+# OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+# DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
+# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+# This provides completions for piglit in bash
+#
+# It requires debian's bash_completions (which are avialable on most
+# linux and BSD OSes) for it's _filedir function.
+
+__piglit_results_extensions="@(json|json.xz|json.gz|json.bz2)"
+
+# Function that handles 'piglit run'
+#
+# This is a *very* complex function. It handles *most*, but not all of the
+# functionality of 'piglit run'.
+#
+# This handles everything piglit run expects, with one small caviat, after the
+# first profile is provided, it mixes profiles and directories together, since
+# either addtional profiles or a directory can be provided. After something
+# that isn't a profile is provided it wont auto complete any more positional
+# arguments.
+__piglit_run() {
+local cur=${COMP_WORDS[COMP_CWORD]}
+local prev=${COMP_WORDS[COMP_CWORD-1]}
+local opts="-h --help -f --config -n --name -d --dry-run \
+-t --include-tests -x --exclude-tests -b \
+--backend -c --all-concurrent -1 \
+--no-concurrency -p --platform --valgrind \
+--dmesg -s --sync --junit_suffix -l \
+--log-level --test-list -p --platform"
+local with_args=("-f" "--config" "-b" "--backend" "--junit_suffix"
+ "-l" "--log-level" "--test-list" "-n" "--name"
+ "-p" "--platform")
+local profiles=("all" "cl" "cpu" "cts" "deqp_gles2" "deqp_gles3"
+"deqp_gles31" "glslparser" "gpu" "igt" "llvmpipe"
+"oglconform" "quick_cl" "quick" "sanity" "shader"
+"xts" "xts-render")
+
+# If the argument begins with - then just show the -* options
+if [[ "$cur" == -* ]]; then
+COMPREPLY=( $(compgen -W "${opts}" -- $cur)  )
+return 0
+fi
+
+case "$prev" in
+"-f" | "--config")
+_filedir '@(conf)'
+return 0
+;;
+"-b" | "--backend")
+COMPREPLY=( $(compgen -W "json junit" -- $cur)  )
+return 0
+;;
+"-l" | "--loglevel")
+COMPREPLY=( $(compgen -W "quiet verbose dummy http" -- $cur) )
+return 0
+;;
+"--test-list")
+_filedir
+return 0
+;;
+"-p" | "--platform")
+COMPREPLY=( $(compgen -W "glx x11_egl wayland gbm mixed_glx_egl" 
-- $cur) )
+return 0
+;;
+"-n" | "--name" | "--junit_suffix")
+return 0
+;;
+esac
+
+
+# Find any positional arguments.
+# Positional arguments are arguments that don't start with - and that don't
+# follow an argument that requires a positional argument
+local list=( "${COMP_WORDS[@]:2}" )  # remove "piglit run"
+local positional=0
+if [[ ${#list[@]} -gt 0 ]]; then
+for i in "${!list[@]}"; do
+# If the element is an option argument continue
+[[ 

[Piglit] [PATCH 3/3] README: add shell completions

2016-02-10 Thread Dylan Baker
Signed-off-by: Dylan Baker 
---
 README | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/README b/README
index e371746..535a26e 100644
--- a/README
+++ b/README
@@ -318,6 +318,16 @@ result if there are no subtests. This means that the 
number shown by 'piglit
 run' will be less than or equal to the number calculated by 'piglit summary'.
 
 
+3.3 Shell Completions
+-
+
+Piglit has completions for bash, located in completions/bash/piglit. Once this
+file is sourced into bash `piglit` and `./piglit` will have tab completion
+available. For global availability place the file somewhere that bash will
+source the file on startup. If piglit is installed and bash-completions are
+available, then this completion file will be installed system-wide.
+
+
 4. Available test sets
 --
 
-- 
2.7.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 0/3] Add bash completions for piglit

2016-02-10 Thread Dylan Baker
Here is a complete and as accurate as I can get completions file for
piglit in bash. This has a dependecy on the bash_completions package
that debian provides, although if someone cared about supporting bash
without it they could probably add a fallback mechanism.

Dylan Baker (3):
  completions/bash: Add a completion file for piglit
  CMake: install bash completions
  README: add shell completions

 CMakeLists.txt  |   9 +
 README  |  10 ++
 completions/bash/piglit | 435 
 3 files changed, 454 insertions(+)
 create mode 100644 completions/bash/piglit

-- 
2.7.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH 2/3] CMake: install bash completions

2016-02-10 Thread Dylan Baker
This uses the bash-completion cmake file provided by bash-completions to
install the file to the system (if one does a system install). Otherwise
one can just copy the file to somewhere it will get sourced by their
bashrc.

Signed-off-by: Dylan Baker 
---
 CMakeLists.txt | 9 +
 1 file changed, 9 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b822934..cc7929c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -208,6 +208,8 @@ find_package(PythonNumpy 1.6.2 REQUIRED)
 find_package(PythonMako 0.8.0 REQUIRED)
 find_package(PythonSix 1.4.0 REQUIRED)
 
+find_package(bash-completion CONFIG)
+
 # Default to compiling with debug information (`gcc -g`):
 if(NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE Debug CACHE STRING
@@ -518,6 +520,13 @@ install (
REGEX "CMakeFiles|CMakeLists" EXCLUDE
 )
 
+if (BASH_COMPLETION_FOUND)
+   install(
+   FILES completions/bash/piglit
+   DESTINATION 
${CMAKE_INSTALL_PREFIX}/${BASH_COMPLETION_COMPLETIONSDIR}/
+   )
+endif (BASH_COMPLETION_FOUND)
+
 if (WIN32)
set (PYTHON_SUFFIX ".py")
 else ()
-- 
2.7.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] oclconform: Encode regex with 'unicode_escape' instead for 'string_escape'

2016-02-10 Thread Tom Stellard
This fixes a run-time error with python 3.4.
---
 framework/test/oclconform.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/framework/test/oclconform.py b/framework/test/oclconform.py
index cad00dd..0a64499 100644
--- a/framework/test/oclconform.py
+++ b/framework/test/oclconform.py
@@ -87,7 +87,7 @@ def add_oclconform_tests(profile):
'list_subtests')
 subtest_regex = PIGLIT_CONFIG.get(test_section_name,
   'subtest_regex')
-subtest_regex.encode('string_escape')
+subtest_regex.encode('unicode_escape')
 run_subtests = PIGLIT_CONFIG.get(test_section_name, 'run_subtest')
 list_tests = list_tests.split()
 
-- 
2.0.4

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] oclconform: Encode regex with 'unicode_escape' instead for 'string_escape'

2016-02-10 Thread Dylan Baker
Never mind my last question, your other email was just further down in
my inbox.

Dylan

Quoting Tom Stellard (2016-02-10 16:29:11)
> This fixes a run-time error with python 3.4.
> ---
>  framework/test/oclconform.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/framework/test/oclconform.py b/framework/test/oclconform.py
> index cad00dd..0a64499 100644
> --- a/framework/test/oclconform.py
> +++ b/framework/test/oclconform.py
> @@ -87,7 +87,7 @@ def add_oclconform_tests(profile):
> 'list_subtests')
>  subtest_regex = PIGLIT_CONFIG.get(test_section_name,
>'subtest_regex')
> -subtest_regex.encode('string_escape')
> +subtest_regex.encode('unicode_escape')
>  run_subtests = PIGLIT_CONFIG.get(test_section_name, 
> 'run_subtest')
>  list_tests = list_tests.split()
>  
> -- 
> 2.0.4
> 


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] oclconform: Encode regex with 'unicode_escape' instead for 'string_escape'

2016-02-10 Thread Dylan Baker
I wouldn't have come up with that just looking at it, but yeah, that
makes sense.

Reviewed-by: Dylan Baker 

As an aside: Do you need the patch that I sent or is it useless?

Quoting Tom Stellard (2016-02-10 16:29:11)
> This fixes a run-time error with python 3.4.
> ---
>  framework/test/oclconform.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/framework/test/oclconform.py b/framework/test/oclconform.py
> index cad00dd..0a64499 100644
> --- a/framework/test/oclconform.py
> +++ b/framework/test/oclconform.py
> @@ -87,7 +87,7 @@ def add_oclconform_tests(profile):
> 'list_subtests')
>  subtest_regex = PIGLIT_CONFIG.get(test_section_name,
>'subtest_regex')
> -subtest_regex.encode('string_escape')
> +subtest_regex.encode('unicode_escape')
>  run_subtests = PIGLIT_CONFIG.get(test_section_name, 
> 'run_subtest')
>  list_tests = list_tests.split()
>  
> -- 
> 2.0.4
> 


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] python: function with six version 1.5.2

2016-02-10 Thread Dylan Baker
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.

cc: Brian Paul 
Signed-off-by: Dylan Baker 
---

Brian, This gets at least all of the unit tests running with the version
of six you have. I can adjust more things if you continue to have
problems.

Ideally if you can upgrade six that would be better, but I understand
that isn't always possible, so if you can't upgrade six we'll just have
to merge this.

 CMakeLists.txt|  2 +-
 framework/backends/compression.py |  4 ++--
 framework/backends/json.py|  4 ++--
 framework/compat.py   | 36 ++--
 framework/exceptions.py   |  7 ---
 framework/status.py   |  6 +++---
 tox.ini   |  4 ++--
 unittests/core_tests.py   | 11 ++-
 unittests/summary_html_tests.py   | 11 ++-
 unittests/utils.py| 16 
 10 files changed, 80 insertions(+), 21 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b822934..d136edc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -206,7 +206,7 @@ set(Python_ADDITIONAL_VERSIONS
 find_package(PythonInterp REQUIRED)
 find_package(PythonNumpy 1.6.2 REQUIRED)
 find_package(PythonMako 0.8.0 REQUIRED)
-find_package(PythonSix 1.4.0 REQUIRED)
+find_package(PythonSix 1.5.2 REQUIRED)
 
 # Default to compiling with debug information (`gcc -g`):
 if(NOT CMAKE_BUILD_TYPE)
diff --git a/framework/backends/compression.py 
b/framework/backends/compression.py
index 863693e..96565ec 100644
--- a/framework/backends/compression.py
+++ b/framework/backends/compression.py
@@ -51,7 +51,7 @@ import contextlib
 import six
 from six.moves import cStringIO as StringIO
 
-from framework import exceptions
+from framework import exceptions, compat
 from framework.core import PIGLIT_CONFIG
 
 __all__ = [
@@ -62,7 +62,7 @@ __all__ = [
 ]
 
 
-@six.python_2_unicode_compatible
+@compat.python_2_unicode_compatible
 class UnsupportedCompressor(exceptions.PiglitInternalError):
 def __init__(self, method, *args, **kwargs):
 super(UnsupportedCompressor, self).__init__(*args, **kwargs)
diff --git a/framework/backends/json.py b/framework/backends/json.py
index c4074fd..1219099 100644
--- a/framework/backends/json.py
+++ b/framework/backends/json.py
@@ -35,7 +35,7 @@ except ImportError:
 
 import six
 
-from framework import status, results, exceptions
+from framework import status, results, exceptions, compat
 from .abstract import FileBackend, write_compressed
 from .register import Registry
 from . import compression
@@ -582,7 +582,7 @@ def _update_seven_to_eight(result):
 This value is used for both TestResult.time and TestrunResult.time_elapsed.
 
 """
-for test in six.viewvalues(result.tests):
+for test in compat.viewvalues(result.tests):
 test.time = results.TimeAttribute(end=test.time)
 
 result.time_elapsed = results.TimeAttribute(end=result.time_elapsed)
diff --git a/framework/compat.py b/framework/compat.py
index 3c8e490..114ca36 100644
--- a/framework/compat.py
+++ b/framework/compat.py
@@ -18,7 +18,7 @@
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 # SOFTWARE.
 
-"""A small library that adds a single compatability decorator for python 2/3.
+"""A small library that contains libraries equivalent to six
 
 This function is pending upstreaming in six.
 
@@ -30,7 +30,6 @@ from __future__ import (
 
 import six
 
-
 def python_2_bool_compatible(class_):
 """A decorator to fix __bool__/__nonzero__ name changes."""
 if six.PY2:
@@ -41,3 +40,36 @@ def python_2_bool_compatible(class_):
 "@python_2_bool_compatible cannot be applied to {} because "
 "it doesn't define __bool__().".format(class_.__name__))
 return class_
+
+
+# Some version of six don't have this function
+try:
+from six import python_2_unicode_compatible
+except ImportError:
+def python_2_unicode_compatible(class_):
+"""A decorator to fix __str/__bytes__/__unicode__ name changes."""
+if six.PY2:
+failed = False
+try:
+class_.__unicode__ = class_.__str__
+except AttributeError:
+failed = True
+
+try:
+class_.__str__ = class_.__bytes__
+except AttributeError:
+if failed:
+raise ValueError(
+"@python_2_unicode_compatible cannot be applied to {} "
+"because it doesn't define __str__() "
+"or __bytes__().".format(class_.__name__))
+   

Re: [Piglit] [PATCH] framework/test/{opencv, oclconform}: fix subprocess returning bytes

2016-02-10 Thread Tom Stellard
On Wed, Feb 10, 2016 at 01:42:12PM -0800, Dylan Baker wrote:
> During the hybridization this little bit was missed, causing the to
> subprocess to return bytes, while the rest of the code expected unicode.
> 

This fixes most issues.  I sent another patch for the remaining one.

> cc: Tom Stellard 
> Signed-off-by: Dylan Baker 

Tested-by: Tom Stellard 

> ---
> 
> I think this hsould fix your issue Tom, but I'm not exactly sure how to
> set up opencv tests and oclconform to check.
> 
>  framework/test/oclconform.py | 4 ++--
>  framework/test/opencv.py | 3 ++-
>  2 files changed, 4 insertions(+), 3 deletions(-)
> 
> diff --git a/framework/test/oclconform.py b/framework/test/oclconform.py
> index 48e4b72..cad00dd 100644
> --- a/framework/test/oclconform.py
> +++ b/framework/test/oclconform.py
> @@ -91,8 +91,8 @@ def add_oclconform_tests(profile):
>  run_subtests = PIGLIT_CONFIG.get(test_section_name, 
> 'run_subtest')
>  list_tests = list_tests.split()
>  
> -subtests = subprocess.check_output(args=list_tests,
> -   cwd=bindir).split('\n')
> +subtests = subprocess.check_output(
> +args=list_tests, cwd=bindir).decode('utf-8').split('\n')
>  for subtest in subtests:
>  m = re.match(subtest_regex, subtest)
>  if not m:
> diff --git a/framework/test/opencv.py b/framework/test/opencv.py
> index 3b9a12e..a31d562 100644
> --- a/framework/test/opencv.py
> +++ b/framework/test/opencv.py
> @@ -60,7 +60,8 @@ def add_opencv_tests(profile):
>  print('Warning: {} does not exist.\nSkipping OpenCV '
>'tests...'.format(opencv_test_ocl))
>  return
> -tests = subprocess.check_output([opencv_test_ocl, '--gtest_list_tests'])
> +tests = subprocess.check_output(
> +[opencv_test_ocl, '--gtest_list_tests']).decode('utf-8')
>  test_list = tests.splitlines()
>  group_name = ''
>  full_test_name = ''
> -- 
> 2.7.1
> 
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [ANNOUNCE] python 3 is here... and python 2 is staying

2016-02-10 Thread Brian Paul

On 02/09/2016 01:44 PM, Brian Paul wrote:

On 02/09/2016 01:33 PM, Dylan Baker wrote:

Quoting Brian Paul (2016-02-09 11:10:06)

On 02/09/2016 11:03 AM, Matt Turner wrote:

On Tue, Feb 9, 2016 at 10:02 AM, Ilia Mirkin 
wrote:

On Tue, Feb 9, 2016 at 12:55 PM, Dylan Baker
 wrote:

Quoting Matt Turner (2016-02-08 21:06:58)

On Mon, Feb 8, 2016 at 3:12 PM, Dylan Baker
 wrote:

I just pushed patches to hybridize the framework to use either
python
3.3+ or 2.7.

Everything should keep working as normal. Unless you have python
3.x,
then you'll need to rerun CMake to pick up the changes.


There's still a handful of *.py files with #!/usr/bin/env python2:

generated_tests/random_ubo-arb_uniform_buffer_object.py:#!/usr/bin/env
python2
generated_tests/random_ubo.py:#!/usr/bin/env python2
generated_tests/random_ubo_trim.py:#!/usr/bin/env python2
piglit-print-commands.py:#!/usr/bin/env python2
piglit-resume.py:#!/usr/bin/env python2
piglit-run.py:#!/usr/bin/env python2
piglit-summary-html.py:#!/usr/bin/env python2
piglit-summary.py:#!/usr/bin/env python2
self-tests/test-installed-piglit-script-imports-correct-framework-module:#!/usr/bin/env

python2



I thought I'd mentioned that in the commit, but apparently I did
only in
the cover letter.

The random_ubo_stuff is not plugged into anything at the moment,
and I
have a WIP branch for those, but getting the same output from
python 2
and python 3 for generators without numpy is tricky.

The piglit-* command were left intentionally. They're legacy
interfaces
and we don't add new ones when adding new functions to the 'piglit'
command (piglit summary aggregate, for example). Personally, I'd
rather
get rid of them (other than print-commands, which I should probably
update).


Really? I think it's a lot more straightforward to use them than the
"piglit" megarunner thing... not sure why that was added tbh. But
since the regular commands stayed, I didn't object at the time. Should
I have?


Yeah, I've continued using the piglit-run.py/piglit-summary.py
scripts. I don't know what I would gain by switching, but I would lose
the ability to tab complete their names. :)


I never use the 'piglit' command either.  But I just tried it now and it
crashed:

$ ./piglit
Traceback (most recent call last):
File "./piglit", line 107, in 
  import framework.programs.run as run
File "/home/brian/projects/piglit/framework/programs/run.py", line
34, in 
  from framework import core, backends, exceptions, options
File "/home/brian/projects/piglit/framework/core.py", line 35, in

  from framework import exceptions
File "/home/brian/projects/piglit/framework/exceptions.py", line 57,
in 
  @six.python_2_unicode_compatible
AttributeError: 'module' object has no attribute
'python_2_unicode_compatible'

Dylan?

-Brian

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Interesting. That looks like a six version issue. What version of six do
you have? If it's a problem we can replace or open-code the decorator
ourselves, it's not very complex.


$ dpkg -l python-six
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend

|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name   Version  Architecture Description
+++-==---=

ii  python-six 1.5.2-1  all  Python 2 and 3
compatibility libr


Any ideas on how to fix this, Dylan?

I can't run piglit as-is.

-Brian


___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 04/11] framework/test/opengl.py: Add FastSkipMixin which checks extensions

2016-02-10 Thread Dylan Baker
Quoting Marek Olšák (2016-02-10 13:37:57)
> On Mon, Jan 4, 2016 at 7:04 PM, Dylan Baker  wrote:
> > Okay. I'm going to push the patch Jose reviewed, and I'll send out a patch
> > (and CC both of you) that adds an environment variable to turn fast skipping
> > off.
> >
> > If you could, I'd appreciate the output of wflinfo from the driver in
> > question.
> 
> The output of "wflinfo --platform gbm --api gl" is:
> 
> ATTENTION: default value of option vblank_mode overridden by environment.
> Waffle platform: gbm
> Waffle api: gl
> OpenGL vendor string: X.Org
> OpenGL renderer string: Gallium 0.4 on AMD CAPE VERDE (DRM 2.43.0, LLVM 3.9.0)
> OpenGL version string: 3.0 Mesa 11.2.0-devel (git-9ffae12)
> 
> It still happens with current master:
> 
> Exception: Unreachable
> Traceback (most recent call last):ail: 55 \/-\
>   File "/home/marek/dev/piglit/framework/test/base.py", line 204, in execute
> self.run()
>   File "/home/marek/dev/piglit/framework/test/base.py", line 254, in run
> self.is_skip()
>   File "/home/marek/dev/piglit/framework/test/opengl.py", line 359, in is_skip
> if (self.__info.glsl_version is not None
>   File "/home/marek/dev/piglit/framework/core.py", line 207, in __get__
> value = self.__func(instance)
>   File "/home/marek/dev/piglit/framework/test/opengl.py", line 255, in
> glsl_version
> 'OpenGL shading language').split()[-1][:4])
>   File "/home/marek/dev/piglit/framework/test/opengl.py", line 115, in 
> __getline
> raise Exception('Unreachable')
> 
> Also the exception is thrown by a lot of tests.
> 
> Thanks for any suggestions,
> 
> Marek

I have patches to waffle to add a JSON mode and make everything more
robust, but those seem to have stalled.

In the short term the environment variable "PIGLIT_NO_FAST_SKIP=1"
should disable the fast skipping and get around the issue.

Dylan


signature.asc
Description: signature
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] framework/test/{opencv, oclconform}: fix subprocess returning bytes

2016-02-10 Thread Dylan Baker
During the hybridization this little bit was missed, causing the to
subprocess to return bytes, while the rest of the code expected unicode.

cc: Tom Stellard 
Signed-off-by: Dylan Baker 
---

I think this hsould fix your issue Tom, but I'm not exactly sure how to
set up opencv tests and oclconform to check.

 framework/test/oclconform.py | 4 ++--
 framework/test/opencv.py | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/framework/test/oclconform.py b/framework/test/oclconform.py
index 48e4b72..cad00dd 100644
--- a/framework/test/oclconform.py
+++ b/framework/test/oclconform.py
@@ -91,8 +91,8 @@ def add_oclconform_tests(profile):
 run_subtests = PIGLIT_CONFIG.get(test_section_name, 'run_subtest')
 list_tests = list_tests.split()
 
-subtests = subprocess.check_output(args=list_tests,
-   cwd=bindir).split('\n')
+subtests = subprocess.check_output(
+args=list_tests, cwd=bindir).decode('utf-8').split('\n')
 for subtest in subtests:
 m = re.match(subtest_regex, subtest)
 if not m:
diff --git a/framework/test/opencv.py b/framework/test/opencv.py
index 3b9a12e..a31d562 100644
--- a/framework/test/opencv.py
+++ b/framework/test/opencv.py
@@ -60,7 +60,8 @@ def add_opencv_tests(profile):
 print('Warning: {} does not exist.\nSkipping OpenCV '
   'tests...'.format(opencv_test_ocl))
 return
-tests = subprocess.check_output([opencv_test_ocl, '--gtest_list_tests'])
+tests = subprocess.check_output(
+[opencv_test_ocl, '--gtest_list_tests']).decode('utf-8')
 test_list = tests.splitlines()
 group_name = ''
 full_test_name = ''
-- 
2.7.1

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH 04/11] framework/test/opengl.py: Add FastSkipMixin which checks extensions

2016-02-10 Thread Marek Olšák
On Mon, Jan 4, 2016 at 7:04 PM, Dylan Baker  wrote:
> Okay. I'm going to push the patch Jose reviewed, and I'll send out a patch
> (and CC both of you) that adds an environment variable to turn fast skipping
> off.
>
> If you could, I'd appreciate the output of wflinfo from the driver in
> question.

The output of "wflinfo --platform gbm --api gl" is:

ATTENTION: default value of option vblank_mode overridden by environment.
Waffle platform: gbm
Waffle api: gl
OpenGL vendor string: X.Org
OpenGL renderer string: Gallium 0.4 on AMD CAPE VERDE (DRM 2.43.0, LLVM 3.9.0)
OpenGL version string: 3.0 Mesa 11.2.0-devel (git-9ffae12)

It still happens with current master:

Exception: Unreachable
Traceback (most recent call last):ail: 55 \/-\
  File "/home/marek/dev/piglit/framework/test/base.py", line 204, in execute
self.run()
  File "/home/marek/dev/piglit/framework/test/base.py", line 254, in run
self.is_skip()
  File "/home/marek/dev/piglit/framework/test/opengl.py", line 359, in is_skip
if (self.__info.glsl_version is not None
  File "/home/marek/dev/piglit/framework/core.py", line 207, in __get__
value = self.__func(instance)
  File "/home/marek/dev/piglit/framework/test/opengl.py", line 255, in
glsl_version
'OpenGL shading language').split()[-1][:4])
  File "/home/marek/dev/piglit/framework/test/opengl.py", line 115, in __getline
raise Exception('Unreachable')

Also the exception is thrown by a lot of tests.

Thanks for any suggestions,

Marek
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] [PATCH] program_interface_query: no need to check link status when using piglit_build_simple_program_multiple_shaders

2016-02-10 Thread Alejandro Piñeiro
From piglit_build_simple_program_multiple_shaders documentation:
/**
 * Builds and links a program from optional sources, throwing
 * PIGLIT_FAIL on error. The last target must be 0.
 */

So internally is already calling piglit_link_check_status, deleting
the program and reporting PIGLIT_FAIL if fails.

So it is not needed to check the link status. That would be needed
when using piglit_build_simple_program_unlinked_multiple_shaders.
---
 .../arb_program_interface_query/getprogramresourceiv.c   | 16 
 1 file changed, 16 deletions(-)

diff --git a/tests/spec/arb_program_interface_query/getprogramresourceiv.c 
b/tests/spec/arb_program_interface_query/getprogramresourceiv.c
index aff7c86..28cfc27 100755
--- a/tests/spec/arb_program_interface_query/getprogramresourceiv.c
+++ b/tests/spec/arb_program_interface_query/getprogramresourceiv.c
@@ -982,10 +982,6 @@ piglit_init(int argc, char **argv)
GL_GEOMETRY_SHADER, gs_stor,
GL_FRAGMENT_SHADER, fs_stor,
0);
-   if (!piglit_link_check_status(prog_stor)) {
-   glDeleteProgram(prog_stor);
-   piglit_report_result(PIGLIT_FAIL);
-   }
}
 
if (piglit_is_extension_supported("GL_ARB_explicit_attrib_location") &&
@@ -994,10 +990,6 @@ piglit_init(int argc, char **argv)
GL_VERTEX_SHADER, vs_loc,
GL_FRAGMENT_SHADER, fs_loc,
0);
-   if (!piglit_link_check_status(prog_loc)) {
-   glDeleteProgram(prog_loc);
-   piglit_report_result(PIGLIT_FAIL);
-   }
}
 
if (piglit_is_extension_supported("GL_ARB_shader_atomic_counters")) {
@@ -1026,10 +1018,6 @@ piglit_init(int argc, char **argv)
GL_GEOMETRY_SHADER, gs_sub,
GL_FRAGMENT_SHADER, fs_sub,
0);
-   if (!piglit_link_check_status(prog_sub)) {
-   glDeleteProgram(prog_sub);
-   piglit_report_result(PIGLIT_FAIL);
-   }
 
if (piglit_is_extension_supported("GL_ARB_tessellation_shader")) {
prog_sub_tess =
@@ -1052,10 +1040,6 @@ piglit_init(int argc, char **argv)
prog_cs = piglit_build_simple_program_multiple_shaders(
GL_COMPUTE_SHADER, cs_sub,
0);
-   if (!piglit_link_check_status(prog_cs)) {
-   glDeleteProgram(prog_cs);
-   piglit_report_result(PIGLIT_FAIL);
-   }
}
 }
 
-- 
2.5.0

___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [PATCH] Fix invalid glShaderSource call in pipeline_stats_comp.

2016-02-10 Thread Mark Janes
Reviewed-by: Mark Janes 

Kenneth Graunke  writes:

> The test was passing a pointer to an uninitialized integer value as the
> glShaderSource length parameter.  This is meant to be an array
> containing the length of each shader string.
>
> Instead, just pass NULL, which makes the GL assume the strings are
> null-terminated (which they are).
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93335
> Cc: Jordan Justen 
> Cc: Mark Janes 
> ---
>  tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c 
> b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c
> index 47a36b0..3c511f1 100644
> --- a/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c
> +++ b/tests/spec/arb_pipeline_statistics_query/pipeline_stats_comp.c
> @@ -79,7 +79,6 @@ static void
>  dispatch_size(uint32_t x, uint32_t y, uint32_t z)
>  {
>   char *compute_shader;
> - GLint shader_string_size;
>   GLuint shader = glCreateShader(GL_COMPUTE_SHADER);
>   GLint ok;
>   static GLint prog = 0;
> @@ -92,7 +91,7 @@ dispatch_size(uint32_t x, uint32_t y, uint32_t z)
>  
>   glShaderSource(shader, 1,
>  (const GLchar **) &compute_shader,
> -&shader_string_size);
> +NULL);
>  
>   glCompileShader(shader);
>  
> -- 
> 2.7.0
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] [ANNOUNCE] python 3 is here... and python 2 is staying

2016-02-10 Thread Daniel Vetter
On Tue, Feb 09, 2016 at 03:38:58PM -0500, Ilia Mirkin wrote:
> On Tue, Feb 9, 2016 at 3:31 PM, Dylan Baker  wrote:
> > Anecdotally, I find the opposite, not having completions is maddening.
> > so, to each his own I guess.
> 
> Yeah, I'm sure lots of people love them -- a ton of packages include
> them, etc -- that wouldn't happen without at least *someone* liking
> them :) Just pointing out that the bash completions aren't necessarily
> going to be used by everyone.

+1 from me for bash completions, in case that would speed them up ;-) I've
written basic ones for the drm-intel-maintainer tooling too.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
___
Piglit mailing list
Piglit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/piglit