diff options
author | Aiden Grossman <aidengrossman@google.com> | 2025-09-09 00:44:07 +0000 |
---|---|---|
committer | Aiden Grossman <aidengrossman@google.com> | 2025-09-09 00:44:07 +0000 |
commit | 398c3207137199fcf6b8233f283081ff1be5c0d2 (patch) | |
tree | 118063cbdbd3ff9a5945c65806c1dc9337434df1 | |
parent | 46a3b4d5dc6dd9449ec7c0c9065552368cdf41d6 (diff) | |
download | llvm-users/boomanaiden154/main.lit-support-c-flag-for-diff.zip llvm-users/boomanaiden154/main.lit-support-c-flag-for-diff.tar.gz llvm-users/boomanaiden154/main.lit-support-c-flag-for-diff.tar.bz2 |
[𝘀𝗽𝗿] changes to main this commit is based onusers/boomanaiden154/main.lit-support-c-flag-for-diff
Created using spr 1.3.6
[skip ci]
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 483762d..b602cb5 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 2ec3061..067a515 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 c2b509d..1eb4e73 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 ca9c525..b995aa6 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 4d01640..1e7bef1 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 0a6abec..acfe195 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 c609a7d..b5086ed 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 2bd0a58..55784cf 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 066c544..f54e09f 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 5f0ebc1..fb788c5 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 f2e5758..1929b5b 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 35e830e..cf4a099 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 acacda1..39b2863 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 3bbc532..801a392 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 d262f8c..1151820 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 7ac5e20e..6a0d261 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 4945a62..ccd2876 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 12e298a..9721051 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 eb03718..8973d66 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 43cca61..03b30d6 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 6671d9d6..61d6914 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 1a80c3b..c2b37fa 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 4c062e2..717466c 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 12fd850..4edeb10 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 2f44cad..3e11046 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 0ba2f33..8e46d23 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 669e566..f2b76db 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 2d4eca8..675d15b 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 167b07a..1670fd3 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 34040b8..104ea97 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 420f7b5..d228a58 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 87bcdeb..e1d3a10 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 852f0bf..7283800 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 2c605ac..775ca48 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 b2781b7..ebfe3d0 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 2fa339a..39a976a 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 349ed0d..88e837af 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 741cdab3..9080890 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 905b279..6c0eb00 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 407fb5c..0973f1f 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 0afa0dee..26ff3f2 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 9ca1002..2610b06 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 a7ee1fe..9564f11 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 5c2d502..8c45d77 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 aca9983..5318aeb 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 8e5a16e..946daae 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 b564193..05b586bf 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 52e68f1..3114c7d 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 e4920bcc..ee0674e6 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 2ed443f..64828b5 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 57160f3..1a02b3f 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 efdaf3d..633f247 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 5ada45d..2778386 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 9977aa4..cff898845 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 b989793..8863b7a 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 564a65f..12f9bf4 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 07907df..f7e1abf 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 995fe00..cb633d5 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 ab3d9257..64dede2 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 762c89e..e24bea1 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 2e8d4a3..76547b3 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 fbf4eb0..f2b5869 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"]) |