[llvm] fa3cb51 - [llvm-windres] Fix a test that failed on Windows. NFC.

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 01:59:32 PDT 2023


Author: Martin Storsjö
Date: 2023-03-28T11:57:39+03:00
New Revision: fa3cb517e4a569ff075c98bb6d037abf38b88202

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

LOG: [llvm-windres] Fix a test that failed on Windows. NFC.

Skip this test on Windows (by requiring a posix shell), since we
want to test specific corner cases of quotes passed to the executable,
and llvm-lit/cmd don't seem to handle it correctly at the moment.

Added: 
    

Modified: 
    llvm/test/tools/llvm-rc/windres-preproc.test

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-rc/windres-preproc.test b/llvm/test/tools/llvm-rc/windres-preproc.test
index e7f83074c040..888be03f7d9e 100644
--- a/llvm/test/tools/llvm-rc/windres-preproc.test
+++ b/llvm/test/tools/llvm-rc/windres-preproc.test
@@ -1,3 +1,8 @@
+;; Some quoted arguments below don't work properly on Windows when llvm-lit
+;; invokes the cmd shell to run the commands. Just require running in a
+;; posix shell, to keep being able to test this corner case on Unix at least.
+; REQUIRES: shell
+
 ; RUN: llvm-windres -### --include-dir %p/incdir1 --include %p/incdir2 "-DFOO1=\\\"foo bar\\\"" -UFOO2 -D FOO3 --preprocessor-arg "-DFOO4=\\\"baz baz\\\"" -DFOO5=\"bar\" %p/Inputs/empty.rc %t.res | FileCheck %s --check-prefix=CHECK1
 ; CHECK1: {{^}} "clang" "--driver-mode=gcc" "-target" "{{.*}}-{{.*}}{{mingw32|windows-gnu}}" "-E" "-xc" "-DRC_INVOKED" "{{.*}}empty.rc" "-o" "{{.*}}preproc-{{.*}}.rc" "-I" "{{.*}}incdir1" "-I" "{{.*}}incdir2" "-D" "FOO1=\"foo bar\"" "-U" "FOO2" "-D" "FOO3" "-DFOO4=\"baz baz\"" "-D" "FOO5=bar"{{$}}
 ; RUN: llvm-windres -### --preprocessor "i686-w64-mingw32-gcc -E -DFOO=\\\"foo\\ bar\\\"" %p/Inputs/empty.rc %t.res | FileCheck %s --check-prefix=CHECK2


        


More information about the llvm-commits mailing list