mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-15 12:39:19 +00:00
[libc++] Automatically create the %T directory inside config tests
This commit is contained in:
parent
619beb0a53
commit
c8d0aaa7ff
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user