[libcxx-commits] [PATCH] D84595: [libcxx][lit] Fix running testsuite with python2.7 after 9020d28688492c437abb648b6ab69baeba523219

Alexander Richardson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Sun Jul 26 03:31:12 PDT 2020


arichardson created this revision.
arichardson added reviewers: ldionne, bjope.
Herald added subscribers: libcxx-commits, dexonsmith.
Herald added a project: libc++.
Herald added a reviewer: libc++.

Python 2.7 fails with TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
if you pass None as the prefix argument to NamedTemporaryFile.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D84595

Files:
  libcxx/utils/libcxx/test/dsl.py


Index: libcxx/utils/libcxx/test/dsl.py
===================================================================
--- libcxx/utils/libcxx/test/dsl.py
+++ libcxx/utils/libcxx/test/dsl.py
@@ -52,7 +52,7 @@
     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 @@
     _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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D84595.280710.patch
Type: text/x-patch
Size: 870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200726/fae79231/attachment-0001.bin>


More information about the libcxx-commits mailing list