[Piglit] [PATCH 1/4] Allow setting a cwd to execute tests from.

Dylan Baker baker.dylan.c at gmail.com
Fri Apr 4 15:39:36 PDT 2014


From: Eric Anholt <eric at anholt.net>

Reviewed-by: Dylan Baker <baker.dylan.c at gmail.com>
---
 framework/exectest.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/framework/exectest.py b/framework/exectest.py
index 6608067..c6c5067 100644
--- a/framework/exectest.py
+++ b/framework/exectest.py
@@ -61,6 +61,7 @@ class Test(object):
         self.split_command = os.path.split(self._command[0])[1]
         self.env = {}
         self.skip_test = self.check_for_skip_scenario(command)
+        self.cwd = None
 
         # This is a hook for doing some testing on execute right before
         # self.run is called.
@@ -260,6 +261,7 @@ class Test(object):
             proc = subprocess.Popen(command,
                                     stdout=subprocess.PIPE,
                                     stderr=subprocess.PIPE,
+                                    cwd=self.cwd,
                                     env=fullenv,
                                     universal_newlines=True)
             out, err = proc.communicate()
-- 
1.9.1



More information about the Piglit mailing list