diff options
author | Jon Severinsson <jon@severinsson.net> | 2013-04-13 01:39:50 +0200 |
---|---|---|
committer | Kenneth Graunke <kenneth@whitecape.org> | 2013-04-16 21:15:55 -0700 |
commit | b65d1923b1db8f6838e735b9798b35fe7615ff83 (patch) | |
tree | 57968807ef0ed128eb09dd74bc0d9734dbdc79e7 | |
parent | 6fbcc61ffdf50b0a17732f7fcdcd94a14926cb48 (diff) |
framework: Catch "No such file or directory" by errno, not strerr.
In Python 3.x the strerr is more verbose, and thus fails the equals
test.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
-rw-r--r-- | framework/exectest.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/exectest.py b/framework/exectest.py index a8ed8614..652ff4d2 100644 --- a/framework/exectest.py +++ b/framework/exectest.py @@ -20,6 +20,7 @@ # OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER # DEALINGS IN THE SOFTWARE. +import errno import os import subprocess import shlex @@ -196,7 +197,7 @@ class ExecTest(Test): # a developer chooses to not build a test, # Piglit should not report that test as having # failed. - if e.strerror == "No such file or directory": + if e.errno == errno.ENOENT: out = "PIGLIT: {'result': 'skip'}\n" \ + "Test executable not found.\n" err = "" |