[libcxx-commits] [libcxx] c8d0aaa - [libc++] Automatically create the %T directory inside config tests
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jun 15 16:32:15 PDT 2020
Author: Louis Dionne
Date: 2020-06-15T19:32:06-04:00
New Revision: c8d0aaa7ffd535ae6c90f5603f46370d652c4c46
URL: https://github.com/llvm/llvm-project/commit/c8d0aaa7ffd535ae6c90f5603f46370d652c4c46
DIFF: https://github.com/llvm/llvm-project/commit/c8d0aaa7ffd535ae6c90f5603f46370d652c4c46.diff
LOG: [libc++] Automatically create the %T directory inside config 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 f3257353f9ac..9f5152d35fe4 100644
--- a/libcxx/utils/libcxx/test/dsl.py
+++ b/libcxx/utils/libcxx/test/dsl.py
@@ -44,8 +44,9 @@ def _executeScriptInternal(test, commands):
params={})
_, tmpBase = libcxx.test.newformat._getTempPaths(test)
execDir = os.path.dirname(test.getExecPath())
- if not os.path.exists(execDir):
- os.makedirs(execDir)
+ for d in (execDir, os.path.dirname(tmpBase)):
+ if not os.path.exists(d):
+ os.makedirs(d)
res = lit.TestRunner.executeScriptInternal(test, litConfig, tmpBase, parsedCommands, execDir)
if isinstance(res, lit.Test.Result):
res = ('', '', 127, None)
@@ -76,7 +77,6 @@ def sourceBuilds(config, source):
with open(test.getSourcePath(), 'w') as sourceFile:
sourceFile.write(source)
out, err, exitCode, timeoutInfo = _executeScriptInternal(test, [
- "mkdir -p %T",
"%{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe"
])
_executeScriptInternal(test, ['rm %t.exe'])
@@ -96,7 +96,6 @@ def programOutput(config, program, args=[]):
source.write(program)
try:
_, _, exitCode, _ = _executeScriptInternal(test, [
- "mkdir -p %T",
"%{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe",
])
if exitCode != 0:
More information about the libcxx-commits
mailing list