[Piglit] assertion when test pattern not found

Brian Paul brianp at vmware.com
Wed Apr 12 15:13:08 UTC 2017

Hi Dylan,

I found that if I use the -t option for piglit-run.py but there's no 
match for the test name regex, we die with an assertion:

$ ./piglit-run.py  -t GL_ARB_texture_storage tests/quick.py results/foobar
/home/brianp/piglit/framework/test/base.py:78: UserWarning: Timeouts are 
not available
   warnings.warn('Timeouts are not available')
Traceback (most recent call last):
   File "./piglit-run.py", line 39, in <module>
     run([i.decode('utf-8') for i in sys.argv[1:]])
   File "/home/brianp/piglit/framework/exceptions.py", line 51, in _inner
     func(*args, **kwargs)
   File "/home/brianp/piglit/framework/programs/run.py", line 360, in run
     backend.finalize({'time_elapsed': time_elapsed.to_json()})
   File "/home/brianp/piglit/framework/backends/json.py", line 162, in 
     assert data['tests']

It took a while to figure out that I needed to use 
"gl_arb_texture_storage" instead of "GL_ARB_texture_storage".

Do you think we could handle this better and print a helpful error 
message such as "No matches for test name regex"?  The assertion we have 
now is pretty far removed from the cause.



More information about the Piglit mailing list