[PATCH] D130089: update-test-checks: safely handle tests with #if's
Matheus Izvekov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 20 09:47:47 PDT 2022
mizvekov added a comment.
This seems to have introduced a test which always fails on windows:
$ ":" "RUN: at line 4"
$ "cp" "clang\test\utils\update_cc_test_checks/Inputs/ifdef.c" "build\llvm\tools\clang\test\utils\update_cc_test_checks\Output\ifdef.test.tmp.c"
$ "C:/Program Files (x86)/Microsoft Visual Studio/Shared/Python39_64/python.exe" "llvm\utils\update_cc_test_checks.py" "--clang" "build\llvm\RelWithDebInfo\bin\clang" "--opt" "build\llvm\RelWithDebInfo\bin\opt" "build\llvm\tools\clang\test\utils\update_cc_test_checks\Output\ifdef.test.tmp.c"
$ ":" "RUN: at line 5"
$ "diff" "-u" "clang\test\utils\update_cc_test_checks/Inputs/ifdef.c.expected" "build\llvm\tools\clang\test\utils\update_cc_test_checks\Output\ifdef.test.tmp.c"
# command output:
--- clang\test\utils\update_cc_test_checks/Inputs/ifdef.c.expected
+++ build\llvm\tools\clang\test\utils\update_cc_test_checks\Output\ifdef.test.tmp.c
@@ -1,21 +1,21 @@
-// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefixes=CHECK %s
-// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -DFOO | FileCheck -check-prefixes=CHECK,FOO %s
-
-#ifdef FOO
-// FOO-LABEL: @foo(
-// FOO-NEXT: entry:
-// FOO-NEXT: ret i32 1
-//
-int foo() {
- return 1;
-}
-#endif
-
-// CHECK-LABEL: @bar(
-// CHECK-NEXT: entry:
-// CHECK-NEXT: ret i32 2
-//
-int bar() {
- return 2;
-}
+// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
+// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s | FileCheck -check-prefixes=CHECK %s
+// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -emit-llvm -o - %s -DFOO | FileCheck -check-prefixes=CHECK,FOO %s
+
+#ifdef FOO
+// FOO-LABEL: @foo(
+// FOO-NEXT: entry:
+// FOO-NEXT: ret i32 1
+//
+int foo() {
+ return 1;
+}
+#endif
+
+// CHECK-LABEL: @bar(
+// CHECK-NEXT: entry:
+// CHECK-NEXT: ret i32 2
+//
+int bar() {
+ return 2;
+}
error: command failed with exit status: 1
--
********************
Testing: 0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
********************
Failed Tests (1):
Clang :: utils/update_cc_test_checks/ifdef.test
Testing Time: 0.28s
Failed: 1
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130089/new/
https://reviews.llvm.org/D130089
More information about the llvm-commits
mailing list