[libcxx-commits] [PATCH] D77497: [libc++] Capture the current environment in the new test format
Sergej Jaskiewicz via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun Apr 5 06:55:50 PDT 2020
broadwaylamb created this revision.
broadwaylamb added a reviewer: ldionne.
Herald added subscribers: libcxx-commits, dexonsmith.
Herald added a project: libc++.
Herald added a reviewer: libc++.
In the old test format we set the test execution environment to the current process environment (see https://github.com/llvm/llvm-project/blob/9e1455dc236252a60066c312c6d2e8a7ed66f609/libcxx/utils/libcxx/test/format.py#L179) for `.sh.cpp` tests.
In the new test format, where all tests are essentially ShTests, we should do the same. Otherwise executing tests over SSH may not work, at least on Windows hosts. For example, for me all SSH commands ended up exiting with code 255 without any error messages. After this change they succeed.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D77497
Files:
libcxx/utils/libcxx/test/newformat.py
Index: libcxx/utils/libcxx/test/newformat.py
===================================================================
--- libcxx/utils/libcxx/test/newformat.py
+++ libcxx/utils/libcxx/test/newformat.py
@@ -240,4 +240,6 @@
script = lit.TestRunner.applySubstitutions(script, substitutions,
recursion_limit=recursiveExpansionLimit)
+ test.config.environment = dict(os.environ)
+
return lit.TestRunner._runShTest(test, litConfig, useExternalSh, script, tmpBase)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77497.255151.patch
Type: text/x-patch
Size: 532 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200405/f1cfface/attachment.bin>
More information about the libcxx-commits
mailing list