From d4959b5a4bb888789f99a952a1304ce915dfee2f Mon Sep 17 00:00:00 2001 From: Paul Robinson Date: Wed, 21 Dec 2022 09:36:36 -0800 Subject: [PATCH] [Driver] Fix tests not to fail randomly on Windows These used a regex that didn't guard against backslashes, so getting "lucky" with a temp dir name could make them fail. --- clang/test/Driver/freebsd.c | 2 +- clang/test/Driver/fuchsia.c | 2 +- clang/test/Driver/netbsd.c | 2 +- clang/test/Driver/openbsd.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/clang/test/Driver/freebsd.c b/clang/test/Driver/freebsd.c index 87ce46d..a9afff2 100644 --- a/clang/test/Driver/freebsd.c +++ b/clang/test/Driver/freebsd.c @@ -212,5 +212,5 @@ // RELOCATABLE: "-r" // RELOCATABLE-NOT: "-dynamic-linker" // RELOCATABLE-NOT: "-l -// RELOCATABLE-NOT: crt{{[^./]+}}.o +// RELOCATABLE-NOT: crt{{[^./\\]+}}.o diff --git a/clang/test/Driver/fuchsia.c b/clang/test/Driver/fuchsia.c index 339fd92..9c02332 100644 --- a/clang/test/Driver/fuchsia.c +++ b/clang/test/Driver/fuchsia.c @@ -89,7 +89,7 @@ // CHECK-RELOCATABLE-NOT "-dynamic-linker" // CHECK-RELOCATABLE: "-r" // CHECK-RELOCATABLE-NOT: "-l -// CHECK-RELOCATABLE-NOT: crt{{[^./]+}}.o +// CHECK-RELOCATABLE-NOT: crt{{[^./\\]+}}.o // RUN: %clang -### %s --target=x86_64-unknown-fuchsia -nodefaultlibs -fuse-ld=lld 2>&1 \ // RUN: -resource-dir=%S/Inputs/resource_dir_with_per_target_subdir \ diff --git a/clang/test/Driver/netbsd.c b/clang/test/Driver/netbsd.c index 436772a..52f3a33 100644 --- a/clang/test/Driver/netbsd.c +++ b/clang/test/Driver/netbsd.c @@ -476,4 +476,4 @@ // RELOCATABLE-NOT: "-pie" // RELOCATABLE-NOT: "-dynamic-linker" // RELOCATABLE-NOT: "-l -// RELOCATABLE-NOT: crt{{[^./]+}}.o +// RELOCATABLE-NOT: crt{{[^./\\]+}}.o diff --git a/clang/test/Driver/openbsd.c b/clang/test/Driver/openbsd.c index 3ba8a31..05d290a 100644 --- a/clang/test/Driver/openbsd.c +++ b/clang/test/Driver/openbsd.c @@ -39,7 +39,7 @@ // CHECK-LD-R: "-r" // CHECK-LD-R-NOT: "-dynamic-linker" // CHECK-LD-R-NOT: "-l -// CHECK-LD-R-NOT: crt{{[^./]+}}.o +// CHECK-LD-R-NOT: crt{{[^./\\]+}}.o // CHECK-LD-S: "-cc1" "-triple" "i686-pc-openbsd" // CHECK-LD-S: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "-L{{.*}}" "-s" "{{.*}}.o" "-lcompiler_rt" "-lc" "-lcompiler_rt" "{{.*}}crtend.o" // CHECK-LD-T: "-cc1" "-triple" "i686-pc-openbsd" -- 2.7.4