From 5f865672c0836c24e09bd99e39e41a0385587f06 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Mon, 4 May 2009 00:31:11 +0000 Subject: [PATCH] Test a few more bits of the driver. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@70816 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Driver/ccc-add-args.c | 3 +++ test/Driver/dragonfly.c | 6 ++++++ test/Driver/freebsd.c | 7 +++++++ test/Driver/immediate-options.c | 5 +++++ 4 files changed, 21 insertions(+) create mode 100644 test/Driver/ccc-add-args.c create mode 100644 test/Driver/dragonfly.c create mode 100644 test/Driver/freebsd.c create mode 100644 test/Driver/immediate-options.c diff --git a/test/Driver/ccc-add-args.c b/test/Driver/ccc-add-args.c new file mode 100644 index 0000000000..b504b0b429 --- /dev/null +++ b/test/Driver/ccc-add-args.c @@ -0,0 +1,3 @@ +// RUN: env CCC_ADD_ARGS="-ccc-echo,-ccc-print-options,,-v" clang -### 2> %t && +// RUN: grep -F 'Option 0 - Name: "-v", Values: {}' %t && +// RUN: grep -F 'Option 1 - Name: "-###", Values: {}' %t diff --git a/test/Driver/dragonfly.c b/test/Driver/dragonfly.c new file mode 100644 index 0000000000..5d7b0b0f00 --- /dev/null +++ b/test/Driver/dragonfly.c @@ -0,0 +1,6 @@ +// RUN: clang -ccc-host-triple amd64-pc-dragonfly %s -### 2> %t.log && +// RUN: grep 'clang-cc" "-triple" "x86_64-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 + diff --git a/test/Driver/freebsd.c b/test/Driver/freebsd.c new file mode 100644 index 0000000000..91258d9e57 --- /dev/null +++ b/test/Driver/freebsd.c @@ -0,0 +1,7 @@ +// RUN: clang -ccc-clang-archs "" -ccc-host-triple ppc64-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 + diff --git a/test/Driver/immediate-options.c b/test/Driver/immediate-options.c new file mode 100644 index 0000000000..34af89f44d --- /dev/null +++ b/test/Driver/immediate-options.c @@ -0,0 +1,5 @@ +// RUN: clang --help && +// RUN: clang --help-hidden && +// RUN: clang -dumpversion && +// RUN: clang -print-search-dirs && +// RUN: true -- 2.40.0