[llvm] 02895ee - [llvm-cxxfilt][NFC] Fix test for running in Windows cmd

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 5 04:10:27 PDT 2021


Author: gbhyamso
Date: 2021-10-05T12:10:06+01:00
New Revision: 02895eede1a9a650e84d72afea2cd6ecf35ac1e7

URL: https://github.com/llvm/llvm-project/commit/02895eede1a9a650e84d72afea2cd6ecf35ac1e7
DIFF: https://github.com/llvm/llvm-project/commit/02895eede1a9a650e84d72afea2cd6ecf35ac1e7.diff

LOG: [llvm-cxxfilt][NFC] Fix test for running in Windows cmd

The test llvm\test\tools\llvm-cxxfilt\delimiters.test started failling when run
from cmd.exe on Windows after D110986 which added a unicode character (⦙) to it.
Piping the unicode character in cmd.exe causes it to be converted to a '?'.
That causes the test to fail because the llvm-cxxfilt output becomes Foo?Bar
rather than the expected Foo⦙Bar.

Redirect the echo output to and from a temporary file to get around this
problem.

It's not entirely clear what the root cause is, but two separate downstream
builders are tripping up on this, so we are landing the work around for the
time being.

Differential Revision: https://reviews.llvm.org/D111072

Added: 
    

Modified: 
    llvm/test/tools/llvm-cxxfilt/delimiters.test

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-cxxfilt/delimiters.test b/llvm/test/tools/llvm-cxxfilt/delimiters.test
index c1eb05d0e8567..9a5b690a00520 100644
--- a/llvm/test/tools/llvm-cxxfilt/delimiters.test
+++ b/llvm/test/tools/llvm-cxxfilt/delimiters.test
@@ -29,7 +29,11 @@ RUN:      '_Z3Foo}'   \
 RUN:      '_Z3Foo~,,' \
 RUN:      '_Z3Foo⦙_Z3Bar' \
 RUN:      '_Z3Foo,,_Z3Bar::_Z3Baz  _Z3Foo,_Z3Bar:_Z3Baz' \
-RUN:      '_Z3Foo$ ._Z3Foo' | llvm-cxxfilt -n | FileCheck %s
+COM: Piping the echo output causes '⦙' to be converted to '?' in some
+COM: builds/environments. Redirect echo output to and from %t to work
+COM: around this. See D111072.
+RUN:      '_Z3Foo$ ._Z3Foo' > %t
+RUN:      llvm-cxxfilt -n < %t | FileCheck %s
 
 CHECK: ,,Foo!
 CHECK: Foo"


        


More information about the llvm-commits mailing list