[libcxx] r231496 - Fix the PrefixExecutor.

Dan Albert danalbert at google.com
Fri Mar 6 10:35:45 PST 2015


Author: danalbert
Date: Fri Mar  6 12:35:45 2015
New Revision: 231496

URL: http://llvm.org/viewvc/llvm-project?rev=231496&view=rev
Log:
Fix the PrefixExecutor.

The PrefixExecutor wasn't passing the exe_path down the chain, so the
command was overriding that, the work_dir was being passed as the
command, and so on.

I've cleaned up a few pylint issues while I was here.

Modified:
    libcxx/trunk/test/libcxx/test/executor.py

Modified: libcxx/trunk/test/libcxx/test/executor.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/libcxx/test/executor.py?rev=231496&r1=231495&r2=231496&view=diff
==============================================================================
--- libcxx/trunk/test/libcxx/test/executor.py (original)
+++ libcxx/trunk/test/libcxx/test/executor.py Fri Mar  6 12:35:45 2015
@@ -1,6 +1,6 @@
 import os
 
-import tracing
+from libcxx.test import tracing
 
 from lit.util import executeCommand  # pylint: disable=import-error
 
@@ -50,7 +50,8 @@ class PrefixExecutor(Executor):
 
     def run(self, exe_path, cmd=None, work_dir='.', env=None):
         cmd = cmd or [exe_path]
-        return self.chain.run(self.commandPrefix + cmd, work_dir, env=env)
+        return self.chain.run(exe_path, self.commandPrefix + cmd, work_dir,
+                              env=env)
 
 
 class PostfixExecutor(Executor):
@@ -132,6 +133,9 @@ class SSHExecutor(Executor):
             pass
 
     def run(self, exe_path, cmd=None, work_dir='.', env=None):
+        if work_dir != '.':
+            raise NotImplementedError(
+                'work_dir arg is not supported for SSHExecutor')
         target_exe_path = None
         target_cwd = None
         try:
@@ -163,4 +167,3 @@ class SSHExecutor(Executor):
         if remote_work_dir != '.':
             remote_cmd = 'cd ' + remote_work_dir + ' && ' + remote_cmd
         return self.local_run(ssh_cmd + [remote_cmd])
-





More information about the cfe-commits mailing list