[llvm] [WIP] Do not require shell for some tests (PR #94595)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 08:57:03 PDT 2024


https://github.com/jayfoad updated https://github.com/llvm/llvm-project/pull/94595

>From fa294febbc6784a65a9f552e1ebc34e2241a52a6 Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Thu, 6 Jun 2024 10:24:34 +0100
Subject: [PATCH 1/2] [WIP] Do not require shell for some tests

---
 llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test    | 1 -
 llvm/test/DebugInfo/symbolize-gnu-debuglink-no-realpath.test | 1 -
 llvm/test/Other/can-execute.txt                              | 1 -
 llvm/test/Other/lit-unicode.txt                              | 1 -
 llvm/test/tools/llvm-cov/gcov/basic.test                     | 1 -
 llvm/test/tools/llvm-cov/gcov/intermediate-format.test       | 1 -
 llvm/test/tools/llvm-rc/windres-prefix.test                  | 1 -
 llvm/test/tools/llvm-rc/windres-preproc.test                 | 1 -
 llvm/test/tools/split-file/output-is-special.test            | 1 -
 9 files changed, 9 deletions(-)

diff --git a/llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test b/llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test
index 43d5a2c818fac..638285ea4c184 100644
--- a/llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test
+++ b/llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test
@@ -1,4 +1,3 @@
-# REQUIRES: shell
 # Ensures that .debuglink can fallback to a separate location. This is normally
 # /usr/lib/debug (or /usr/libdata/debug for NetBSD), but can be configured on
 # the command line (mainly for testing).
diff --git a/llvm/test/DebugInfo/symbolize-gnu-debuglink-no-realpath.test b/llvm/test/DebugInfo/symbolize-gnu-debuglink-no-realpath.test
index 5141ff6ce322c..9e46570783c93 100644
--- a/llvm/test/DebugInfo/symbolize-gnu-debuglink-no-realpath.test
+++ b/llvm/test/DebugInfo/symbolize-gnu-debuglink-no-realpath.test
@@ -1,4 +1,3 @@
-# REQUIRES: shell
 # Ensure that no realpath assumptions are made about .gnu_debuglink paths.
 
 # Copy inputs to some other location with arbitrary names, with the original
diff --git a/llvm/test/Other/can-execute.txt b/llvm/test/Other/can-execute.txt
index 46791cb892a28..37626e7357b28 100644
--- a/llvm/test/Other/can-execute.txt
+++ b/llvm/test/Other/can-execute.txt
@@ -1,5 +1,4 @@
 REQUIRES: can-execute
-REQUIRES: shell
 
 This tests that we abstract two peculiarities of unix in can_execute:
 
diff --git a/llvm/test/Other/lit-unicode.txt b/llvm/test/Other/lit-unicode.txt
index 2f40001451688..b375fc505b737 100644
--- a/llvm/test/Other/lit-unicode.txt
+++ b/llvm/test/Other/lit-unicode.txt
@@ -1,5 +1,4 @@
 FIXME: See if we can fix this in lit by using Unicode strings.
-REQUIRES: shell
 
 RUN: echo "ようこそ" | FileCheck %s
 CHECK: {{^}}ようこそ{{$}}
diff --git a/llvm/test/tools/llvm-cov/gcov/basic.test b/llvm/test/tools/llvm-cov/gcov/basic.test
index 5313fe2d7a69a..53a1e8dcc8fcf 100644
--- a/llvm/test/tools/llvm-cov/gcov/basic.test
+++ b/llvm/test/tools/llvm-cov/gcov/basic.test
@@ -3,7 +3,6 @@
 
 # Test fails on Windows where internal shell is used due to path separator
 # mismatches.
-REQUIRES: shell
 
 RUN: rm -rf %t
 RUN: mkdir %t
diff --git a/llvm/test/tools/llvm-cov/gcov/intermediate-format.test b/llvm/test/tools/llvm-cov/gcov/intermediate-format.test
index 583e670c2d3fa..89d52af111c2e 100644
--- a/llvm/test/tools/llvm-cov/gcov/intermediate-format.test
+++ b/llvm/test/tools/llvm-cov/gcov/intermediate-format.test
@@ -1,4 +1,3 @@
-REQUIRES: shell
 
 RUN: rm -rf %t && mkdir %t && cd %t
 RUN: cp %S/Inputs/test.gcno %S/Inputs/test.gcda .
diff --git a/llvm/test/tools/llvm-rc/windres-prefix.test b/llvm/test/tools/llvm-rc/windres-prefix.test
index 4c53fdfc3db65..fb26e645d3a01 100644
--- a/llvm/test/tools/llvm-rc/windres-prefix.test
+++ b/llvm/test/tools/llvm-rc/windres-prefix.test
@@ -1,4 +1,3 @@
-; REQUIRES: shell
 
 ; RUN: rm -rf %t && mkdir %t
 
diff --git a/llvm/test/tools/llvm-rc/windres-preproc.test b/llvm/test/tools/llvm-rc/windres-preproc.test
index 13f82299a074b..fc1b3bff0c857 100644
--- a/llvm/test/tools/llvm-rc/windres-preproc.test
+++ b/llvm/test/tools/llvm-rc/windres-preproc.test
@@ -1,7 +1,6 @@
 ;; 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
 ; 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 --use-temp-file | FileCheck %s --check-prefix=CHECK1
diff --git a/llvm/test/tools/split-file/output-is-special.test b/llvm/test/tools/split-file/output-is-special.test
index 98bb4d36a4ff3..0b1e0f786c4d2 100644
--- a/llvm/test/tools/split-file/output-is-special.test
+++ b/llvm/test/tools/split-file/output-is-special.test
@@ -1,5 +1,4 @@
 # UNSUPPORTED: system-windows
-# REQUIRES: shell
 
 ## Don't delete the output if it is special, otherwise root may accidentally
 ## remove important special files.

>From e09026b9875a542307fab2c11f586f9aeca1584d Mon Sep 17 00:00:00 2001
From: Jay Foad <jay.foad at amd.com>
Date: Thu, 6 Jun 2024 16:54:41 +0100
Subject: [PATCH 2/2] Revert tests that failed on Windows

---
 llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test | 1 +
 llvm/test/tools/llvm-cov/gcov/basic.test                  | 1 +
 llvm/test/tools/llvm-rc/windres-preproc.test              | 1 +
 3 files changed, 3 insertions(+)

diff --git a/llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test b/llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test
index 638285ea4c184..43d5a2c818fac 100644
--- a/llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test
+++ b/llvm/test/DebugInfo/symbolize-gnu-debuglink-fallback.test
@@ -1,3 +1,4 @@
+# REQUIRES: shell
 # Ensures that .debuglink can fallback to a separate location. This is normally
 # /usr/lib/debug (or /usr/libdata/debug for NetBSD), but can be configured on
 # the command line (mainly for testing).
diff --git a/llvm/test/tools/llvm-cov/gcov/basic.test b/llvm/test/tools/llvm-cov/gcov/basic.test
index 53a1e8dcc8fcf..5313fe2d7a69a 100644
--- a/llvm/test/tools/llvm-cov/gcov/basic.test
+++ b/llvm/test/tools/llvm-cov/gcov/basic.test
@@ -3,6 +3,7 @@
 
 # Test fails on Windows where internal shell is used due to path separator
 # mismatches.
+REQUIRES: shell
 
 RUN: rm -rf %t
 RUN: mkdir %t
diff --git a/llvm/test/tools/llvm-rc/windres-preproc.test b/llvm/test/tools/llvm-rc/windres-preproc.test
index fc1b3bff0c857..13f82299a074b 100644
--- a/llvm/test/tools/llvm-rc/windres-preproc.test
+++ b/llvm/test/tools/llvm-rc/windres-preproc.test
@@ -1,6 +1,7 @@
 ;; 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
 ; 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 --use-temp-file | FileCheck %s --check-prefix=CHECK1



More information about the llvm-commits mailing list