[Piglit] [Patch v2 01/13] *.tests: set __all__ = ['profile']

Dylan Baker baker.dylan.c at gmail.com
Wed Jan 8 16:24:59 PST 2014


This makes the only publicly declared object in the .tests files the
profile object. This is groundwork for importing the profile rather than
running it via execfile().

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 tests/all.tests        | 2 ++
 tests/all_cl.tests     | 2 ++
 tests/es3conform.tests | 2 ++
 tests/gpu.tests        | 2 ++
 tests/igt.tests        | 2 ++
 tests/oglconform.tests | 2 ++
 tests/quick.tests      | 2 ++
 tests/r300.tests       | 2 ++
 tests/r500.tests       | 2 ++
 tests/sanity.tests     | 2 ++
 10 files changed, 20 insertions(+)

diff --git a/tests/all.tests b/tests/all.tests
index edf066b..b09340d 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -1,5 +1,7 @@
 # -*- coding: utf-8 -*-
 # All tests that come with piglit, using default settings
+#
+__all__ = ['profile']
 
 import itertools
 import os
diff --git a/tests/all_cl.tests b/tests/all_cl.tests
index 57bfe3e..a7d7106 100644
--- a/tests/all_cl.tests
+++ b/tests/all_cl.tests
@@ -2,6 +2,8 @@
 # -*- coding: utf-8 -*-
 # All OpenCL tests that come with piglit, using default settings
 
+__all__ = ['profile']
+
 import os
 import os.path as path
 
diff --git a/tests/es3conform.tests b/tests/es3conform.tests
index b0e6ef0..1995a9c 100644
--- a/tests/es3conform.tests
+++ b/tests/es3conform.tests
@@ -29,6 +29,8 @@ from glob import glob
 from framework.core import TestProfile, testBinDir
 from framework.exectest import ExecTest
 
+__all__ = ['profile']
+
 #############################################################################
 ##### GTFTest: Execute a sub-test of the Khronos ES 3.0 Conformance suite.
 #####
diff --git a/tests/gpu.tests b/tests/gpu.tests
index 00a75df..7ed4418 100644
--- a/tests/gpu.tests
+++ b/tests/gpu.tests
@@ -5,6 +5,8 @@
 import framework.glsl_parser_test
 import os.path
 
+__all__ = ['profile']
+
 global profile
 
 # Filter out any GLSLParserTest instances, as they're compiler tests.
diff --git a/tests/igt.tests b/tests/igt.tests
index df747e3..5f52e49 100644
--- a/tests/igt.tests
+++ b/tests/igt.tests
@@ -31,6 +31,8 @@ from os import path
 from framework.core import testBinDir, TestProfile, TestResult
 from framework.exectest import ExecTest
 
+__all__ = ['profile']
+
 #############################################################################
 ##### IGTTest: Execute an intel-gpu-tools test
 #####
diff --git a/tests/oglconform.tests b/tests/oglconform.tests
index ace2f9c..b9b79b8 100644
--- a/tests/oglconform.tests
+++ b/tests/oglconform.tests
@@ -30,6 +30,8 @@ from framework.core import TestProfile, testBinDir
 from framework.exectest import ExecTest
 from os import path
 
+__all__ = ['profile']
+
 bin_oglconform = path.join(testBinDir, 'oglconform')
 
 if not os.path.exists(bin_oglconform):
diff --git a/tests/quick.tests b/tests/quick.tests
index 61dd600..fca5559 100644
--- a/tests/quick.tests
+++ b/tests/quick.tests
@@ -5,6 +5,8 @@ import os.path
 global profile
 from framework.gleantest import GleanTest
 
+__all__ = ['profile']
+
 GleanTest.globalParams += [ "--quick" ]
 
 execfile(os.path.dirname(__file__) + '/all.tests')
diff --git a/tests/r300.tests b/tests/r300.tests
index 8cf73cb..e7c2209 100644
--- a/tests/r300.tests
+++ b/tests/r300.tests
@@ -4,6 +4,8 @@
 
 import os.path
 
+__all__ = ['profile']
+
 global profile
 
 execfile(os.path.dirname(__file__) + '/quick.tests')
diff --git a/tests/r500.tests b/tests/r500.tests
index 1c2a08d..57b80ce 100644
--- a/tests/r500.tests
+++ b/tests/r500.tests
@@ -4,6 +4,8 @@
 
 import os.path
 
+__all__ = ['profile']
+
 global profile
 
 execfile(os.path.dirname(__file__) + '/quick.tests')
diff --git a/tests/sanity.tests b/tests/sanity.tests
index 8fd6bfa..262172c 100644
--- a/tests/sanity.tests
+++ b/tests/sanity.tests
@@ -5,6 +5,8 @@
 from framework.core import Group, TestProfile
 from framework.gleantest import GleanTest
 
+__all__ = ['profile']
+
 glean = Group()
 glean['basic'] = GleanTest('basic')
 glean['readPixSanity'] = GleanTest('readPixSanity')
-- 
1.8.5.2



More information about the Piglit mailing list