summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAiden Grossman <aidengrossman@google.com>2025-09-09 00:44:07 +0000
committerAiden Grossman <aidengrossman@google.com>2025-09-09 00:44:07 +0000
commit398c3207137199fcf6b8233f283081ff1be5c0d2 (patch)
tree118063cbdbd3ff9a5945c65806c1dc9337434df1
parent46a3b4d5dc6dd9449ec7c0c9065552368cdf41d6 (diff)
[𝘀𝗽𝗿] changes to main this commit is based onusers/boomanaiden154/main.lit-support-c-flag-for-diff
Created using spr 1.3.6 [skip ci]
-rw-r--r--clang/test/Analysis/scan-build/cxx-name.test2
-rw-r--r--clang/test/Analysis/scan-build/deduplication.test2
-rw-r--r--clang/test/Analysis/scan-build/html_output.test2
-rw-r--r--clang/test/Analysis/scan-build/plist_html_output.test2
-rw-r--r--clang/test/Analysis/scan-build/plist_output.test2
-rw-r--r--clang/test/ClangScanDeps/module-format.c2
-rw-r--r--clang/test/ClangScanDeps/modules-context-hash-cwd.c4
-rw-r--r--clang/test/ClangScanDeps/modules-file-path-isolation.c3
-rw-r--r--clang/test/ClangScanDeps/modules-in-stable-dirs.c4
-rw-r--r--clang/test/ClangScanDeps/modules-symlink-dir-from-module.c3
-rw-r--r--clang/test/ClangScanDeps/modules-symlink-dir-vfs.c3
-rw-r--r--clang/test/ClangScanDeps/modules-symlink-dir.c5
-rw-r--r--clang/test/ClangScanDeps/prebuilt-modules-in-stable-dirs.c6
-rw-r--r--clang/test/ClangScanDeps/subframework_header_dir_symlink.m3
-rw-r--r--clang/test/ClangScanDeps/symlink.cpp4
-rw-r--r--clang/test/CodeCompletion/included-symlinks.cpp3
-rw-r--r--clang/test/Driver/aarch64-toolchain-extra.c3
-rw-r--r--clang/test/Driver/amdgpu-hip-system-arch.c3
-rw-r--r--clang/test/Driver/amdgpu-openmp-system-arch-fail.c3
-rw-r--r--clang/test/Driver/arm-toolchain-extra.c1
-rw-r--r--clang/test/Driver/baremetal-multilib-layered.yaml1
-rw-r--r--clang/test/Driver/baremetal-multilib.yaml1
-rw-r--r--clang/test/Driver/baremetal-sysroot.cpp1
-rw-r--r--clang/test/Driver/darwin-ld-demangle-lld.c1
-rw-r--r--clang/test/Driver/darwin-ld-lto-lld.c2
-rw-r--r--clang/test/Driver/mingw-sysroot.cpp1
-rw-r--r--clang/test/Driver/no-canonical-prefixes.c2
-rw-r--r--clang/test/Driver/nvptx-cuda-system-arch.c2
-rw-r--r--clang/test/Driver/openmp-system-arch.c3
-rw-r--r--clang/test/Driver/parse-progname.c3
-rw-r--r--clang/test/Driver/riscv32-toolchain-extra.c3
-rw-r--r--clang/test/Driver/riscv64-toolchain-extra.c1
-rw-r--r--clang/test/Driver/sigpipe-handling.c2
-rw-r--r--clang/test/Driver/target-override.c3
-rw-r--r--clang/test/Driver/verbose-output-quoting.c2
-rw-r--r--clang/test/Frontend/dependency-gen-symlink.c3
-rw-r--r--clang/test/Index/preamble-reparse-changed-module.m2
-rw-r--r--clang/test/InterfaceStubs/driver-test.c1
-rw-r--r--clang/test/InterfaceStubs/driver-test2.c1
-rw-r--r--clang/test/InterfaceStubs/driver-test3.c1
-rw-r--r--clang/test/Modules/crash-vfs-headermaps.m2
-rw-r--r--clang/test/Modules/crash-vfs-include-pch.m2
-rw-r--r--clang/test/Modules/crash-vfs-path-emptydir-entries.m3
-rw-r--r--clang/test/Modules/crash-vfs-path-symlink-topheader.m4
-rw-r--r--clang/test/Modules/embed-files-compressed.cpp1
-rw-r--r--clang/test/Modules/embed-files.cpp2
-rw-r--r--clang/test/Modules/exponential-paths.cpp2
-rw-r--r--clang/test/Modules/framework-name.m4
-rw-r--r--clang/test/Modules/implicit-private-without-public.m1
-rw-r--r--clang/test/Modules/inferred-framework-case.m2
-rw-r--r--clang/test/Modules/module-file-modified.c1
-rw-r--r--clang/test/Modules/module-symlink.m3
-rw-r--r--clang/test/Modules/modulemap-collision.m3
-rw-r--r--clang/test/Modules/validate-file-content.m2
-rw-r--r--clang/test/PCH/validate-file-content.m2
-rw-r--r--clang/test/Preprocessor/embed_zos.c2
-rw-r--r--clang/test/Preprocessor/nonportable-include-with-hmap.c3
-rw-r--r--clang/test/Profile/cxx-hash-v2.cpp2
-rw-r--r--clang/test/SemaCXX/warn-unsafe-buffer-usage-debug-unclaimed/warn-unsafe-buffer-usage-debug-unclaimed.cpp1
-rw-r--r--clang/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp5
-rw-r--r--clang/test/Tooling/clang-check-pwd.cpp3
-rw-r--r--llvm/utils/lit/lit/builtin_commands/diff.py41
62 files changed, 79 insertions, 108 deletions
diff --git a/clang/test/Analysis/scan-build/cxx-name.test b/clang/test/Analysis/scan-build/cxx-name.test
index 483762d619d1..b602cb5c5231 100644
--- a/clang/test/Analysis/scan-build/cxx-name.test
+++ b/clang/test/Analysis/scan-build/cxx-name.test
@@ -1,5 +1,3 @@
-REQUIRES: shell
-
RUN: %scan-build sh -c 'echo "CLANG_CXX=/$(basename "$CLANG_CXX")/"' | FileCheck %s
Check that scan-build sets the CLANG_CXX environment variable (meant to be
diff --git a/clang/test/Analysis/scan-build/deduplication.test b/clang/test/Analysis/scan-build/deduplication.test
index 2ec3061701fc..067a5153d67d 100644
--- a/clang/test/Analysis/scan-build/deduplication.test
+++ b/clang/test/Analysis/scan-build/deduplication.test
@@ -1,5 +1,3 @@
-REQUIRES: shell
-
RUN: rm -rf %t.output_dir && mkdir %t.output_dir
RUN: %scan-build -o %t.output_dir \
RUN: %clang -S %S/Inputs/deduplication/1.c \
diff --git a/clang/test/Analysis/scan-build/html_output.test b/clang/test/Analysis/scan-build/html_output.test
index c2b509d9ef66..1eb4e73611cf 100644
--- a/clang/test/Analysis/scan-build/html_output.test
+++ b/clang/test/Analysis/scan-build/html_output.test
@@ -1,5 +1,3 @@
-REQUIRES: shell
-
RUN: rm -rf %t.output_dir && mkdir %t.output_dir
RUN: %scan-build -o %t.output_dir %clang -S %S/Inputs/single_null_dereference.c \
RUN: | FileCheck %s -check-prefix CHECK-STDOUT
diff --git a/clang/test/Analysis/scan-build/plist_html_output.test b/clang/test/Analysis/scan-build/plist_html_output.test
index ca9c5256b9d7..b995aa6d5d36 100644
--- a/clang/test/Analysis/scan-build/plist_html_output.test
+++ b/clang/test/Analysis/scan-build/plist_html_output.test
@@ -1,5 +1,3 @@
-REQUIRES: shell
-
RUN: rm -rf %t.output_dir && mkdir %t.output_dir
RUN: %scan-build -plist-html -o %t.output_dir %clang -S %S/Inputs/single_null_dereference.c \
RUN: | FileCheck %s -check-prefix CHECK-STDOUT
diff --git a/clang/test/Analysis/scan-build/plist_output.test b/clang/test/Analysis/scan-build/plist_output.test
index 4d01640bff6e..1e7bef1035b5 100644
--- a/clang/test/Analysis/scan-build/plist_output.test
+++ b/clang/test/Analysis/scan-build/plist_output.test
@@ -1,5 +1,3 @@
-REQUIRES: shell
-
RUN: rm -rf %t.output_dir && mkdir %t.output_dir
RUN: %scan-build -plist -o %t.output_dir %clang -S %S/Inputs/single_null_dereference.c \
RUN: | FileCheck %s -check-prefix CHECK-STDOUT
diff --git a/clang/test/ClangScanDeps/module-format.c b/clang/test/ClangScanDeps/module-format.c
index 0a6abec80dd9..acfe195c4e08 100644
--- a/clang/test/ClangScanDeps/module-format.c
+++ b/clang/test/ClangScanDeps/module-format.c
@@ -6,8 +6,6 @@
// section in XCOFF yet.
// UNSUPPORTED: target={{.*}}-aix{{.*}}
-// REQUIRES: shell
-
// RUN: rm -rf %t && mkdir %t
// RUN: cp %S/Inputs/modules-pch/* %t
diff --git a/clang/test/ClangScanDeps/modules-context-hash-cwd.c b/clang/test/ClangScanDeps/modules-context-hash-cwd.c
index c609a7dcbc80..b5086ed40922 100644
--- a/clang/test/ClangScanDeps/modules-context-hash-cwd.c
+++ b/clang/test/ClangScanDeps/modules-context-hash-cwd.c
@@ -1,7 +1,7 @@
+// Most likely platform specific sed differences
+// UNSUPPORTED: system-windows
// Test current directory pruning when computing the context hash.
-// REQUIRES: shell
-
// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: sed -e "s|DIR|%/t|g" %t/cdb0.json.in > %t/cdb0.json
diff --git a/clang/test/ClangScanDeps/modules-file-path-isolation.c b/clang/test/ClangScanDeps/modules-file-path-isolation.c
index 2bd0a58ca9ae..55784cf41700 100644
--- a/clang/test/ClangScanDeps/modules-file-path-isolation.c
+++ b/clang/test/ClangScanDeps/modules-file-path-isolation.c
@@ -3,7 +3,8 @@
// Note: the spelling of the modulemap path still depends on the includer, since
// that is the only source of information about it.
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
// RUN: rm -rf %t
// RUN: split-file %s %t
diff --git a/clang/test/ClangScanDeps/modules-in-stable-dirs.c b/clang/test/ClangScanDeps/modules-in-stable-dirs.c
index 066c5445f41f..f54e09fecee9 100644
--- a/clang/test/ClangScanDeps/modules-in-stable-dirs.c
+++ b/clang/test/ClangScanDeps/modules-in-stable-dirs.c
@@ -1,3 +1,6 @@
+// Most likely platform specific sed differences
+// UNSUPPORTED: system-windows
+
// This test verifies modules that are entirely comprised from stable directory inputs are captured in
// dependency information.
@@ -5,7 +8,6 @@
// The second compilation verifies that external paths are resolved when a
// vfsoverlay for determining is-in-stable-directories.
-// REQUIRES: shell
// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: sed -e "s|DIR|%/t|g" %t/compile-commands.json.in > %t/compile-commands.json
diff --git a/clang/test/ClangScanDeps/modules-symlink-dir-from-module.c b/clang/test/ClangScanDeps/modules-symlink-dir-from-module.c
index 5f0ebc13eb2e..fb788c5a96d8 100644
--- a/clang/test/ClangScanDeps/modules-symlink-dir-from-module.c
+++ b/clang/test/ClangScanDeps/modules-symlink-dir-from-module.c
@@ -3,7 +3,8 @@
// module below does not transitively import Mod via a symlink, so it should not
// see the symlinked path.
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
// RUN: rm -rf %t
// RUN: split-file %s %t
diff --git a/clang/test/ClangScanDeps/modules-symlink-dir-vfs.c b/clang/test/ClangScanDeps/modules-symlink-dir-vfs.c
index f2e5758aa41f..1929b5ba2fb7 100644
--- a/clang/test/ClangScanDeps/modules-symlink-dir-vfs.c
+++ b/clang/test/ClangScanDeps/modules-symlink-dir-vfs.c
@@ -5,7 +5,8 @@
// RUN: rm -rf %t
// RUN: split-file %s %t
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
// RUN: mkdir -p %t/frameworks-symlink
// RUN: ln -s %t/frameworks/FW.framework %t/frameworks-symlink/FW.framework
diff --git a/clang/test/ClangScanDeps/modules-symlink-dir.c b/clang/test/ClangScanDeps/modules-symlink-dir.c
index 35e830e8c6c5..cf4a0998a80f 100644
--- a/clang/test/ClangScanDeps/modules-symlink-dir.c
+++ b/clang/test/ClangScanDeps/modules-symlink-dir.c
@@ -1,8 +1,9 @@
+// Needs symlinks
+// UNSUPPORTED: system-windows
+
// Check that we canonicalize the module map path without changing the module
// directory, which would break header lookup.
-// REQUIRES: shell
-
// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.in > %t/cdb.json
diff --git a/clang/test/ClangScanDeps/prebuilt-modules-in-stable-dirs.c b/clang/test/ClangScanDeps/prebuilt-modules-in-stable-dirs.c
index acacda1466b5..39b2863d966c 100644
--- a/clang/test/ClangScanDeps/prebuilt-modules-in-stable-dirs.c
+++ b/clang/test/ClangScanDeps/prebuilt-modules-in-stable-dirs.c
@@ -1,3 +1,6 @@
+/// Most likely platform specific sed differences
+// UNSUPPORTED: system-windows
+
/// This test validates that modules that depend on prebuilt modules
/// resolve `is-in-stable-directories` correctly.
/// The steps are:
@@ -5,8 +8,7 @@
/// that is seemingly from the sysroot. However, it depends on a local header that is overlaid.
/// 2. Build the PCH & dependency PCMs.
/// 3. Scan a source file that transitively depends on the same modules as the pcm.
-
-// REQUIRES: shell
+
// RUN: rm -rf %t
// RUN: split-file %s %t
// RUN: sed -e "s|DIR|%/t|g" %t/overlay.json.template > %t/overlay.json
diff --git a/clang/test/ClangScanDeps/subframework_header_dir_symlink.m b/clang/test/ClangScanDeps/subframework_header_dir_symlink.m
index 3bbc5320d4e0..801a3928d94e 100644
--- a/clang/test/ClangScanDeps/subframework_header_dir_symlink.m
+++ b/clang/test/ClangScanDeps/subframework_header_dir_symlink.m
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
// RUN: rm -rf %t.dir
// RUN: rm -rf %t.cdb
// RUN: mkdir -p %t.dir
diff --git a/clang/test/ClangScanDeps/symlink.cpp b/clang/test/ClangScanDeps/symlink.cpp
index d262f8c7f1d9..1151820f1473 100644
--- a/clang/test/ClangScanDeps/symlink.cpp
+++ b/clang/test/ClangScanDeps/symlink.cpp
@@ -1,4 +1,6 @@
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
+
// RUN: rm -rf %t.dir
// RUN: rm -rf %t.cdb
// RUN: mkdir -p %t.dir
diff --git a/clang/test/CodeCompletion/included-symlinks.cpp b/clang/test/CodeCompletion/included-symlinks.cpp
index 7ac5e20e7fde..6a0d2611d859 100644
--- a/clang/test/CodeCompletion/included-symlinks.cpp
+++ b/clang/test/CodeCompletion/included-symlinks.cpp
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
// RUN: rm -rf %t && mkdir -p %t/real/myproj && mkdir -p %t/links
// RUN: touch %t/real/foo.h && ln -s %t/real/foo.h %t/links/foo.h
// RUN: touch %t/real/foobar.h && ln -s %t/real/foobar.h %t/links/foobar.h
diff --git a/clang/test/Driver/aarch64-toolchain-extra.c b/clang/test/Driver/aarch64-toolchain-extra.c
index 4945a622969c..ccd2876ea84c 100644
--- a/clang/test/Driver/aarch64-toolchain-extra.c
+++ b/clang/test/Driver/aarch64-toolchain-extra.c
@@ -2,8 +2,7 @@
// The tests here are similar to those in aarch64-toolchain.c, however
// these tests need to create symlinks to test directory trees in order to
-// set up the environment and therefore shell support is required.
-// REQUIRES: shell
+// set up the environment and therefore POSIX is required.
// UNSUPPORTED: system-windows
// If there is no GCC install detected then the driver searches for executables
diff --git a/clang/test/Driver/amdgpu-hip-system-arch.c b/clang/test/Driver/amdgpu-hip-system-arch.c
index 12e298a8636b..972105143deb 100644
--- a/clang/test/Driver/amdgpu-hip-system-arch.c
+++ b/clang/test/Driver/amdgpu-hip-system-arch.c
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Needs chmod
+// UNSUPPORTED: system-windows
// XFAIL: target={{.*}}-zos{{.*}}
// RUN: mkdir -p %t
diff --git a/clang/test/Driver/amdgpu-openmp-system-arch-fail.c b/clang/test/Driver/amdgpu-openmp-system-arch-fail.c
index eb037183b4c3..8973d66afbae 100644
--- a/clang/test/Driver/amdgpu-openmp-system-arch-fail.c
+++ b/clang/test/Driver/amdgpu-openmp-system-arch-fail.c
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Due to chmod
+// UNSUPPORTED: system-windows
// RUN: mkdir -p %t
// RUN: rm -f %t/amdgpu_arch_fail %t/amdgpu_arch_different
diff --git a/clang/test/Driver/arm-toolchain-extra.c b/clang/test/Driver/arm-toolchain-extra.c
index 43cca6112176..03b30d654089 100644
--- a/clang/test/Driver/arm-toolchain-extra.c
+++ b/clang/test/Driver/arm-toolchain-extra.c
@@ -3,7 +3,6 @@
// The tests here are similar to those in arm-toolchain.c, however
// these tests need to create symlinks to test directory trees in order to
// set up the environment and therefore shell support is required.
-// REQUIRES: shell
// UNSUPPORTED: system-windows
// If there is no GCC install detected then the driver searches for executables
diff --git a/clang/test/Driver/baremetal-multilib-layered.yaml b/clang/test/Driver/baremetal-multilib-layered.yaml
index 6671d9d672f5..61d69140fb7f 100644
--- a/clang/test/Driver/baremetal-multilib-layered.yaml
+++ b/clang/test/Driver/baremetal-multilib-layered.yaml
@@ -1,4 +1,3 @@
-# REQUIRES: shell
# UNSUPPORTED: system-windows
# This test demonstrates "layered" multilib in which more than one
diff --git a/clang/test/Driver/baremetal-multilib.yaml b/clang/test/Driver/baremetal-multilib.yaml
index 1a80c3b4ccfc..c2b37fad97de 100644
--- a/clang/test/Driver/baremetal-multilib.yaml
+++ b/clang/test/Driver/baremetal-multilib.yaml
@@ -1,4 +1,3 @@
-# REQUIRES: shell
# UNSUPPORTED: system-windows
# RUN: %clang --multi-lib-config=%s -no-canonical-prefixes -x c++ %s -### -o %t.out 2>&1 \
diff --git a/clang/test/Driver/baremetal-sysroot.cpp b/clang/test/Driver/baremetal-sysroot.cpp
index 4c062e28e6bc..717466c18576 100644
--- a/clang/test/Driver/baremetal-sysroot.cpp
+++ b/clang/test/Driver/baremetal-sysroot.cpp
@@ -1,4 +1,3 @@
-// REQUIRES: shell
// UNSUPPORTED: system-windows
// Test that when a --sysroot is not provided, driver picks the default
diff --git a/clang/test/Driver/darwin-ld-demangle-lld.c b/clang/test/Driver/darwin-ld-demangle-lld.c
index 12fd8502ce7a..4edeb1058b93 100644
--- a/clang/test/Driver/darwin-ld-demangle-lld.c
+++ b/clang/test/Driver/darwin-ld-demangle-lld.c
@@ -1,5 +1,4 @@
// With -fuse-ld=lld, -demangle is always passed to the linker on Darwin.
-// REQUIRES: shell
// RUN: %clang --target=x86_64-apple-darwin -### -fuse-ld=lld \
// RUN: -B%S/Inputs/lld -mlinker-version=0 %s 2>&1 \
diff --git a/clang/test/Driver/darwin-ld-lto-lld.c b/clang/test/Driver/darwin-ld-lto-lld.c
index 2f44cad534b1..3e110463fc28 100644
--- a/clang/test/Driver/darwin-ld-lto-lld.c
+++ b/clang/test/Driver/darwin-ld-lto-lld.c
@@ -1,5 +1,3 @@
-// REQUIRES: shell
-
// Check that lld gets "-lto_library".
// (Separate test file since darwin-ld-lto requires system-darwin but this
// test doesn't require that.)
diff --git a/clang/test/Driver/mingw-sysroot.cpp b/clang/test/Driver/mingw-sysroot.cpp
index 0ba2f336fd2e..8e46d23c1782 100644
--- a/clang/test/Driver/mingw-sysroot.cpp
+++ b/clang/test/Driver/mingw-sysroot.cpp
@@ -1,4 +1,3 @@
-// REQUIRES: shell
// UNSUPPORTED: system-windows
// RUN: rm -rf %t.dir/testroot-gcc
diff --git a/clang/test/Driver/no-canonical-prefixes.c b/clang/test/Driver/no-canonical-prefixes.c
index 669e56639284..f2b76db8de7e 100644
--- a/clang/test/Driver/no-canonical-prefixes.c
+++ b/clang/test/Driver/no-canonical-prefixes.c
@@ -1,5 +1,5 @@
// Due to ln -sf:
-// REQUIRES: shell
+// UNSUPPORTED: system-windows
// RUN: mkdir -p %t.real
// RUN: cd %t.real
// RUN: ln -sf %clang test-clang
diff --git a/clang/test/Driver/nvptx-cuda-system-arch.c b/clang/test/Driver/nvptx-cuda-system-arch.c
index 2d4eca8c43bc..675d15bf22cc 100644
--- a/clang/test/Driver/nvptx-cuda-system-arch.c
+++ b/clang/test/Driver/nvptx-cuda-system-arch.c
@@ -1,4 +1,4 @@
-// REQUIRES: shell
+// UNSUPPORTED: system-windows
// XFAIL: target={{.*}}-zos{{.*}}
// RUN: mkdir -p %t
diff --git a/clang/test/Driver/openmp-system-arch.c b/clang/test/Driver/openmp-system-arch.c
index 167b07a23f51..1670fd30f4b5 100644
--- a/clang/test/Driver/openmp-system-arch.c
+++ b/clang/test/Driver/openmp-system-arch.c
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Needs chmod
+// UNSUPPORTED: system-windows
// XFAIL: target={{.*}}-zos{{.*}}
// RUN: mkdir -p %t
diff --git a/clang/test/Driver/parse-progname.c b/clang/test/Driver/parse-progname.c
index 34040b81dc73..104ea971684a 100644
--- a/clang/test/Driver/parse-progname.c
+++ b/clang/test/Driver/parse-progname.c
@@ -1,4 +1,5 @@
-// REQUIRES: shell, arm-registered-target
+// REQUIRES: arm-registered-target
+// UNSUPPORTED: system-windows
// UNSUPPORTED: llvm-driver
// RUN: mkdir -p %t
diff --git a/clang/test/Driver/riscv32-toolchain-extra.c b/clang/test/Driver/riscv32-toolchain-extra.c
index 420f7b520360..d228a58d23d4 100644
--- a/clang/test/Driver/riscv32-toolchain-extra.c
+++ b/clang/test/Driver/riscv32-toolchain-extra.c
@@ -2,8 +2,7 @@
// The tests here are similar to those in riscv32-toolchain.c, however
// these tests need to create symlinks to test directory trees in order to
-// set up the environment and therefore shell support is required.
-// REQUIRES: shell
+// set up the environment and therefore POSIX support is required.
// UNSUPPORTED: system-windows
// If there is no GCC install detected then the driver searches for executables
diff --git a/clang/test/Driver/riscv64-toolchain-extra.c b/clang/test/Driver/riscv64-toolchain-extra.c
index 87bcdeb651a1..e1d3a10dd788 100644
--- a/clang/test/Driver/riscv64-toolchain-extra.c
+++ b/clang/test/Driver/riscv64-toolchain-extra.c
@@ -3,7 +3,6 @@
// The tests here are similar to those in riscv64-toolchain.c, however
// these tests need to create symlinks to test directory trees in order to
// set up the environment and therefore shell support is required.
-// REQUIRES: shell
// UNSUPPORTED: system-windows
// If there is no GCC install detected then the driver searches for executables
diff --git a/clang/test/Driver/sigpipe-handling.c b/clang/test/Driver/sigpipe-handling.c
index 852f0bfaf798..7283800ba3c2 100644
--- a/clang/test/Driver/sigpipe-handling.c
+++ b/clang/test/Driver/sigpipe-handling.c
@@ -1,4 +1,4 @@
-// REQUIRES: shell
+// UNSUPPORTED: system-windows
// RUN: %clang -E -fno-integrated-cc1 %s | head | FileCheck %s
// Test that the parent clang driver process doesn't crash when the child cc1
diff --git a/clang/test/Driver/target-override.c b/clang/test/Driver/target-override.c
index 2c605ac9a03d..775ca4864e4b 100644
--- a/clang/test/Driver/target-override.c
+++ b/clang/test/Driver/target-override.c
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
// REQUIRES: x86-registered-target
// RUN: rm -rf %t && mkdir %t
diff --git a/clang/test/Driver/verbose-output-quoting.c b/clang/test/Driver/verbose-output-quoting.c
index b2781b754ecd..ebfe3d08fb23 100644
--- a/clang/test/Driver/verbose-output-quoting.c
+++ b/clang/test/Driver/verbose-output-quoting.c
@@ -1,4 +1,4 @@
-// REQUIRES: shell
+// UNSUPPORTED: system-windows
// RUN: %clang --verbose -DSPACE="a b" -### %s 2>&1 | FileCheck -check-prefix=SPACE -strict-whitespace %s
// RUN: %clang --verbose -DQUOTES=\"\" -### %s 2>&1 | FileCheck -check-prefix=QUOTES -strict-whitespace %s
// RUN: %clang --verbose -DBACKSLASH=\\ -### %s 2>&1 | FileCheck -check-prefix=BACKSLASH -strict-whitespace %s
diff --git a/clang/test/Frontend/dependency-gen-symlink.c b/clang/test/Frontend/dependency-gen-symlink.c
index 2fa339ad2abf..39a976a1617d 100644
--- a/clang/test/Frontend/dependency-gen-symlink.c
+++ b/clang/test/Frontend/dependency-gen-symlink.c
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
// Basic test
// RUN: rm -rf %t.dir
diff --git a/clang/test/Index/preamble-reparse-changed-module.m b/clang/test/Index/preamble-reparse-changed-module.m
index 349ed0db27d0..88e837afe6b0 100644
--- a/clang/test/Index/preamble-reparse-changed-module.m
+++ b/clang/test/Index/preamble-reparse-changed-module.m
@@ -1,4 +1,4 @@
-// REQUIRES: shell
+// UNSUPPORTED: system-windows
// RUN: rm -rf %t
// RUN: mkdir -p %t/mod
diff --git a/clang/test/InterfaceStubs/driver-test.c b/clang/test/InterfaceStubs/driver-test.c
index 741cdab3e9d3..9080890f85cd 100644
--- a/clang/test/InterfaceStubs/driver-test.c
+++ b/clang/test/InterfaceStubs/driver-test.c
@@ -1,5 +1,4 @@
// REQUIRES: x86-registered-target
-// REQUIRES: shell
// NOTE: -fno-integrated-cc1 has been added to work around an ASAN failure
// caused by in-process cc1 invocation. Clang InterfaceStubs is not the
diff --git a/clang/test/InterfaceStubs/driver-test2.c b/clang/test/InterfaceStubs/driver-test2.c
index 905b27922264..6c0eb00a62f3 100644
--- a/clang/test/InterfaceStubs/driver-test2.c
+++ b/clang/test/InterfaceStubs/driver-test2.c
@@ -1,5 +1,4 @@
// REQUIRES: x86-registered-target
-// REQUIRES: shell
// NOTE: -fno-integrated-cc1 has been added to work around an ASAN failure
// caused by in-process cc1 invocation. Clang InterfaceStubs is not the
diff --git a/clang/test/InterfaceStubs/driver-test3.c b/clang/test/InterfaceStubs/driver-test3.c
index 407fb5c20cb4..0973f1ffc18f 100644
--- a/clang/test/InterfaceStubs/driver-test3.c
+++ b/clang/test/InterfaceStubs/driver-test3.c
@@ -1,5 +1,4 @@
// REQUIRES: x86-registered-target
-// REQUIRES: shell
// RUN: mkdir -p %t; cd %t
// RUN: %clang -target x86_64-unknown-linux-gnu -c -emit-interface-stubs %s -o %t/driver-test3.o
diff --git a/clang/test/Modules/crash-vfs-headermaps.m b/clang/test/Modules/crash-vfs-headermaps.m
index 0afa0dee6379..26ff3f26450b 100644
--- a/clang/test/Modules/crash-vfs-headermaps.m
+++ b/clang/test/Modules/crash-vfs-headermaps.m
@@ -1,4 +1,4 @@
-// REQUIRES: crash-recovery, shell, system-darwin
+// REQUIRES: crash-recovery, system-darwin
// RUN: rm -rf %t
// RUN: mkdir -p %t/m %t/i/Foo.framework/Headers
diff --git a/clang/test/Modules/crash-vfs-include-pch.m b/clang/test/Modules/crash-vfs-include-pch.m
index 9ca10020094b..2610b0697457 100644
--- a/clang/test/Modules/crash-vfs-include-pch.m
+++ b/clang/test/Modules/crash-vfs-include-pch.m
@@ -1,4 +1,4 @@
-// REQUIRES: crash-recovery, shell, system-darwin
+// REQUIRES: crash-recovery, system-darwin
//
// RUN: rm -rf %t
// RUN: mkdir -p %t/m %t/out
diff --git a/clang/test/Modules/crash-vfs-path-emptydir-entries.m b/clang/test/Modules/crash-vfs-path-emptydir-entries.m
index a7ee1fe176fb..9564f11cdbcf 100644
--- a/clang/test/Modules/crash-vfs-path-emptydir-entries.m
+++ b/clang/test/Modules/crash-vfs-path-emptydir-entries.m
@@ -1,4 +1,5 @@
-// REQUIRES: crash-recovery, shell
+// UNSUPPORTED: system-windows
+// REQUIRES: crash-recovery
// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?
// XFAIL: target={{.*-windows-gnu}}
diff --git a/clang/test/Modules/crash-vfs-path-symlink-topheader.m b/clang/test/Modules/crash-vfs-path-symlink-topheader.m
index 5c2d502b209d..8c45d77892df 100644
--- a/clang/test/Modules/crash-vfs-path-symlink-topheader.m
+++ b/clang/test/Modules/crash-vfs-path-symlink-topheader.m
@@ -1,4 +1,6 @@
-// REQUIRES: crash-recovery, shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
+// REQUIRES: crash-recovery
// FIXME: This XFAIL is cargo-culted from crash-report.c. Do we need it?
// XFAIL: target={{.*-windows-gnu}}
diff --git a/clang/test/Modules/embed-files-compressed.cpp b/clang/test/Modules/embed-files-compressed.cpp
index aca9983ff160..5318aeb10a81 100644
--- a/clang/test/Modules/embed-files-compressed.cpp
+++ b/clang/test/Modules/embed-files-compressed.cpp
@@ -1,5 +1,4 @@
// REQUIRES: zlib || zstd
-// REQUIRES: shell
//
// RUN: rm -rf %t
// RUN: mkdir %t
diff --git a/clang/test/Modules/embed-files.cpp b/clang/test/Modules/embed-files.cpp
index 8e5a16e54400..946daaee9991 100644
--- a/clang/test/Modules/embed-files.cpp
+++ b/clang/test/Modules/embed-files.cpp
@@ -13,7 +13,7 @@
// FIXME: This test is flaky on Windows because attempting to delete a file
// after writing it just doesn't seem to work well, at least not in the lit
// shell.
-// REQUIRES: shell
+// UNSUPPORTED: system-windows
// RUN: rm %t/x.h
// RUN: %clang_cc1 -fmodules -I%t -fmodule-map-file=%t/modulemap -fmodule-file=%t/a.pcm -fmodule-file=%t/b.pcm %s -verify
#include "a.h"
diff --git a/clang/test/Modules/exponential-paths.cpp b/clang/test/Modules/exponential-paths.cpp
index b5641933f8d0..05b586bf5cd1 100644
--- a/clang/test/Modules/exponential-paths.cpp
+++ b/clang/test/Modules/exponential-paths.cpp
@@ -1,5 +1,3 @@
-// REQUIRES: shell
-//
// RUN: rm -rf %t
// RUN: mkdir %t
//
diff --git a/clang/test/Modules/framework-name.m b/clang/test/Modules/framework-name.m
index 52e68f12de5a..3114c7de7fe1 100644
--- a/clang/test/Modules/framework-name.m
+++ b/clang/test/Modules/framework-name.m
@@ -1,4 +1,6 @@
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
+
// RUN: rm -rf %t.mcp %t
// RUN: mkdir -p %t
// RUN: ln -s %S/Inputs/NameInDir2.framework %t/NameInImport.framework
diff --git a/clang/test/Modules/implicit-private-without-public.m b/clang/test/Modules/implicit-private-without-public.m
index e4920bcc7ec6..ee0674e64a25 100644
--- a/clang/test/Modules/implicit-private-without-public.m
+++ b/clang/test/Modules/implicit-private-without-public.m
@@ -1,4 +1,3 @@
-// REQUIRES: shell
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t \
// RUN: -F%S/Inputs/implicit-private-without-public \
diff --git a/clang/test/Modules/inferred-framework-case.m b/clang/test/Modules/inferred-framework-case.m
index 2ed443f2b5a1..64828b5cdd86 100644
--- a/clang/test/Modules/inferred-framework-case.m
+++ b/clang/test/Modules/inferred-framework-case.m
@@ -1,7 +1,7 @@
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules-cache-path=%t -fmodules -fimplicit-module-maps -F %S/Inputs %s -verify -DA
// FIXME: PR20299 - getCanonicalName() is not implemented on Windows.
-// REQUIRES: shell
+// UNSUPPORTED: system-windows
@import MOdule; // expected-error{{module 'MOdule' not found}}
@import Module;
diff --git a/clang/test/Modules/module-file-modified.c b/clang/test/Modules/module-file-modified.c
index 57160f34a46c..1a02b3fa511b 100644
--- a/clang/test/Modules/module-file-modified.c
+++ b/clang/test/Modules/module-file-modified.c
@@ -9,4 +9,3 @@
int foo = 0; // redefinition of 'foo'
// CHECK: fatal error: file {{.*}} has been modified since the module file {{.*}} was built
// CHECK: note: please rebuild precompiled file
-// REQUIRES: shell
diff --git a/clang/test/Modules/module-symlink.m b/clang/test/Modules/module-symlink.m
index efdaf3db0dfe..633f2472daf9 100644
--- a/clang/test/Modules/module-symlink.m
+++ b/clang/test/Modules/module-symlink.m
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Needs symlinks
+// UNSUPPORTED: system-windows
// RUN: rm -rf %t
// RUN: %clang_cc1 -fmodules-cache-path=%t/modules -fmodules -fimplicit-module-maps -I %S/Inputs -emit-pch -o %t.pch %s -verify
diff --git a/clang/test/Modules/modulemap-collision.m b/clang/test/Modules/modulemap-collision.m
index 5ada45da3dae..2778386dfd33 100644
--- a/clang/test/Modules/modulemap-collision.m
+++ b/clang/test/Modules/modulemap-collision.m
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Most likely platform specific sed differences
+// UNSUPPORTED: system-windows
// RUN: rm -rf %t
// RUN: mkdir -p %t/sources %t/build
diff --git a/clang/test/Modules/validate-file-content.m b/clang/test/Modules/validate-file-content.m
index 9977aa4665f0..cff89884552b 100644
--- a/clang/test/Modules/validate-file-content.m
+++ b/clang/test/Modules/validate-file-content.m
@@ -1,5 +1,3 @@
-// REQUIRES: shell
-//
// Check driver works
// RUN: %clang -fmodules -fsyntax-only -fmodules-validate-input-files-content %s -### 2>&1 | FileCheck --check-prefix=CHECK-CC1 %s
// CHECK-CC1: -fvalidate-ast-input-files-content
diff --git a/clang/test/PCH/validate-file-content.m b/clang/test/PCH/validate-file-content.m
index b98979341b76..8863b7abea3a 100644
--- a/clang/test/PCH/validate-file-content.m
+++ b/clang/test/PCH/validate-file-content.m
@@ -1,5 +1,3 @@
-// REQUIRES: shell
-//
// Check driver works
// RUN: %clang -x objective-c-header -fsyntax-only -fpch-validate-input-files-content %s -### 2>&1 | FileCheck --check-prefix=CHECK-CC1 %s
// CHECK-CC1: -fvalidate-ast-input-files-content
diff --git a/clang/test/Preprocessor/embed_zos.c b/clang/test/Preprocessor/embed_zos.c
index 564a65f42afc..12f9bf439ee8 100644
--- a/clang/test/Preprocessor/embed_zos.c
+++ b/clang/test/Preprocessor/embed_zos.c
@@ -4,7 +4,7 @@
// RUN: %clang_cc1 -std=c23 %s -fsyntax-only --embed-dir=%t -verify
// expected-no-diagnostics
-// REQUIRES: shell, system-zos
+// REQUIRES: system-zos
const char data[] = {
#embed <media/art.txt>
diff --git a/clang/test/Preprocessor/nonportable-include-with-hmap.c b/clang/test/Preprocessor/nonportable-include-with-hmap.c
index 07907dfb40d5..f7e1abf69ad1 100644
--- a/clang/test/Preprocessor/nonportable-include-with-hmap.c
+++ b/clang/test/Preprocessor/nonportable-include-with-hmap.c
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// Most likely platform specific sed differences
+// UNSUPPORTED: system-windows
// REQUIRES: case-insensitive-filesystem
// RUN: rm -f %t.hmap
diff --git a/clang/test/Profile/cxx-hash-v2.cpp b/clang/test/Profile/cxx-hash-v2.cpp
index 995fe008f523..cb633d53f6f3 100644
--- a/clang/test/Profile/cxx-hash-v2.cpp
+++ b/clang/test/Profile/cxx-hash-v2.cpp
@@ -1,5 +1,3 @@
-// REQUIRES: shell
-
// Check that all of the hashes in this file are unique (i.e, that none of the
// profiles for these functions are mutually interchangeable).
//
diff --git a/clang/test/SemaCXX/warn-unsafe-buffer-usage-debug-unclaimed/warn-unsafe-buffer-usage-debug-unclaimed.cpp b/clang/test/SemaCXX/warn-unsafe-buffer-usage-debug-unclaimed/warn-unsafe-buffer-usage-debug-unclaimed.cpp
index ab3d925753d4..64dede2568df 100644
--- a/clang/test/SemaCXX/warn-unsafe-buffer-usage-debug-unclaimed/warn-unsafe-buffer-usage-debug-unclaimed.cpp
+++ b/clang/test/SemaCXX/warn-unsafe-buffer-usage-debug-unclaimed/warn-unsafe-buffer-usage-debug-unclaimed.cpp
@@ -13,7 +13,6 @@
// This debugging facility is only available in debug builds.
//
// REQUIRES: asserts
-// REQUIRES: shell
void test_unclaimed_use(int *p) { // expected-warning{{'p' is an unsafe pointer used for buffer access}}
p++; // expected-note{{used in pointer arithmetic here}} \
diff --git a/clang/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp b/clang/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp
index 762c89e9e52a..e24bea1e4f3f 100644
--- a/clang/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp
+++ b/clang/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp
@@ -1,3 +1,6 @@
+// Needs symlinks
+// UNSUPPORTED: system-windows
+
// RUN: rm -rf %t
// RUN: mkdir -p %t/abc/def/ijk/qwe
// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/abc/def/ijk/qwe/test.cpp\",\"file\":\"%t/abc/def/ijk/qwe/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
@@ -9,5 +12,3 @@
// CHECK: a type specifier is required
// CHECK: /abc/def/ijk/qwe/test.cpp
invalid;
-
-// REQUIRES: shell
diff --git a/clang/test/Tooling/clang-check-pwd.cpp b/clang/test/Tooling/clang-check-pwd.cpp
index 2e8d4a3fe12b..76547b3097c3 100644
--- a/clang/test/Tooling/clang-check-pwd.cpp
+++ b/clang/test/Tooling/clang-check-pwd.cpp
@@ -1,3 +1,6 @@
+// Needs symlinks
+// UNSUPPORTED: system-windows
+
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: echo "[{\"directory\":\".\",\"command\":\"clang++ -c %t/test.cpp\",\"file\":\"%t/test.cpp\"}]" | sed -e 's/\\/\\\\/g' > %t/compile_commands.json
diff --git a/llvm/utils/lit/lit/builtin_commands/diff.py b/llvm/utils/lit/lit/builtin_commands/diff.py
index fbf4eb0e137b..f2b5869b3588 100644
--- a/llvm/utils/lit/lit/builtin_commands/diff.py
+++ b/llvm/utils/lit/lit/builtin_commands/diff.py
@@ -59,30 +59,15 @@ def compareTwoFiles(flags, filepaths):
def compareTwoBinaryFiles(flags, filepaths, filelines):
exitCode = 0
- if hasattr(difflib, "diff_bytes"):
- # python 3.5 or newer
- diffs = difflib.diff_bytes(
- difflib.unified_diff,
- filelines[0],
- filelines[1],
- filepaths[0].encode(),
- filepaths[1].encode(),
- n=flags.num_context_lines,
- )
- diffs = [diff.decode(errors="backslashreplace") for diff in diffs]
- else:
- # python 2.7
- if flags.unified_diff:
- func = difflib.unified_diff
- else:
- func = difflib.context_diff
- diffs = func(
- filelines[0],
- filelines[1],
- filepaths[0],
- filepaths[1],
- n=flags.num_context_lines,
- )
+ diffs = difflib.diff_bytes(
+ difflib.unified_diff,
+ filelines[0],
+ filelines[1],
+ filepaths[0].encode(),
+ filepaths[1].encode(),
+ n=flags.num_context_lines,
+ )
+ diffs = [diff.decode(errors="backslashreplace") for diff in diffs]
for diff in diffs:
sys.stdout.write(to_string(diff))
@@ -230,14 +215,8 @@ def compareDirTrees(flags, dir_trees, base_paths=["", ""]):
def main(argv):
if sys.platform == "win32":
- if hasattr(sys.stdout, "buffer"):
- # python 3
- sys.stdout = io.TextIOWrapper(sys.stdout.buffer, newline="\n")
- else:
- # python 2.7
- import msvcrt
+ sys.stdout = io.TextIOWrapper(sys.stdout.buffer, newline="\n")
- msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
args = argv[1:]
try:
opts, args = getopt.gnu_getopt(args, "wbuI:U:r", ["strip-trailing-cr"])