-
Notifications
You must be signed in to change notification settings - Fork 15.6k
[clang-tools-extra] Remove use of REQUIRES: shell #173313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[clang-tools-extra] Remove use of REQUIRES: shell #173313
Conversation
REQUIRES: shell does not have the intended effect now that the internal shell is enabled by default and only prevents tests from running on Windows. This patch removes the directive for portable tests and switches it to a UNSUPPORTED: system-windows tag for non-portable tests to make the intention more clear.
🪟 Windows x64 Test Results
✅ The build succeeded and all tests passed. |
|
@llvm/pr-subscribers-clang-tools-extra @llvm/pr-subscribers-clang-tidy Author: Aiden Grossman (boomanaiden154) ChangesREQUIRES: shell does not have the intended effect now that the internal shell is enabled by default and only prevents tests from running on Windows. This patch removes the directive for portable tests and switches it to a UNSUPPORTED: system-windows tag for non-portable tests to make the intention more clear. Full diff: https://github.com/llvm/llvm-project/pull/173313.diff 4 Files Affected:
diff --git a/clang-tools-extra/clangd/test/system-include-extractor.test b/clang-tools-extra/clangd/test/system-include-extractor.test
index 861d2e188a1f8..6e7bb5f9e063d 100644
--- a/clang-tools-extra/clangd/test/system-include-extractor.test
+++ b/clang-tools-extra/clangd/test/system-include-extractor.test
@@ -1,7 +1,7 @@
# RUN: rm -rf %t.dir && mkdir -p %t.dir
# The mock driver below is a shell script:
-# REQUIRES: shell
+# UNSUPPORTED: system-windows
# Create a bin directory to store the mock-driver and add it to the path
# RUN: mkdir -p %t.dir/bin
diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp
index dc160fbbbcd9e..3f284fc68f9f3 100644
--- a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp
+++ b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp
@@ -1,7 +1,8 @@
+// sed command does not work as-is on Windows.
+// UNSUPPORTED: system-windows
// RUN: sed -e "s:INPUT_DIR:%S/Inputs/custom-query-check:g" -e "s:OUT_DIR:%t:g" -e "s:MAIN_FILE:%s:g" %S/Inputs/custom-query-check/vfsoverlay.yaml > %t.yaml
// RUN: clang-tidy --allow-no-checks %t/main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml | FileCheck %s --check-prefix=CHECK
// RUN: clang-tidy --allow-no-checks %t/main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml --list-checks | FileCheck %s --check-prefix=LIST-CHECK
-// REQUIRES: shell
long V;
diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp
index dc1f3f3754079..3a43037b291c9 100644
--- a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp
+++ b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// sed command does not work as-is on Windows.
+// UNSUPPORTED: system-windows
// REQUIRES: custom-check
// RUN: sed -e "s:INPUT_DIR:%S/Inputs/custom-query-check:g" -e "s:OUT_DIR:%t:g" -e "s:MAIN_FILE:%s:g" %S/Inputs/custom-query-check/vfsoverlay.yaml > %t.yaml
diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/hide-progress-flag-scripts.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/hide-progress-flag-scripts.cpp
index dbc24780ccbda..df69f90fd39d9 100644
--- a/clang-tools-extra/test/clang-tidy/infrastructure/hide-progress-flag-scripts.cpp
+++ b/clang-tools-extra/test/clang-tidy/infrastructure/hide-progress-flag-scripts.cpp
@@ -11,7 +11,6 @@
// CHECK-RUN-QUIET-NOT: [1/1]
// CHECK-RUN-QUIET: 42 is a magic number;
-// REQUIRES: shell
// RUN: sed 's/42/99/' %s > %t-diff.cpp
// RUN: not diff -U0 %s %t-diff.cpp | %clang_tidy_diff -checks=-*,readability-magic-numbers -quiet -hide-progress -- -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-DIFF-QUIET
|
|
@llvm/pr-subscribers-clangd Author: Aiden Grossman (boomanaiden154) ChangesREQUIRES: shell does not have the intended effect now that the internal shell is enabled by default and only prevents tests from running on Windows. This patch removes the directive for portable tests and switches it to a UNSUPPORTED: system-windows tag for non-portable tests to make the intention more clear. Full diff: https://github.com/llvm/llvm-project/pull/173313.diff 4 Files Affected:
diff --git a/clang-tools-extra/clangd/test/system-include-extractor.test b/clang-tools-extra/clangd/test/system-include-extractor.test
index 861d2e188a1f8..6e7bb5f9e063d 100644
--- a/clang-tools-extra/clangd/test/system-include-extractor.test
+++ b/clang-tools-extra/clangd/test/system-include-extractor.test
@@ -1,7 +1,7 @@
# RUN: rm -rf %t.dir && mkdir -p %t.dir
# The mock driver below is a shell script:
-# REQUIRES: shell
+# UNSUPPORTED: system-windows
# Create a bin directory to store the mock-driver and add it to the path
# RUN: mkdir -p %t.dir/bin
diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp
index dc160fbbbcd9e..3f284fc68f9f3 100644
--- a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp
+++ b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check-not-enable.cpp
@@ -1,7 +1,8 @@
+// sed command does not work as-is on Windows.
+// UNSUPPORTED: system-windows
// RUN: sed -e "s:INPUT_DIR:%S/Inputs/custom-query-check:g" -e "s:OUT_DIR:%t:g" -e "s:MAIN_FILE:%s:g" %S/Inputs/custom-query-check/vfsoverlay.yaml > %t.yaml
// RUN: clang-tidy --allow-no-checks %t/main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml | FileCheck %s --check-prefix=CHECK
// RUN: clang-tidy --allow-no-checks %t/main.cpp -checks='-*,custom-*' -vfsoverlay %t.yaml --list-checks | FileCheck %s --check-prefix=LIST-CHECK
-// REQUIRES: shell
long V;
diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp
index dc1f3f3754079..3a43037b291c9 100644
--- a/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp
+++ b/clang-tools-extra/test/clang-tidy/infrastructure/custom-query-check.cpp
@@ -1,4 +1,5 @@
-// REQUIRES: shell
+// sed command does not work as-is on Windows.
+// UNSUPPORTED: system-windows
// REQUIRES: custom-check
// RUN: sed -e "s:INPUT_DIR:%S/Inputs/custom-query-check:g" -e "s:OUT_DIR:%t:g" -e "s:MAIN_FILE:%s:g" %S/Inputs/custom-query-check/vfsoverlay.yaml > %t.yaml
diff --git a/clang-tools-extra/test/clang-tidy/infrastructure/hide-progress-flag-scripts.cpp b/clang-tools-extra/test/clang-tidy/infrastructure/hide-progress-flag-scripts.cpp
index dbc24780ccbda..df69f90fd39d9 100644
--- a/clang-tools-extra/test/clang-tidy/infrastructure/hide-progress-flag-scripts.cpp
+++ b/clang-tools-extra/test/clang-tidy/infrastructure/hide-progress-flag-scripts.cpp
@@ -11,7 +11,6 @@
// CHECK-RUN-QUIET-NOT: [1/1]
// CHECK-RUN-QUIET: 42 is a magic number;
-// REQUIRES: shell
// RUN: sed 's/42/99/' %s > %t-diff.cpp
// RUN: not diff -U0 %s %t-diff.cpp | %clang_tidy_diff -checks=-*,readability-magic-numbers -quiet -hide-progress -- -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-DIFF-QUIET
|
REQUIRES: shell does not have the intended effect now that the internal shell is enabled by default and only prevents tests from running on Windows. This patch removes the directive for portable tests and switches it to a UNSUPPORTED: system-windows tag for non-portable tests to make the intention more clear.