summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-10-28 02:36:38 +0000
committerMatthias Braun <matze@braunis.de>2015-10-28 02:36:38 +0000
commit18e6f06dcbe48ce423b5469ef3b11dae9da5a492 (patch)
tree73949e1397dddb1ff8a05beabb5fe5710a7f1860 /llvm
parentbe97829140fda2118d69d75e5c88d2ef01a3e4d1 (diff)
downloadbcm5719-llvm-18e6f06dcbe48ce423b5469ef3b11dae9da5a492.tar.gz
bcm5719-llvm-18e6f06dcbe48ce423b5469ef3b11dae9da5a492.zip
lit/TestRunner.py: Get execdir from test.getExecPath() instead of passing it around; NFC
llvm-svn: 251479
Diffstat (limited to 'llvm')
-rw-r--r--llvm/utils/lit/lit/TestRunner.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/utils/lit/lit/TestRunner.py b/llvm/utils/lit/lit/TestRunner.py
index 548081225be..725546d44b0 100644
--- a/llvm/utils/lit/lit/TestRunner.py
+++ b/llvm/utils/lit/lit/TestRunner.py
@@ -557,13 +557,13 @@ def parseIntegratedTestScript(test, normalize_slashes=False,
return lit.Test.Result(Test.UNSUPPORTED,
"Test requires one of the limit_to_features features %s" % msg)
- return script,tmpBase,execdir
+ return script,tmpBase
-def _runShTest(test, litConfig, useExternalSh,
- script, tmpBase, execdir):
+def _runShTest(test, litConfig, useExternalSh, script, tmpBase):
# Create the output directory if it does not already exist.
lit.util.mkdir_p(os.path.dirname(tmpBase))
+ execdir = os.path.dirname(test.getExecPath())
if useExternalSh:
res = executeScript(test, litConfig, tmpBase, script, execdir)
else:
@@ -601,14 +601,14 @@ def executeShTest(test, litConfig, useExternalSh,
if litConfig.noExecute:
return lit.Test.Result(Test.PASS)
- script, tmpBase, execdir = res
+ script, tmpBase = res
# Re-run failed tests up to test_retry_attempts times.
attempts = 1
if hasattr(test.config, 'test_retry_attempts'):
attempts += test.config.test_retry_attempts
for i in range(attempts):
- res = _runShTest(test, litConfig, useExternalSh, script, tmpBase, execdir)
+ res = _runShTest(test, litConfig, useExternalSh, script, tmpBase)
if res.code != Test.FAIL:
break
# If we had to run the test more than once, count it as a flaky pass. These
OpenPOWER on IntegriCloud