On 21 October 2011 16:20, Douglas Gregor <[email protected]> wrote: > Author: dgregor > Date: Fri Oct 21 18:20:41 2011 > New Revision: 142699 > > URL: http://llvm.org/viewvc/llvm-project?rev=142699&view=rev > Log: > Switch tests from grep to FileCheck > > Modified: > cfe/trunk/test/CodeGen/debug-info-compilation-dir.c > cfe/trunk/test/Driver/debug.c > > Modified: cfe/trunk/test/CodeGen/debug-info-compilation-dir.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-compilation-dir.c?rev=142699&r1=142698&r2=142699&view=diff > > ============================================================================== > --- cfe/trunk/test/CodeGen/debug-info-compilation-dir.c (original) > +++ cfe/trunk/test/CodeGen/debug-info-compilation-dir.c Fri Oct 21 18:20:41 > 2011 > @@ -1,4 +1,6 @@ > -// RUN: %clang_cc1 -fdebug-compilation-dir /nonsense -emit-llvm -g %s -o - > | \ > -// RUN: grep nonsense > +// RUN: %clang_cc1 -fdebug-compilation-dir /nonsense -emit-llvm -g %s -o - > | FileCheck -check-prefix=CHECK-NONSENSE %s > +// CHECK-NONSENSE: nonsense > + > +// RUN: %clang_cc1 -emit-llvm -g %s -o - | FileCheck > -check-prefix=CHECK-DIR %s > +// CHECK-DIR: CodeGen > > -// RUN: %clang_cc1 -emit-llvm -g %s -o - | grep %S > > Modified: cfe/trunk/test/Driver/debug.c > URL: > http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/debug.c?rev=142699&r1=142698&r2=142699&view=diff > > ============================================================================== > --- cfe/trunk/test/Driver/debug.c (original) > +++ cfe/trunk/test/Driver/debug.c Fri Oct 21 18:20:41 2011 > @@ -1,5 +1,8 @@ > -// RUN: cd %S && %clang -### -g %s -c 2>&1 | grep > '"-fdebug-compilation-dir" "'%S'"' > -// RUN: env PWD=/foo %clang -### -g %s -c 2>&1 | grep > '"-fdebug-compilation-dir" "/foo"' > +// RUN: cd %S && %clang -### -g %s -c 2>&1 | FileCheck > -check-prefix=CHECK-PWD %s > +// CHECK-PWD: {{"-fdebug-compilation-dir" ".*Driver.*"}} > + > +// RUN: env PWD=/foo %clang -### -g %s -c 2>&1 | FileCheck > -check-prefix=CHECK-FOO %s > +// CHECK-FOO: "-fdebug-compilation-dir" "/foo" > > // This test uses grep instead of FileCheck so that we get %S -> dirname > // substitution. >
Please also remove this comment. :-) Nick
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
