r233677 - Make new test slightly more generic to allow running it under
Daniel Jasper
djasper at google.com
Tue Mar 31 02:08:16 PDT 2015
Author: djasper
Date: Tue Mar 31 04:08:16 2015
New Revision: 233677
URL: http://llvm.org/viewvc/llvm-project?rev=233677&view=rev
Log:
Make new test slightly more generic to allow running it under
non-standard test runners.
Modified:
cfe/trunk/test/Driver/nacl-direct.c
Modified: cfe/trunk/test/Driver/nacl-direct.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/nacl-direct.c?rev=233677&r1=233676&r2=233677&view=diff
==============================================================================
--- cfe/trunk/test/Driver/nacl-direct.c (original)
+++ cfe/trunk/test/Driver/nacl-direct.c Tue Mar 31 04:08:16 2015
@@ -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"
@@ -21,18 +21,18 @@
// 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"
@@ -49,12 +49,12 @@
// 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"
@@ -74,33 +74,33 @@
// 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"
More information about the cfe-commits
mailing list