[cfe-commits] r67131 - /cfe/trunk/test/Driver/bindings.c

Daniel Dunbar daniel at zuster.org
Tue Mar 17 16:39:24 PDT 2009


Author: ddunbar
Date: Tue Mar 17 18:39:24 2009
New Revision: 67131

URL: http://llvm.org/viewvc/llvm-project?rev=67131&view=rev
Log:
Driver: Add test case for various parts of binding (no-integrated-cpp,
-ccc-no-clang, -ccc-no-clang-cxx, -ccc-no-clang-cpp, -fsyntax-only).

Added:
    cfe/trunk/test/Driver/bindings.c

Added: cfe/trunk/test/Driver/bindings.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/bindings.c?rev=67131&view=auto

==============================================================================
--- cfe/trunk/test/Driver/bindings.c (added)
+++ cfe/trunk/test/Driver/bindings.c Tue Mar 17 18:39:24 2009
@@ -0,0 +1,36 @@
+// Basic binding.
+// RUN: clang-driver -ccc-print-bindings %s &> %t &&
+// RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: "/tmp/foo.s"' %t &&
+// RUN: grep 'bind - "gcc::Assemble", inputs: \["/tmp/foo.s"\], output: "/tmp/foo.o"' %t &&
+// RUN: grep 'bind - "gcc::Link", inputs: \["/tmp/foo.o"\], output: "a.out"' %t &&
+
+// RUN: clang-driver -ccc-print-bindings -ccc-no-clang %s &> %t &&
+// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: "/tmp/foo.s"' %t &&
+// RUN: grep 'bind - "gcc::Assemble", inputs: \["/tmp/foo.s"\], output: "/tmp/foo.o"' %t &&
+// RUN: grep 'bind - "gcc::Link", inputs: \["/tmp/foo.o"\], output: "a.out"' %t &&
+
+// RUN: clang-driver -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s &> %t &&
+// RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: "/tmp/foo.i"' %t &&
+// RUN: grep 'bind - "gcc::Compile", inputs: \["/tmp/foo.i"\], output: "/tmp/foo.s"' %t &&
+// RUN: grep 'bind - "gcc::Assemble", inputs: \["/tmp/foo.s"\], output: "/tmp/foo.o"' %t &&
+// RUN: grep 'bind - "gcc::Link", inputs: \["/tmp/foo.o"\], output: "a.out"' %t &&
+
+// RUN: clang-driver -ccc-print-bindings -ccc-no-clang -no-integrated-cpp -pipe %s &> %t &&
+// RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: (pipe)' %t &&
+// RUN: grep 'bind - "gcc::Compile", inputs: \[(pipe)\], output: (pipe)' %t &&
+// RUN: grep 'bind - "gcc::Assemble", inputs: \[(pipe)\], output: "/tmp/foo.o"' %t &&
+// RUN: grep 'bind - "gcc::Link", inputs: \["/tmp/foo.o"\], output: "a.out"' %t &&
+
+// Clang control options
+
+// RUN: clang-driver -ccc-print-bindings -fsyntax-only %s &> %t &&
+// RUN: grep 'bind - "clang", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
+// RUN: clang-driver -ccc-print-bindings -ccc-no-clang -fsyntax-only %s &> %t &&
+// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
+// RUN: clang-driver -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s &> %t &&
+// RUN: grep 'bind - "gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
+// RUN: clang-driver -ccc-print-bindings -ccc-no-clang-cpp -fsyntax-only -no-integrated-cpp -x c++ %s &> %t &&
+// RUN: grep 'bind - "gcc::Preprocess", inputs: \[".*bindings.c"\], output: "/tmp/foo.ii"' %t &&
+// RUN: grep 'bind - "clang", inputs: \["/tmp/foo.ii"\], output: (nothing)' %t &&
+
+// RUN: true





More information about the cfe-commits mailing list