[libcxx-commits] [libcxx] 19e472f - [libcxx][lit] Fix running testsuite with python2.7 after 9020d28688492c437abb648b6ab69baeba523219
Alex Richardson via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jul 27 02:15:40 PDT 2020
Author: Alex Richardson
Date: 2020-07-27T10:15:18+01:00
New Revision: 19e472fd84ec75f5323a147bedfffabbb23d0978
URL: https://github.com/llvm/llvm-project/commit/19e472fd84ec75f5323a147bedfffabbb23d0978
DIFF: https://github.com/llvm/llvm-project/commit/19e472fd84ec75f5323a147bedfffabbb23d0978.diff
LOG: [libcxx][lit] Fix running testsuite with python2.7 after 9020d28688492c437abb648b6ab69baeba523219
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
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 cd500e132946..95d23df7ece1 100644
--- a/libcxx/utils/libcxx/test/dsl.py
+++ b/libcxx/utils/libcxx/test/dsl.py
@@ -52,7 +52,7 @@ def _executeScriptInternal(test, commands):
res = ('', '', 127, None)
return res
-def _makeConfigTest(config, testPrefix=None):
+def _makeConfigTest(config, testPrefix=''):
sourceRoot = os.path.join(config.test_exec_root, '__config_src__')
execRoot = os.path.join(config.test_exec_root, '__config_exec__')
suite = lit.Test.TestSuite('__config__', sourceRoot, execRoot, config)
@@ -83,7 +83,7 @@ def sourceBuilds(config, source):
_executeScriptInternal(test, ['rm %t.exe'])
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
the output.
More information about the libcxx-commits
mailing list