[Piglit] [PATCH 1/5] all.tests: Fix plain_test()

Chad Versace chad.versace at linux.intel.com
Mon Dec 3 10:56:39 PST 2012


Allow the command string to plain_test() to contain spaces, so we can use
it like this:
    group[name] = plain_test('exe --arg1 --arg2')

CC: Eric Anholt <eric at anholt.net>
CC: Kenneth Graunke <kenneth at whitecape.org>
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
 tests/all.tests | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/all.tests b/tests/all.tests
index 9723b4d..6d3ddcd 100644
--- a/tests/all.tests
+++ b/tests/all.tests
@@ -5,6 +5,7 @@ import itertools
 import os
 import os.path as path
 import platform
+import shlex
 
 from framework.core import *
 from framework.exectest import *
@@ -28,8 +29,8 @@ generatedTestDir = os.path.join(
 	'generated_tests')
 
 # Quick wrapper for PlainExecTest for our usual concurrent args.
-def plain_test(name):
-	return PlainExecTest([name, '-auto'])
+def plain_test(args):
+	return PlainExecTest(shlex.split(args) + ['-auto'])
 
 def add_single_param_test_set(group, name, *params):
     for param in params:
-- 
1.7.11.7



More information about the Piglit mailing list