[libcxx-commits] [libcxx] d789ef1 - [libc++] Make sure we create the working directory for running config check commands
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 30 11:11:13 PDT 2020
Author: Louis Dionne
Date: 2020-04-30T14:10:56-04:00
New Revision: d789ef1608b058384014f62c28d73791c5586795
URL: https://github.com/llvm/llvm-project/commit/d789ef1608b058384014f62c28d73791c5586795
DIFF: https://github.com/llvm/llvm-project/commit/d789ef1608b058384014f62c28d73791c5586795.diff
LOG: [libc++] Make sure we create the working directory for running config check commands
The internal Lit shell requires the current working directory to exist.
This didn't show up locally because the directories were already created
by previous runs of the tests.
Added:
Modified:
libcxx/utils/libcxx/test/dsl.py
Removed:
################################################################################
diff --git a/libcxx/utils/libcxx/test/dsl.py b/libcxx/utils/libcxx/test/dsl.py
index 5f88bd7d40dc..523c5d93f71c 100644
--- a/libcxx/utils/libcxx/test/dsl.py
+++ b/libcxx/utils/libcxx/test/dsl.py
@@ -34,8 +34,10 @@ def __init__(self):
self.maxIndividualTestTime = 0
litConfig = FakeLitConfig()
_, tmpBase = lit.TestRunner.getTempPaths(test)
- execdir = os.path.dirname(test.getExecPath())
- res = lit.TestRunner.executeScriptInternal(test, litConfig, tmpBase, commands, execdir)
+ execDir = os.path.dirname(test.getExecPath())
+ if not os.path.exists(execDir):
+ os.makedirs(execDir)
+ res = lit.TestRunner.executeScriptInternal(test, litConfig, tmpBase, commands, execDir)
if isinstance(res, lit.Test.Result):
res = ('', '', 127, None)
return res
@@ -110,7 +112,7 @@ def compilerMacros(config, flags=''):
commands = libcxx.test.newformat.parseScript(test, preamble=commands, fileDependencies=[])
unparsedOutput, err, exitCode, timeoutInfo = _executeScriptInternal(test, commands)
parsedMacros = dict()
- defines = (l.strip() for l in unparsedOutput.split('\n') if l.startswith('#define'))
+ defines = (l.strip() for l in unparsedOutput.split('\n') if l.startswith('#define '))
for line in defines:
line = line[len('#define '):]
macro, _, value = line.partition(' ')
More information about the libcxx-commits
mailing list