Skip to content

Commit b9bd6c3

Browse files
committed
[Driver] Dont use absolute paths for invoking subcommands for driver 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 adds the `-no-canonical-prefixes` option to the command line to not realpath-ify the binary name.
1 parent a934ddc commit b9bd6c3

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// the --gcc-toolchain one.
77

88
// = Big-endian, mips32r2, hard float
9-
// RUN: %clang -### %s 2>&1 \
9+
// RUN: %clang -### -no-canonical-prefixes %s 2>&1 \
1010
// RUN: --target=mips-mti-linux -mips32r2 -mhard-float -no-pie \
1111
// RUN: -rtlib=platform -fuse-ld=ld \
1212
// RUN: --sysroot=%S/Inputs/mips_mti_linux/sysroot \
@@ -25,7 +25,7 @@
2525
// CHECK-BE-HF-32R2-SAME: "[[SYSROOT]]/mips-r2-hard-musl/usr/lib{{/|\\\\}}crtn.o"
2626

2727
// = Little-endian, mips32r2, hard float
28-
// RUN: %clang -### %s 2>&1 \
28+
// RUN: %clang -### -no-canonical-prefixes %s 2>&1 \
2929
// RUN: --target=mips-mti-linux -mips32r2 -EL -mhard-float -no-pie \
3030
// RUN: -rtlib=platform -fuse-ld=ld \
3131
// RUN: --sysroot=%S/Inputs/mips_mti_linux/sysroot \

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,21 @@
7070

7171
/// Check that the runtime bitcode library is part of the compile line.
7272
/// Create a bogus bitcode library and specify it with libomptarget-nvptx-bc-path
73-
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
73+
// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
7474
// RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-nvptx-test.bc \
7575
// RUN: -Xopenmp-target -march=sm_52 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \
7676
// RUN: -fopenmp-relocatable-target -save-temps %s 2>&1 \
7777
// RUN: | FileCheck -check-prefix=CHK-BCLIB %s
7878

7979
/// Specify the directory containing the bitcode lib, check clang picks the right one
80-
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
80+
// RUN: %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
8181
// RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget \
8282
// RUN: -Xopenmp-target -march=sm_52 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \
8383
// RUN: -fopenmp-relocatable-target -save-temps \
8484
// RUN: %s 2>&1 | FileCheck -check-prefix=CHK-BCLIB-DIR %s
8585

8686
/// Create a bogus bitcode library and find it with LIBRARY_PATH
87-
// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget/subdir %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
87+
// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget/subdir %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \
8888
// RUN: -Xopenmp-target -march=sm_52 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \
8989
// RUN: -fopenmp-relocatable-target -save-temps \
9090
// RUN: %s 2>&1 | FileCheck -check-prefix=CHK-ENV-BCLIB %s

clang/test/Driver/openmp-offload.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,55 +35,55 @@
3535
/// ###########################################################################
3636

3737
/// Check -Xopenmp-target=powerpc64le-ibm-linux-gnu -mcpu=pwr7 is passed when compiling for the device.
38-
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target=powerpc64le-ibm-linux-gnu -mcpu=pwr7 %s 2>&1 \
38+
// RUN: %clang -### -no-canonical-prefixes -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

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

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

4545
/// Check -Xopenmp-target -mcpu=pwr7 is passed when compiling for the device.
46-
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -mcpu=pwr7 %s 2>&1 \
46+
// RUN: %clang -### -no-canonical-prefixes -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

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

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

5353
/// Check -mcpu=pwr7 is passed to the same triple.
54-
// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu --target=powerpc64le-ibm-linux-gnu -mcpu=pwr7 %s 2>&1 \
54+
// RUN: %clang -### -no-canonical-prefixes -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

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

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

6161
/// Check -march=pwr7 is NOT passed to nvptx64-nvidia-cuda.
62-
// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda --target=powerpc64le-ibm-linux-gnu -march=pwr7 %s 2>&1 \
62+
// RUN: not %clang -### -no-canonical-prefixes -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

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

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

6969
/// Check -march=pwr7 is NOT passed to x86_64-unknown-linux-gnu.
70-
// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=x86_64-unknown-linux-gnu --target=powerpc64le-ibm-linux-gnu -march=pwr7 %s 2>&1 \
70+
// RUN: not %clang -### -no-canonical-prefixes -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

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

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

7777
/// Check -Xopenmp-target triggers error when multiple triples are used.
78-
// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu,powerpc64le-unknown-linux-gnu -Xopenmp-target -mcpu=pwr8 %s 2>&1 \
78+
// RUN: not %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu,powerpc64le-unknown-linux-gnu -Xopenmp-target -mcpu=pwr8 %s 2>&1 \
7979
// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-AMBIGUOUS-ERROR %s
8080

8181
// CHK-FOPENMP-TARGET-AMBIGUOUS-ERROR: clang{{.*}} error: cannot deduce implicit triple value for -Xopenmp-target, specify triple using -Xopenmp-target=<triple>
8282

8383
/// ###########################################################################
8484

8585
/// Check -Xopenmp-target triggers error when an option requiring arguments is passed to it.
86-
// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -Xopenmp-target -mcpu=pwr8 %s 2>&1 \
86+
// RUN: not %clang -### -no-canonical-prefixes -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -Xopenmp-target -mcpu=pwr8 %s 2>&1 \
8787
// RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-NESTED-ERROR %s
8888

8989
// CHK-FOPENMP-TARGET-NESTED-ERROR: clang{{.*}} error: invalid -Xopenmp-target argument: '-Xopenmp-target -Xopenmp-target', options requiring arguments are unsupported

clang/test/Driver/ve-toolchain.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
/// - nld VE specific options
8080
/// - sjlj exception
8181

82-
// RUN: %clang -### --target=ve-unknown-linux-gnu \
82+
// RUN: %clang -### -no-canonical-prefixes --target=ve-unknown-linux-gnu \
8383
// RUN: --sysroot %S/Inputs/basic_ve_tree \
8484
// RUN: -resource-dir=%S/Inputs/basic_ve_tree/resource_dir \
8585
// RUN: --unwindlib=none \

0 commit comments

Comments
 (0)