diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-03-25 06:28:14 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-03-25 06:28:14 +0000 |
commit | 2acbea1b570161a1eebbacf2e4a6f094f65b2522 (patch) | |
tree | c2b0045a185a38f5f248655e8718d2f509f10917 | |
parent | 4abba168319704f6addd28506e90d1dd17f2016d (diff) | |
download | llvm-2acbea1b570161a1eebbacf2e4a6f094f65b2522.zip llvm-2acbea1b570161a1eebbacf2e4a6f094f65b2522.tar.gz llvm-2acbea1b570161a1eebbacf2e4a6f094f65b2522.tar.bz2 |
- r127284 Availability of Lit on MSYS configure.
- r127729 test/Driver/hello.c: Tweak for cygming.
- r127860, r127861 tweak 2 tests for MSYS bash.
--- Merging r127284 into '.':
U test/Makefile
--- Merging r127729 into '.':
U test/Driver/hello.c
--- Merging r127860 into '.':
U test/Driver/darwin-cc.c
--- Merging r127861 into '.':
U test/Driver/sysroot-flags.c
llvm-svn: 128260
-rw-r--r-- | clang/test/Driver/darwin-cc.c | 7 | ||||
-rw-r--r-- | clang/test/Driver/hello.c | 6 | ||||
-rw-r--r-- | clang/test/Driver/sysroot-flags.c | 14 | ||||
-rw-r--r-- | clang/test/Makefile | 42 |
4 files changed, 35 insertions, 34 deletions
diff --git a/clang/test/Driver/darwin-cc.c b/clang/test/Driver/darwin-cc.c index b068bb4..247b02b 100644 --- a/clang/test/Driver/darwin-cc.c +++ b/clang/test/Driver/darwin-cc.c @@ -1,5 +1,4 @@ // RUN: %clang -ccc-no-clang -ccc-host-triple i386-apple-darwin10 -m32 -### -MD -g -fast -Q -dA -mkernel -ansi -aFOO -S -o /tmp/OUTPUTNAME -g0 -gfull -O2 -Werror -pedantic -Wmost -w -std=c99 -trigraphs -v -pg -fFOO -undef -Qn --param a=b -fmudflap -coverage -save-temps -nostdinc -I ARG0 -F ARG1 -I ARG2 -P -MF ARG3 -MG -MP -remap -g3 -H -D ARG4 -U ARG5 -A ARG6 -D ARG7 -U ARG8 -A ARG9 -include ARG10 -pthread %s 2> %t.log -// RUN: grep ' ".*cc1" "-E" "-nostdinc" "-v" "-I" "ARG0" "-FARG1" "-I" "ARG2" "-P" "-MD" "/tmp/OUTPUTNAME.d" "-MF" "ARG3" "-MG" "-MP" "-MQ" "/tmp/OUTPUTNAME" "-remap" "-dD" "-H" "-D__STATIC__" "-D_REENTRANT" "-D" "ARG4" "-U" "ARG5" "-A" "ARG6" "-D" "ARG7" "-U" "ARG8" "-A" "ARG9" "-include" "ARG10" ".*darwin-cc.c" "-D_MUDFLAP" "-include" "mf-runtime.h" "-m32" "-mkernel" "-mtune=core2" "-mmacosx-version-min=10.6.0" "-ansi" "-std=c99" "-trigraphs" "-Werror" "-pedantic" "-Wmost" "-w" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-O2" "-undef" "-fpch-preprocess" "-o" ".*darwin-cc.i"' %t.log -// RUN: grep ' ".*cc1" "-fpreprocessed" ".*darwin-cc.i" "-O3" "-dumpbase" ".*darwin-cc.c" "-dA" "-m32" "-mkernel" "-mtune=core2" "-mmacosx-version-min=10.6.0" "-ansi" "-aFOO" "-auxbase-strip" "/tmp/OUTPUTNAME" "-g" "-g0" "-g" "-g3" "-O2" "-Werror" "-pedantic" "-Wmost" "-w" "-ansi" "-std=c99" "-trigraphs" "-version" "-p" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-undef" "-fno-ident" "-o" "/tmp/OUTPUTNAME" "--param" "a=b" "-fno-builtin" "-fno-merge-constants" "-fprofile-arcs" "-ftest-coverage"' %t.log - - +// RUN: FileCheck %s < %t.log +// CHECK: {{ ".*cc1.*" "-E" "-nostdinc" "-v" "-I" "ARG0" "-FARG1" "-I" "ARG2" "-P" "-MD" "[^"]*/OUTPUTNAME.d" "-MF" "ARG3" "-MG" "-MP" "-MQ" "[^"]*/OUTPUTNAME" "-remap" "-dD" "-H" "-D__STATIC__" "-D_REENTRANT" "-D" "ARG4" "-U" "ARG5" "-A" "ARG6" "-D" "ARG7" "-U" "ARG8" "-A" "ARG9" "-include" "ARG10" ".*darwin-cc.c" "-D_MUDFLAP" "-include" "mf-runtime.h" "-m32" "-mkernel" "-mtune=core2" "-mmacosx-version-min=10.6.0" "-ansi" "-std=c99" "-trigraphs" "-Werror" "-pedantic" "-Wmost" "-w" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-O2" "-undef" "-fpch-preprocess" "-o" ".*darwin-cc.i"}} +// CHECK: {{ ".*cc1.*" "-fpreprocessed" ".*darwin-cc.i" "-O3" "-dumpbase" ".*darwin-cc.c" "-dA" "-m32" "-mkernel" "-mtune=core2" "-mmacosx-version-min=10.6.0" "-ansi" "-aFOO" "-auxbase-strip" "[^"]*/OUTPUTNAME" "-g" "-g0" "-g" "-g3" "-O2" "-Werror" "-pedantic" "-Wmost" "-w" "-ansi" "-std=c99" "-trigraphs" "-version" "-p" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-undef" "-fno-ident" "-o" "[^"]*/OUTPUTNAME" "--param" "a=b" "-fno-builtin" "-fno-merge-constants" "-fprofile-arcs" "-ftest-coverage"}} diff --git a/clang/test/Driver/hello.c b/clang/test/Driver/hello.c index 82bc699..c2260e5 100644 --- a/clang/test/Driver/hello.c +++ b/clang/test/Driver/hello.c @@ -1,9 +1,9 @@ -// RUN: %clang -ccc-echo -o %t %s 2> %t.log +// RUN: %clang -ccc-echo -o %t.exe %s 2> %t.log // Make sure we used clang. -// RUN: grep 'clang\(-[0-9.]\+\)\?" -cc1 .*hello.c' %t.log +// RUN: grep 'clang\(-[0-9.]\+\)\?\(\.[Ee][Xx][Ee]\)\?" -cc1 .*hello.c' %t.log -// RUN: %t > %t.out +// RUN: %t.exe > %t.out // RUN: grep "I'm a little driver, short and stout." %t.out // FIXME: We don't have a usable assembler on Windows, so we can't build real diff --git a/clang/test/Driver/sysroot-flags.c b/clang/test/Driver/sysroot-flags.c index 461c451..044a86f 100644 --- a/clang/test/Driver/sysroot-flags.c +++ b/clang/test/Driver/sysroot-flags.c @@ -2,27 +2,27 @@ // RUN: %clang -### -fsyntax-only -isysroot /foo/bar %s 2>&1 | \ // RUN: FileCheck %s -check-prefix=ISYSROOT -// ISYSROOT: "-isysroot" "/foo/bar" +// ISYSROOT: "-isysroot" "{{[^"]*}}/foo/bar" // Check that we get both isysroot for headers, and pass --sysroot on to GCC to // produce the final binary. // RUN: %clang -### -ccc-host-triple x86_64-unknown-linux-gnu \ // RUN: --sysroot=/foo/bar -o /dev/null %s 2>&1 | \ // RUN: FileCheck %s -check-prefix=SYSROOT_EQ -// SYSROOT_EQ: "-isysroot" "/foo/bar" -// SYSROOT_EQ: "--sysroot{{" "|=}}/foo/bar" +// SYSROOT_EQ: "-isysroot" "{{[^"]*}}/foo/bar" +// SYSROOT_EQ: "--sysroot{{" "|=}}{{[^"]*}}/foo/bar" // Check for overriding the header sysroot by providing both --sysroot and // -isysroot. // RUN: %clang -### -ccc-host-triple x86_64-unknown-linux-gnu -isysroot /baz \ // RUN: --sysroot=/foo/bar -o /dev/null %s 2>&1 | FileCheck %s \ // RUN: -check-prefix=ISYSROOT_AND_SYSROOT -// ISYSROOT_AND_SYSROOT: "-isysroot" "/baz" -// ISYSROOT_AND_SYSROOT: "--sysroot{{" "|=}}/foo/bar" +// ISYSROOT_AND_SYSROOT: "-isysroot" "{{[^"]*}}/baz" +// ISYSROOT_AND_SYSROOT: "--sysroot{{" "|=}}{{[^"]*}}/foo/bar" // Check that omitting the equals works as well. // RUN: %clang -### -ccc-host-triple x86_64-unknown-linux-gnu \ // RUN: --sysroot /foo/bar -o /dev/null %s 2>&1 | \ // RUN: FileCheck %s -check-prefix=SYSROOT_SEPARATE -// SYSROOT_SEPARATE: "-isysroot" "/foo/bar" -// SYSROOT_SEPARATE: "--sysroot{{" "|=}}/foo/bar" +// SYSROOT_SEPARATE: "-isysroot" "{{[^"]*}}/foo/bar" +// SYSROOT_SEPARATE: "--sysroot{{" "|=}}{{[^"]*}}/foo/bar" diff --git a/clang/test/Makefile b/clang/test/Makefile index b0c829c..050c3a5 100644 --- a/clang/test/Makefile +++ b/clang/test/Makefile @@ -38,30 +38,32 @@ FORCE: lit.site.cfg: FORCE @echo "Making Clang 'lit.site.cfg' file..." - @sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \ - -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \ - -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \ - -e "s#@LLVM_LIBS_DIR@#$(LibDir)#g" \ - -e "s#@CLANG_SOURCE_DIR@#$(PROJ_SRC_DIR)/..#g" \ - -e "s#@CLANG_BINARY_DIR@#$(PROJ_OBJ_DIR)/..#g" \ - -e "s#@TARGET_TRIPLE@#$(TARGET_TRIPLE)#g" \ - $(PROJ_SRC_DIR)/lit.site.cfg.in > $@ + @$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > lit.tmp + @$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> lit.tmp + @$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp + @$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> lit.tmp + @$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> lit.tmp + @$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> lit.tmp + @$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> lit.tmp + @sed -f lit.tmp $(PROJ_SRC_DIR)/lit.site.cfg.in > $@ + @-rm -f lit.tmp Unit/lit.site.cfg: FORCE @echo "Making Clang 'Unit/lit.site.cfg' file..." @$(MKDIR) $(dir $@) - @sed -e "s#@LLVM_SOURCE_DIR@#$(LLVM_SRC_ROOT)#g" \ - -e "s#@LLVM_BINARY_DIR@#$(LLVM_OBJ_ROOT)#g" \ - -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \ - -e "s#@LLVM_LIBS_DIR@#$(LibDir)#g" \ - -e "s#@CLANG_SOURCE_DIR@#$(PROJ_SRC_DIR)/..#g" \ - -e "s#@CLANG_BINARY_DIR@#$(PROJ_OBJ_DIR)/..#g" \ - -e "s#@TARGET_TRIPLE@#$(TARGET_TRIPLE)#g" \ - -e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \ - -e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \ - -e "s#@SHLIBDIR@#$(SharedLibDir)#g" \ - -e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \ - $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@ + @$(ECHOPATH) s=@LLVM_SOURCE_DIR@=$(LLVM_SRC_ROOT)=g > unit.tmp + @$(ECHOPATH) s=@LLVM_BINARY_DIR@=$(LLVM_OBJ_ROOT)=g >> unit.tmp + @$(ECHOPATH) s=@LLVM_TOOLS_DIR@=$(ToolDir)=g >> unit.tmp + @$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> unit.tmp + @$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> unit.tmp + @$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> unit.tmp + @$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> unit.tmp + @$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> unit.tmp + @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> unit.tmp + @$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> unit.tmp + @$(ECHOPATH) s=@SHLIBPATH_VAR@=$(SHLIBPATH_VAR)=g >> unit.tmp + @sed -f unit.tmp $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@ + @-rm -f unit.tmp clean:: @ find . -name Output | xargs rm -fr |