]> granicus.if.org Git - clang/commitdiff
Make new test slightly more generic to allow running it under
authorDaniel Jasper <djasper@google.com>
Tue, 31 Mar 2015 09:08:16 +0000 (09:08 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 31 Mar 2015 09:08:16 +0000 (09:08 +0000)
non-standard test runners.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@233677 91177308-0d34-0410-b5e6-96231b3b80d8

test/Driver/nacl-direct.c

index 76f9eff1ca421a0d7c9664474c6a5a267a165a7e..87c25f67b154d3343dc9e30699cb7e90e23060f5 100644 (file)
@@ -1,18 +1,18 @@
 // Test clang changes for NaCl Support including:
 //    include paths, library paths, emulation, default static
 //
-// RUN: %clang -### -o %t.o %s 2>&1 \
+// RUN: %clang -no-canonical-prefixes -### -o %t.o %s 2>&1 \
 // RUN:     -target i686-unknown-nacl \
 // RUN:   | FileCheck --check-prefix=CHECK-I686 %s
 // CHECK-I686: {{.*}}clang{{.*}}" "-cc1"
 // CHECK-I686: "-fuse-init-array"
 // CHECK-I686: "-target-cpu" "pentium4"
-// CHECK-I686: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
+// CHECK-I686: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.a-z\-]+]]"
 // CHECK-I686: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
 // CHECK-I686: "-internal-isystem" "{{.*}}/../x86_64-nacl/usr/include"
 // CHECK-I686: "-internal-isystem" "{{.*}}/../x86_64-nacl/include"
-// CHECK-I686: /as" "--32"
-// CHECK-I686: /ld"
+// CHECK-I686: as" "--32"
+// CHECK-I686: ld"
 // CHECK-I686: "--build-id"
 // CHECK-I686: "-m" "elf_i386_nacl"
 // CHECK-I686: "-static"
 // CHECK-I686: "-L{{.*}}/../lib/clang/[[VER]]/lib/i686-nacl"
 // CHECK-I686-NOT: -lpthread
 //
-// RUN: %clang -### -o %t.o %s 2>&1 \
+// RUN: %clang -no-canonical-prefixes -### -o %t.o %s 2>&1 \
 // RUN:     -target x86_64-unknown-nacl \
 // RUN:   | FileCheck --check-prefix=CHECK-x86_64 %s
 // CHECK-x86_64: {{.*}}clang{{.*}}" "-cc1"
 // CHECK-x86_64: "-fuse-init-array"
 // CHECK-x86_64: "-target-cpu" "x86-64"
-// CHECK-x86_64: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
+// CHECK-x86_64: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.a-z\-]+]]"
 // CHECK-x86_64: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
 // CHECK-x86_64: "-internal-isystem" "{{.*}}/../x86_64-nacl/usr/include"
 // CHECK-x86_64: "-internal-isystem" "{{.*}}/../x86_64-nacl/include"
-// CHECK-x86_64: /as" "--64"
-// CHECK-x86_64: /ld"
+// CHECK-x86_64: as" "--64"
+// CHECK-x86_64: ld"
 // CHECK-x86_64: "--build-id"
 // CHECK-x86_64: "-m" "elf_x86_64_nacl"
 // CHECK-x86_64: "-static"
@@ -41,7 +41,7 @@
 // CHECK-x86_64: "-L{{.*}}/../lib/clang/[[VER]]/lib/x86_64-nacl"
 // CHECK-X86_64-NOT: -lpthread
 //
-// RUN: %clang -### -o %t.o %s 2>&1 \
+// RUN: %clang -no-canonical-prefixes -### -o %t.o %s 2>&1 \
 // RUN:     -target armv7a-unknown-nacl-gnueabihf \
 // RUN:   | FileCheck --check-prefix=CHECK-ARM %s
 // CHECK-ARM: {{.*}}clang{{.*}}" "-cc1"
 // CHECK-ARM: "-target-cpu" "cortex-a8"
 // CHECK-ARM: "-target-abi" "aapcs-linux"
 // CHECK-ARM: "-mfloat-abi" "hard"
-// CHECK-ARM: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
+// CHECK-ARM: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.a-z\-]+]]"
 // CHECK-ARM: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
 // CHECK-ARM: "-internal-isystem" "{{.*}}/../arm-nacl/usr/include"
 // CHECK-ARM: "-internal-isystem" "{{.*}}/../arm-nacl/include"
-// CHECK-ARM: /as"
-// CHECK-ARM: /ld"
+// CHECK-ARM: as"
+// CHECK-ARM: ld"
 // CHECK-ARM: "--build-id"
 // CHECK-ARM: "-m" "armelf_nacl"
 // CHECK-ARM: "-static"
@@ -65,7 +65,7 @@
 
 // Check that even when the target arch is just "arm" (as will be the case when
 // it is inferred from the binary name) that we get the right ABI flags
-// RUN: %clang -### -o %t.o %s 2>&1 \
+// RUN: %clang -no-canonical-prefixes -### -o %t.o %s 2>&1 \
 // RUN:     -target arm-nacl \
 // RUN:   | FileCheck --check-prefix=CHECK-ARM-NOV7 %s
 // CHECK-ARM-NOV7: "-triple" "armv7--nacl-gnueabihf"
 
 // Test clang c++ include dirs and link line when using clang++
 
-// RUN: %clangxx -### -o %t.o %s 2>&1 \
+// RUN: %clangxx -no-canonical-prefixes -### -o %t.o %s 2>&1 \
 // RUN:     -target armv7a-unknown-nacl-gnueabihf \
 // RUN:   | FileCheck --check-prefix=CHECK-ARM-CXX %s
 // CHECK-ARM-CXX: {{.*}}clang{{.*}}" "-cc1"
-// CHECK-ARM-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
+// CHECK-ARM-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.a-z\-]+]]"
 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../arm-nacl/include/c++/v1"
 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../arm-nacl/usr/include"
 // CHECK-ARM-CXX: "-internal-isystem" "{{.*}}/../arm-nacl/include"
 // CHECK-ARM-CXX: "-lpthread"
 
-// RUN: %clangxx -### -o %t.o %s 2>&1 \
+// RUN: %clangxx -no-canonical-prefixes -### -o %t.o %s 2>&1 \
 // RUN:     -target i686-unknown-nacl \
 // RUN:   | FileCheck --check-prefix=CHECK-I686-CXX %s
 // CHECK-I686-CXX: {{.*}}clang{{.*}}" "-cc1"
-// CHECK-I686-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
+// CHECK-I686-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.a-z\-]+]]"
 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include/c++/v1"
 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/usr/include"
 // CHECK-I686-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include"
 // CHECK-I686-CXX: "-lpthread"
 
-// RUN: %clangxx -### -o %t.o %s 2>&1 \
+// RUN: %clangxx -no-canonical-prefixes -### -o %t.o %s 2>&1 \
 // RUN:     -target x86_64-unknown-nacl \
 // RUN:   | FileCheck --check-prefix=CHECK-x86_64-CXX %s
 // CHECK-x86_64-CXX: {{.*}}clang{{.*}}" "-cc1"
-// CHECK-x86_64-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.]+]]"
+// CHECK-x86_64-CXX: "-resource-dir" "{{.*}}/lib/clang/[[VER:[0-9.a-z\-]+]]"
 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/include/c++/v1"
 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../lib/clang/[[VER]]/include"
 // CHECK-x86_64-CXX: "-internal-isystem" "{{.*}}/../x86_64-nacl/usr/include"