[Piglit] [PATCH 2/9] python: replace Test argument runConcurrent with run_concurrent

Dylan Baker baker.dylan.c at gmail.com
Wed Apr 9 18:27:20 PDT 2014


>From python's PEP8:

 "Function names should be lowercase, with words separated by
 underscores as necessary to improve readability."

This patch was generated with the following shell command:
find . -name '*py' | xargs sed -i -e 's!runConcurrent!run_concurrent!g'

Signed-off-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 framework/core.py     | 4 ++--
 framework/exectest.py | 6 +++---
 tests/all.py          | 2 +-
 tests/cl.py           | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/framework/core.py b/framework/core.py
index 5238f60..fe84102 100644
--- a/framework/core.py
+++ b/framework/core.py
@@ -508,10 +508,10 @@ class TestProfile(object):
         else:
             # Filter and return only thread safe tests to the threaded pool
             multi.imap(test, (x for x in self.test_list.iteritems() if
-                              x[1].runConcurrent), chunksize)
+                              x[1].run_concurrent), chunksize)
             # Filter and return the non thread safe tests to the single pool
             single.imap(test, (x for x in self.test_list.iteritems() if not
-                               x[1].runConcurrent), chunksize)
+                               x[1].run_concurrent), chunksize)
 
         # Close and join the pools
         # If we don't close and the join the pools the script will exit before
diff --git a/framework/exectest.py b/framework/exectest.py
index 5280f6a..abf1059 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -49,13 +49,13 @@ else:
 
 
 class Test(object):
-    def __init__(self, command, runConcurrent=False):
+    def __init__(self, command, run_concurrent=False):
         '''
-                'runConcurrent' controls whether this test will
+                'run_concurrent' controls whether this test will
                 execute it's work (i.e. __doRunWork) on the calling thread
                 (i.e. the main thread) or from the ConcurrentTestPool threads.
         '''
-        self.runConcurrent = runConcurrent
+        self.run_concurrent = run_concurrent
         self.skip_test = False
         self.command = command
         self.split_command = os.path.split(self._command[0])[1]
diff --git a/tests/all.py b/tests/all.py
index 391b872..d218498 100644
--- a/tests/all.py
+++ b/tests/all.py
@@ -39,7 +39,7 @@ def add_plain_test(group, args):
 
 def concurrent_test(args):
     test = plain_test(args + ' -fbo')
-    test.runConcurrent = True
+    test.run_concurrent = True
     return test
 
 def add_concurrent_test(group, args):
diff --git a/tests/cl.py b/tests/cl.py
index 4134ffb..0b1e8be 100644
--- a/tests/cl.py
+++ b/tests/cl.py
@@ -20,7 +20,7 @@ def add_plain_test(group, name, args):
 
 def add_concurrent_test(group, name, args):
 	test = PiglitTest(args)
-	test.runConcurrent = true;
+	test.run_concurrent = true;
 	group[name] = PiglitTest(args)
 
 def add_plain_program_tester_test(group, name, path):
-- 
1.9.1



More information about the Piglit mailing list