[Driver] Fix tests not to fail randomly on Windows
authorPaul Robinson <paul.robinson@sony.com>
Wed, 21 Dec 2022 17:36:36 +0000 (09:36 -0800)
committerPaul Robinson <paul.robinson@sony.com>
Wed, 21 Dec 2022 17:37:12 +0000 (09:37 -0800)
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
clang/test/Driver/fuchsia.c
clang/test/Driver/netbsd.c
clang/test/Driver/openbsd.c

index 87ce46d..a9afff2 100644 (file)
 // RELOCATABLE:     "-r"
 // RELOCATABLE-NOT: "-dynamic-linker"
 // RELOCATABLE-NOT: "-l
-// RELOCATABLE-NOT: crt{{[^./]+}}.o
+// RELOCATABLE-NOT: crt{{[^./\\]+}}.o
 
index 339fd92..9c02332 100644 (file)
@@ -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 \
index 436772a..52f3a33 100644 (file)
 // RELOCATABLE-NOT: "-pie"
 // RELOCATABLE-NOT: "-dynamic-linker"
 // RELOCATABLE-NOT: "-l
-// RELOCATABLE-NOT: crt{{[^./]+}}.o
+// RELOCATABLE-NOT: crt{{[^./\\]+}}.o
index 3ba8a31..05d290a 100644 (file)
@@ -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"