From: John Thompson Date: Tue, 13 Oct 2009 18:51:26 +0000 (+0000) Subject: Converted to use FileCheck. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e517c85b2e4873d33f0ba4d6394896300730bc5;p=clang Converted to use FileCheck. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84005 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/dragonfly.c b/test/Driver/dragonfly.c index 201d1364e0..f0b09f7e23 100644 --- a/test/Driver/dragonfly.c +++ b/test/Driver/dragonfly.c @@ -1,6 +1,8 @@ // RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log && -// RUN: grep 'clang-cc" "-triple" "amd64-pc-dragonfly"' %t.log && -// RUN: grep 'as" "-o" ".*\.o" ".*\.s' %t.log && -// RUN: grep 'ld" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" ".*crtbegin.o" ".*\.o" "-L.*/gcc.*" .* "-lc" "-lgcc" ".*crtend.o" ".*crtn.o"' %t.log && -// RUN: true +// RUN: FileCheck -input-file %t.log %s + +// CHECK: clang-cc{{.*}}" "-triple" "amd64-pc-dragonfly" +// CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s +// CHECK: ld{{.*}}" "-dynamic-linker" "{{.*}}ld-elf.{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-L{{.*}}/gcc{{.*}}" {{.*}} "-lc" "-lgcc" "{{.*}}crtend.o" "{{.*}}crtn.o" + diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c index e97854e90b..d50c85b749 100644 --- a/test/Driver/freebsd.c +++ b/test/Driver/freebsd.c @@ -1,7 +1,7 @@ // RUN: clang -ccc-clang-archs "" -ccc-host-triple powerpc64-pc-freebsd8 %s -### 2> %t.log && // RUN: cat %t.log && -// RUN: grep 'clang-cc" "-triple" "powerpc64-pc-freebsd8"' %t.log && -// RUN: grep 'as" "-o" ".*\.o" ".*\.s' %t.log && -// RUN: grep 'ld" "--eh-frame-hdr" "-dynamic-linker" ".*ld-elf.*" "-o" "a\.out" ".*crt1.o" ".*crti.o" ".*crtbegin.o" ".*\.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" ".*crtend.o" ".*crtn.o"' %t.log && -// RUN: true +// RUN: FileCheck -input-file %t.log %s +// CHECK: clang-cc{{.*}}" "-triple" "powerpc64-pc-freebsd8" +// CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s +// CHECK: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "{{.*}}ld-elf{{.*}}" "-o" "a.out" "{{.*}}crt1.o" "{{.*}}crti.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "{{.*}}crtend.o" "{{.*}}crtn.o" diff --git a/test/Driver/openbsd.c b/test/Driver/openbsd.c index adcb2c9590..c73ef20d80 100644 --- a/test/Driver/openbsd.c +++ b/test/Driver/openbsd.c @@ -1,6 +1,6 @@ // RUN: clang -ccc-clang-archs "" -ccc-host-triple i686-pc-openbsd %s -### 2> %t.log && -// RUN: grep 'clang-cc" "-triple" "i686-pc-openbsd"' %t.log && -// RUN: grep 'as" "-o" ".*\.o" ".*\.s' %t.log && -// RUN: grep 'ld" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" ".*ld.so" "-o" "a\.out" ".*crt0.o" ".*crtbegin.o" ".*\.o" "-lgcc" "-lc" "-lgcc" ".*crtend.o"' %t.log && -// RUN: true +// RUN: FileCheck -input-file %t.log %s +// CHECK: clang-cc{{.*}}" "-triple" "i686-pc-openbsd" +// CHECK: as{{.*}}" "-o" "{{.*}}.o" "{{.*}}.s +// CHECK: ld{{.*}}" "-e" "__start" "--eh-frame-hdr" "-Bdynamic" "-dynamic-linker" "{{.*}}ld.so" "-o" "a.out" "{{.*}}crt0.o" "{{.*}}crtbegin.o" "{{.*}}.o" "-lgcc" "-lc" "-lgcc" "{{.*}}crtend.o" diff --git a/test/Driver/pth.c b/test/Driver/pth.c index 748053809a..5c83aea54c 100644 --- a/test/Driver/pth.c +++ b/test/Driver/pth.c @@ -1,8 +1,12 @@ // Test transparent PTH support. // RUN: clang -ccc-pch-is-pth -x c-header %s -o %t.h.pth -### 2> %t.log && -// RUN: grep '".*/clang-cc" .* "-o" ".*\.h\.pth" "-x" "c-header" ".*pth\.c"' %t.log && +// RUN: FileCheck -check-prefix CHECK1 -input-file %t.log %s && + +// CHECK1: "{{.*}}/clang-cc{{.*}}" {{.*}} "-o" "{{.*}}.h.pth" "-x" "c-header" "{{.*}}pth.c" // RUN: touch %t.h.pth && // RUN: clang -ccc-pch-is-pth -E -include %t.h %s -### 2> %t.log && -// RUN: grep '".*/clang-cc" .*"-include-pth" ".*\.h\.pth" .*"-x" "c" ".*pth\.c"' %t.log +// RUN: FileCheck -check-prefix CHECK2 -input-file %t.log %s + +// CHECK2: "{{.*}}/clang-cc{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.pth" {{.*}}"-x" "c" "{{.*}}pth.c" diff --git a/test/Lexer/11-27-2007-FloatLiterals.c b/test/Lexer/11-27-2007-FloatLiterals.c index f3ea7cbaf9..ab3aba1a6e 100644 --- a/test/Lexer/11-27-2007-FloatLiterals.c +++ b/test/Lexer/11-27-2007-FloatLiterals.c @@ -1,5 +1,9 @@ -// RUN: clang-cc %s -emit-llvm -o - | grep 0x3BFD83C940000000 | count 2 && -// RUN: clang-cc %s -emit-llvm -o - | grep 2.000000e+32 | count 2 +// RUN: clang-cc %s -emit-llvm -o - | FileCheck %s + +// CHECK: 0x3BFD83C940000000 +// CHECK: 2.000000e+{{[0]*}}32 +// CHECK: 0x3BFD83C940000000 +// CHECK: 2.000000e+{{[0]*}}32 float F = 1e-19f; double D = 2e32;