[libcxx-commits] [PATCH] D120546: [libcxx] [test] Fix dsl.sh.py to work on Windows.
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Feb 26 14:14:48 PST 2022
mstorsjo updated this revision to Diff 411644.
mstorsjo marked 2 inline comments as done.
mstorsjo added a comment.
Removed the verbose bug workaround comment from the code, moved the CRLF filtering up to right after the call to `lit.TestRunner.executeScriptInternal`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120546/new/
https://reviews.llvm.org/D120546
Files:
libcxx/test/libcxx/selftest/dsl/dsl.sh.py
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
@@ -95,6 +95,10 @@
res = ('', res.output, 127, None)
(out, err, exitCode, timeoutInfo) = res
+ if platform.system() == 'Windows':
+ out = out.replace('\r\n', '\n')
+ err = err.replace('\r\n', '\n')
+
# TODO: As a temporary workaround until https://reviews.llvm.org/D81892 lands, manually
# split any stderr output that is included in stdout. It shouldn't be there, but
# the Lit internal shell conflates stderr and stdout.
Index: libcxx/test/libcxx/selftest/dsl/dsl.sh.py
===================================================================
--- libcxx/test/libcxx/selftest/dsl/dsl.sh.py
+++ libcxx/test/libcxx/selftest/dsl/dsl.sh.py
@@ -6,8 +6,6 @@
#
#===----------------------------------------------------------------------===##
-# XFAIL: LIBCXX-WINDOWS-FIXME
-
# Note: We prepend arguments with 'x' to avoid thinking there are too few
# arguments in case an argument is an empty string.
# RUN: %{python} %s x%S x%T x%{substitutions}
@@ -251,7 +249,7 @@
self.fail("checking for hasLocale should not explode")
def test_nonexistent_locale(self):
- self.assertFalse(dsl.hasAnyLocale(self.config, ['for_sure_this_is_not_an_existing_locale']))
+ self.assertFalse(dsl.hasAnyLocale(self.config, ['forsurethisisnotanexistinglocale']))
def test_localization_program_doesnt_compile(self):
compilerIndex = findIndex(self.config.substitutions, lambda x: x[0] == '%{cxx}')
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D120546.411644.patch
Type: text/x-patch
Size: 1641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220226/1ab67a63/attachment.bin>
More information about the libcxx-commits
mailing list