summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-03-06 18:35:45 +0000
committerDan Albert <danalbert@google.com>2015-03-06 11:45:15 -0800
commitb0617a93029bbf99057202feff9701c09497c3d1 (patch)
tree7d5eef067521101e3d5623b983fc1fe9724b7d0c
parent5cb52824fc2a0caf233311e91d9a2a53368f04ad (diff)
downloadexternal_libcxx-b0617a93029bbf99057202feff9701c09497c3d1.tar.gz
external_libcxx-b0617a93029bbf99057202feff9701c09497c3d1.tar.bz2
external_libcxx-b0617a93029bbf99057202feff9701c09497c3d1.zip
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. git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@231496 91177308-0d34-0410-b5e6-96231b3b80d8 Change-Id: Ice5baa25246cf5830c91b329eaeb819ae0dd1aad
-rw-r--r--test/libcxx/test/executor.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/libcxx/test/executor.py b/test/libcxx/test/executor.py
index 0caa27414..b756762f6 100644
--- a/test/libcxx/test/executor.py
+++ b/test/libcxx/test/executor.py
@@ -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])
-