Skip to content

Commit fa0880d

Browse files
committed
[Driver] Make the FileCheck less strict for some tests.
We see some tests are failing internally after 12949c9. In some CAS systems, we might not see the exact binary name (clang), this patch removes the binary name in the FileCheck content to make these tests work on CAS.
1 parent a934ddc commit fa0880d

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

clang/test/Driver/mips-mti-linux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// RUN: --sysroot=%S/Inputs/mips_mti_linux/sysroot \
1313
// RUN: | FileCheck --check-prefix=CHECK-BE-HF-32R2 %s
1414
//
15-
// CHECK-BE-HF-32R2: "{{[^"]*}}clang{{[^"]*}}" {{.*}} "-triple" "mips-mti-linux"
15+
// CHECK-BE-HF-32R2: "-triple" "mips-mti-linux"
1616
// CHECK-BE-HF-32R2-SAME: "-target-cpu" "mips32r2"
1717
// CHECK-BE-HF-32R2-SAME: "-isysroot" "{{.*}}mips_mti_linux/sysroot"
1818
// CHECK-BE-HF-32R2: "{{[^"]*}}ld.lld{{[^"]*}}"
@@ -31,7 +31,7 @@
3131
// RUN: --sysroot=%S/Inputs/mips_mti_linux/sysroot \
3232
// RUN: | FileCheck --check-prefix=CHECK-LE-HF-32R2 %s
3333
//
34-
// CHECK-LE-HF-32R2: "{{[^"]*}}clang{{[^"]*}}" {{.*}} "-triple" "mipsel-mti-linux"
34+
// CHECK-LE-HF-32R2: "-triple" "mipsel-mti-linux"
3535
// CHECK-LE-HF-32R2-SAME: "-target-cpu" "mips32r2"
3636
// CHECK-LE-HF-32R2-SAME: "-isysroot" "{{.*}}mips_mti_linux/sysroot"
3737
// CHECK-LE-HF-32R2: "{{[^"]*}}ld.lld{{[^"]*}}"

clang/test/Driver/openmp-offload-gpu.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@
8989
// RUN: -fopenmp-relocatable-target -save-temps \
9090
// RUN: %s 2>&1 | FileCheck -check-prefix=CHK-ENV-BCLIB %s
9191

92-
// CHK-BCLIB: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-test.bc
93-
// CHK-BCLIB-DIR: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget{{/|\\\\}}libomptarget-nvptx-sm_52.bc
94-
// CHK-ENV-BCLIB: clang{{.*}}-triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}subdir{{/|\\\\}}libomptarget-nvptx-sm_52.bc
92+
// CHK-BCLIB: triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget-nvptx-test.bc
93+
// CHK-BCLIB-DIR: triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}libomptarget{{/|\\\\}}libomptarget-nvptx-sm_52.bc
94+
// CHK-ENV-BCLIB: triple{{.*}}nvptx64-nvidia-cuda{{.*}}-mlink-builtin-bitcode{{.*}}subdir{{/|\\\\}}libomptarget-nvptx-sm_52.bc
9595
// CHK-BCLIB-NOT: {{error:|warning:}}
9696

9797
/// ###########################################################################

clang/test/Driver/openmp-offload.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,39 @@
3838
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target=powerpc64le-ibm-linux-gnu -mcpu=pwr7 %s 2>&1 \
3939
// RUN: | FileCheck -check-prefix=CHK-FOPENMP-EQ-TARGET %s
4040

41-
// CHK-FOPENMP-EQ-TARGET: clang{{.*}} "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
41+
// CHK-FOPENMP-EQ-TARGET: "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
4242

4343
/// ###########################################################################
4444

4545
/// Check -Xopenmp-target -mcpu=pwr7 is passed when compiling for the device.
4646
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -mcpu=pwr7 %s 2>&1 \
4747
// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET %s
4848

49-
// CHK-FOPENMP-TARGET: clang{{.*}} "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
49+
// CHK-FOPENMP-TARGET: "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
5050

5151
/// ##########################################################################
5252

5353
/// Check -mcpu=pwr7 is passed to the same triple.
5454
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu --target=powerpc64le-ibm-linux-gnu -mcpu=pwr7 %s 2>&1 \
5555
// RUN: | FileCheck -check-prefix=CHK-FOPENMP-MCPU-TO-SAME-TRIPLE %s
5656

57-
// CHK-FOPENMP-MCPU-TO-SAME-TRIPLE: clang{{.*}} "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
57+
// CHK-FOPENMP-MCPU-TO-SAME-TRIPLE: "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
5858

5959
/// ##########################################################################
6060

6161
/// Check -march=pwr7 is NOT passed to nvptx64-nvidia-cuda.
6262
// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda --target=powerpc64le-ibm-linux-gnu -march=pwr7 %s 2>&1 \
6363
// RUN: | FileCheck -check-prefix=CHK-FOPENMP-MARCH-TO-GPU %s
6464

65-
// CHK-FOPENMP-MARCH-TO-GPU-NOT: clang{{.*}} "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
65+
// CHK-FOPENMP-MARCH-TO-GPU-NOT: "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
6666

6767
/// ###########################################################################
6868

6969
/// Check -march=pwr7 is NOT passed to x86_64-unknown-linux-gnu.
7070
// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=x86_64-unknown-linux-gnu --target=powerpc64le-ibm-linux-gnu -march=pwr7 %s 2>&1 \
7171
// RUN: | FileCheck -check-prefix=CHK-FOPENMP-MARCH-TO-X86 %s
7272

73-
// CHK-FOPENMP-MARCH-TO-X86-NOT: clang{{.*}} "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
73+
// CHK-FOPENMP-MARCH-TO-X86-NOT: "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device"
7474

7575
/// ###########################################################################
7676

clang/test/Driver/ve-toolchain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
// RUN: -fuse-ld=ld \
8787
// RUN: %s 2>&1 | FileCheck -check-prefix=DEF %s
8888

89-
// DEF: clang{{.*}}" "-cc1"
89+
// DEF: "-cc1"
9090
// DEF-SAME: "-resource-dir" "[[RESOURCE_DIR:[^"]+]]"
9191
// DEF-SAME: "-isysroot" "[[SYSROOT:[^"]+]]"
9292
// DEF-SAME: "-exception-model=sjlj"

0 commit comments

Comments
 (0)