[libcxx][lit] Fix running testsuite with python2.7 after 9020d28688
Python 2.7 fails with TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' if you pass None as the prefix argument to NamedTemporaryFile. Reviewed By: ldionne, bjope, #libc Differential Revision: https://reviews.llvm.org/D84595
This commit is contained in:
parent
974ffee9cc
commit
19e472fd84
|
@ -52,7 +52,7 @@ def _executeScriptInternal(test, commands):
|
||||||
res = ('', '', 127, None)
|
res = ('', '', 127, None)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
def _makeConfigTest(config, testPrefix=None):
|
def _makeConfigTest(config, testPrefix=''):
|
||||||
sourceRoot = os.path.join(config.test_exec_root, '__config_src__')
|
sourceRoot = os.path.join(config.test_exec_root, '__config_src__')
|
||||||
execRoot = os.path.join(config.test_exec_root, '__config_exec__')
|
execRoot = os.path.join(config.test_exec_root, '__config_exec__')
|
||||||
suite = lit.Test.TestSuite('__config__', sourceRoot, execRoot, config)
|
suite = lit.Test.TestSuite('__config__', sourceRoot, execRoot, config)
|
||||||
|
@ -83,7 +83,7 @@ def sourceBuilds(config, source):
|
||||||
_executeScriptInternal(test, ['rm %t.exe'])
|
_executeScriptInternal(test, ['rm %t.exe'])
|
||||||
return exitCode == 0
|
return exitCode == 0
|
||||||
|
|
||||||
def programOutput(config, program, args=[], testPrefix=None):
|
def programOutput(config, program, args=[], testPrefix=''):
|
||||||
"""
|
"""
|
||||||
Compiles a program for the test target, run it on the test target and return
|
Compiles a program for the test target, run it on the test target and return
|
||||||
the output.
|
the output.
|
||||||
|
|
Loading…
Reference in New Issue