[Piglit] [PATCH piglit 2/2] Cleanup unnecessary imports.
Matěj Cepl
mcepl at redhat.com
Wed Oct 12 03:10:17 PDT 2011
> > @@ -200,6 +200,7 @@ def checkDir(dirname, failifexists):
> > os.makedirs(dirname)
> > except OSError, e:
> > if e.errno != errno.EEXIST:
> > + print>>sys.stderr, "Exception: %s" % e
> > raise
> >
>
> These two hunks look spurious. It doesn't seem like they're cleaning up any
> unnecessay imports.
Well, my faith prevents me from swalloving exceptions, but just for you I'll
commit a heresy. Change removed (the first one was really my mistake).
Matěj
------------------------------------------
While browsing through the code, I found plenty of unnecessary imports in
places where they were unnecessary.
Signed-off-by: Matěj Cepl <mcepl at redhat.com>
---
tests/all.tests | 1 -
tests/external-glslparser.tests | 4 +---
tests/quick-driver.tests | 7 +------
tests/quick.tests | 6 +-----
tests/r300.tests | 3 +--
tests/r500.tests | 3 +--
tests/r600.tests | 3 +--
7 files changed, 6 insertions(+), 21 deletions(-)
diff --git a/tests/all.tests b/tests/all.tests
index beb5d43..ada3fa6 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -5,7 +5,6 @@
import os
import os.path as path
import re
-import subprocess
from framework.core import *
from framework.exectest import *
diff --git a/tests/external-glslparser.tests b/tests/external-glslparser.tests
index f8ea1ac..087807e 100644
--- a/tests/external-glslparser.tests
+++ b/tests/external-glslparser.tests
@@ -2,9 +2,7 @@
# -*- coding: utf-8 -*-
# All tests that come with piglit, using default settings
-import os
-import re
-import subprocess
+import os.path
from framework.core import *
from framework.exectest import *
diff --git a/tests/quick-driver.tests b/tests/quick-driver.tests
index 8d05ee3..adfa89d 100644
--- a/tests/quick-driver.tests
+++ b/tests/quick-driver.tests
@@ -1,12 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
-import re
-import subprocess
-
-from framework.core import *
-from framework.exectest import *
-from framework.gleantest import *
+import os.path
execfile(os.path.dirname(__file__) + '/quick.tests')
diff --git a/tests/quick.tests b/tests/quick.tests
index b2c3212..702a69f 100644
--- a/tests/quick.tests
+++ b/tests/quick.tests
@@ -4,14 +4,10 @@
# Testing drivers for Radeon hardware
#
-import os
-import re
+import os.path
execfile(os.path.dirname(__file__) + '/all.tests')
-from framework.core import *
-from framework.gleantest import *
-
GleanTest.globalParams += [ "--quick" ]
del profile.tests['valgrind']
diff --git a/tests/r300.tests b/tests/r300.tests
index ac8096a..7b40460 100644
--- a/tests/r300.tests
+++ b/tests/r300.tests
@@ -3,8 +3,7 @@
# Testing the r300 DRI driver
#
-import os
-import re
+import os.path
execfile(os.path.dirname(__file__) + '/quick-driver.tests')
diff --git a/tests/r500.tests b/tests/r500.tests
index 32c8d5b..7276ac2 100644
--- a/tests/r500.tests
+++ b/tests/r500.tests
@@ -3,8 +3,7 @@
# Testing the r500 DRI driver
#
-import os
-import re
+import os.path
execfile(os.path.dirname(__file__) + '/quick-driver.tests')
diff --git a/tests/r600.tests b/tests/r600.tests
index 1b7bc7f..fe7426f 100644
--- a/tests/r600.tests
+++ b/tests/r600.tests
@@ -1,7 +1,6 @@
#!/usr/bin/env python
-import os
-import re
+import os.path
execfile(os.path.dirname(__file__) + '/quick-driver.tests')
--
1.7.1
More information about the Piglit
mailing list