[llvm] r251479 - lit/TestRunner.py: Get execdir from test.getExecPath() instead of passing it around; NFC

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 27 19:36:39 PDT 2015


Author: matze
Date: Tue Oct 27 21:36:38 2015
New Revision: 251479

URL: http://llvm.org/viewvc/llvm-project?rev=251479&view=rev
Log:
lit/TestRunner.py: Get execdir from test.getExecPath() instead of passing it around; NFC

Modified:
    llvm/trunk/utils/lit/lit/TestRunner.py

Modified: llvm/trunk/utils/lit/lit/TestRunner.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/lit/lit/TestRunner.py?rev=251479&r1=251478&r2=251479&view=diff
==============================================================================
--- llvm/trunk/utils/lit/lit/TestRunner.py (original)
+++ llvm/trunk/utils/lit/lit/TestRunner.py Tue Oct 27 21:36:38 2015
@@ -557,13 +557,13 @@ def parseIntegratedTestScript(test, norm
             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, useEx
     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




More information about the llvm-commits mailing list