Re: [Piglit] RFC: rename test/all.tests to tests/all_tests.py

2013-05-03 Thread Brian Paul

On 05/02/2013 07:47 PM, Dylan Baker wrote:

While I'm not against renaming all.tests;

We already have include/exclude switches in piglit, what about loading
the include/exclude switches with blacklists, like with a --profile
switch or something similar?


Since we generate the main list of tests programmatically, I think 
people will also be interested in blacklisting tests programmatically. 
 Between the patch I posted earlier and this renaming change, my 
needs are covered.  I wouldn't object to another blacklist or profile 
mechanism, but I don't have any time to work on that now.




Also python standard very strongly suggests not using `'from module
import *'


Yup.  I think it's OK in this case though.

-Brian



On Thu, May 2, 2013 at 2:18 PM, Tom Gall mailto:tom.g...@linaro.org>> wrote:

+1

I've had a all_gles2.tests I've been maintaining in my own git repo
which could easily evolve to use this. I'm sure I'm not the only
person that would like to make use of this.

On Thu, May 2, 2013 at 4:03 PM, Brian Paul mailto:bri...@vmware.com>> wrote:
 >
 > I'd like to rename tests/all.tests (and the others) to
something like
 > tests/all_tests.py.
 >
 > The contents of all.tests is Python code so putting the .py
suffix on it
 > makes sense.  Then, I'd like to be able to import that code
into another
 > test spec file where I do blacklisting.
 >
 > For example, I want to create a test spec file
"vmware_tests.py" that
 > executes everything in all.tests except for stuff we don't want
to test.  An
 > example "vmware_tests.py" file might be something like:
 >
 > import sys
 > sys.path.append("tests")
 > from all_tests import *
 >
 > black_list= [
 > "spec/!OpenGL 3.1/*",
 > "*glean*"
 > ]
 >
 > # Remove the blacklisted tests from the test profile
 > for t in black_list:
 >profile.remove_test(t)
 >
 >
 >
 > As it is now we can't do "import all.tests" in Python.  Renaming to
 > all_tests.py fixes that problem.
 >
 > -Brian
 >
 > ___
 > Piglit mailing list
 > Piglit@lists.freedesktop.org 
 > http://lists.freedesktop.org/mailman/listinfo/piglit



--
Regards,
Tom

"Where's the kaboom!? There was supposed to be an earth-shattering
kaboom!" Marvin Martian
Tech Lead, Graphics Working Group | Linaro.org │ Open source software
for ARM SoCs
w) tom.gall att linaro.org 
h) tom_gall att mac.com 
___
Piglit mailing list
Piglit@lists.freedesktop.org 
http://lists.freedesktop.org/mailman/listinfo/piglit




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


Re: [Piglit] RFC: rename test/all.tests to tests/all_tests.py

2013-05-02 Thread Dylan Baker
While I'm not against renaming all.tests;

We already have include/exclude switches in piglit, what about loading the
include/exclude switches with blacklists, like with a --profile switch or
something similar?

Also python standard very strongly suggests not using `'from module import
*'


On Thu, May 2, 2013 at 2:18 PM, Tom Gall  wrote:

> +1
>
> I've had a all_gles2.tests I've been maintaining in my own git repo
> which could easily evolve to use this. I'm sure I'm not the only
> person that would like to make use of this.
>
> On Thu, May 2, 2013 at 4:03 PM, Brian Paul  wrote:
> >
> > I'd like to rename tests/all.tests (and the others) to something like
> > tests/all_tests.py.
> >
> > The contents of all.tests is Python code so putting the .py suffix on it
> > makes sense.  Then, I'd like to be able to import that code into another
> > test spec file where I do blacklisting.
> >
> > For example, I want to create a test spec file "vmware_tests.py" that
> > executes everything in all.tests except for stuff we don't want to test.
>  An
> > example "vmware_tests.py" file might be something like:
> >
> > import sys
> > sys.path.append("tests")
> > from all_tests import *
> >
> > black_list= [
> >"spec/!OpenGL 3.1/*",
> >"*glean*"
> > ]
> >
> > # Remove the blacklisted tests from the test profile
> > for t in black_list:
> >profile.remove_test(t)
> >
> >
> >
> > As it is now we can't do "import all.tests" in Python.  Renaming to
> > all_tests.py fixes that problem.
> >
> > -Brian
> >
> > ___
> > Piglit mailing list
> > Piglit@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/piglit
>
>
>
> --
> Regards,
> Tom
>
> "Where's the kaboom!? There was supposed to be an earth-shattering
> kaboom!" Marvin Martian
> Tech Lead, Graphics Working Group | Linaro.org │ Open source software
> for ARM SoCs
> w) tom.gall att linaro.org
> h) tom_gall att mac.com
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


Re: [Piglit] RFC: rename test/all.tests to tests/all_tests.py

2013-05-02 Thread Tom Gall
+1

I've had a all_gles2.tests I've been maintaining in my own git repo
which could easily evolve to use this. I'm sure I'm not the only
person that would like to make use of this.

On Thu, May 2, 2013 at 4:03 PM, Brian Paul  wrote:
>
> I'd like to rename tests/all.tests (and the others) to something like
> tests/all_tests.py.
>
> The contents of all.tests is Python code so putting the .py suffix on it
> makes sense.  Then, I'd like to be able to import that code into another
> test spec file where I do blacklisting.
>
> For example, I want to create a test spec file "vmware_tests.py" that
> executes everything in all.tests except for stuff we don't want to test.  An
> example "vmware_tests.py" file might be something like:
>
> import sys
> sys.path.append("tests")
> from all_tests import *
>
> black_list= [
>"spec/!OpenGL 3.1/*",
>"*glean*"
> ]
>
> # Remove the blacklisted tests from the test profile
> for t in black_list:
>profile.remove_test(t)
>
>
>
> As it is now we can't do "import all.tests" in Python.  Renaming to
> all_tests.py fixes that problem.
>
> -Brian
>
> ___
> Piglit mailing list
> Piglit@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit



-- 
Regards,
Tom

"Where's the kaboom!? There was supposed to be an earth-shattering
kaboom!" Marvin Martian
Tech Lead, Graphics Working Group | Linaro.org │ Open source software
for ARM SoCs
w) tom.gall att linaro.org
h) tom_gall att mac.com
___
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit


[Piglit] RFC: rename test/all.tests to tests/all_tests.py

2013-05-02 Thread Brian Paul


I'd like to rename tests/all.tests (and the others) to something like 
tests/all_tests.py.


The contents of all.tests is Python code so putting the .py suffix on 
it makes sense.  Then, I'd like to be able to import that code into 
another test spec file where I do blacklisting.


For example, I want to create a test spec file "vmware_tests.py" that 
executes everything in all.tests except for stuff we don't want to 
test.  An example "vmware_tests.py" file might be something like:


import sys
sys.path.append("tests")
from all_tests import *

black_list= [
   "spec/!OpenGL 3.1/*",
   "*glean*"
]

# Remove the blacklisted tests from the test profile
for t in black_list:
   profile.remove_test(t)



As it is now we can't do "import all.tests" in Python.  Renaming to 
all_tests.py fixes that problem.


-Brian

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