From 61e88aec10e345617c054125c4fdfdc7a692be47 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sun, 13 Sep 2009 01:39:08 +0000 Subject: [PATCH] Sink llvm-gcc dependent tests into distinct subdirs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81661 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/LLVMC/{ => C++}/dash-x.cpp | 2 +- test/LLVMC/C++/dg.exp | 5 +++++ test/LLVMC/{ => C++}/hello.cpp | 0 test/LLVMC/{ => C++}/together.cpp | 2 +- test/LLVMC/C/dg.exp | 5 +++++ test/LLVMC/{ => C}/emit-llvm.c | 0 test/LLVMC/{ => C}/hello.c | 0 test/LLVMC/{ => C}/include.c | 0 test/LLVMC/{ => C}/opt-test.c | 0 test/LLVMC/{ => C}/sink.c | 0 test/LLVMC/{ => C}/wall.c | 0 test/LLVMC/ObjC++/dg.exp | 5 +++++ test/LLVMC/{ => ObjC++}/hello.mm | 0 test/LLVMC/ObjC/dg.exp | 5 +++++ test/LLVMC/{ => ObjC}/hello.m | 0 test/LLVMC/dg.exp | 3 +++ test/LLVMC/llvmc.exp | 19 ------------------- 17 files changed, 25 insertions(+), 21 deletions(-) rename test/LLVMC/{ => C++}/dash-x.cpp (67%) create mode 100644 test/LLVMC/C++/dg.exp rename test/LLVMC/{ => C++}/hello.cpp (100%) rename test/LLVMC/{ => C++}/together.cpp (73%) create mode 100644 test/LLVMC/C/dg.exp rename test/LLVMC/{ => C}/emit-llvm.c (100%) rename test/LLVMC/{ => C}/hello.c (100%) rename test/LLVMC/{ => C}/include.c (100%) rename test/LLVMC/{ => C}/opt-test.c (100%) rename test/LLVMC/{ => C}/sink.c (100%) rename test/LLVMC/{ => C}/wall.c (100%) create mode 100644 test/LLVMC/ObjC++/dg.exp rename test/LLVMC/{ => ObjC++}/hello.mm (100%) create mode 100644 test/LLVMC/ObjC/dg.exp rename test/LLVMC/{ => ObjC}/hello.m (100%) create mode 100644 test/LLVMC/dg.exp delete mode 100644 test/LLVMC/llvmc.exp diff --git a/test/LLVMC/dash-x.cpp b/test/LLVMC/C++/dash-x.cpp similarity index 67% rename from test/LLVMC/dash-x.cpp rename to test/LLVMC/C++/dash-x.cpp index eb2883d699..faf8b3072a 100644 --- a/test/LLVMC/dash-x.cpp +++ b/test/LLVMC/C++/dash-x.cpp @@ -1,5 +1,5 @@ // Test that we can compile .c files as C++ and vice versa -// RUN: llvmc -x c++ %s -x c %p/test_data/false.cpp -x lisp -x whatnot -x none %p/test_data/false2.cpp -o %t +// RUN: llvmc -x c++ %s -x c %p/../test_data/false.cpp -x lisp -x whatnot -x none %p/../test_data/false2.cpp -o %t // RUN: ./%t | grep hello #include diff --git a/test/LLVMC/C++/dg.exp b/test/LLVMC/C++/dg.exp new file mode 100644 index 0000000000..fc852e30ac --- /dev/null +++ b/test/LLVMC/C++/dg.exp @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if [ llvm_gcc_supports c++ ] then { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] +} diff --git a/test/LLVMC/hello.cpp b/test/LLVMC/C++/hello.cpp similarity index 100% rename from test/LLVMC/hello.cpp rename to test/LLVMC/C++/hello.cpp diff --git a/test/LLVMC/together.cpp b/test/LLVMC/C++/together.cpp similarity index 73% rename from test/LLVMC/together.cpp rename to test/LLVMC/C++/together.cpp index b07250e9d0..f1320ca6d0 100644 --- a/test/LLVMC/together.cpp +++ b/test/LLVMC/C++/together.cpp @@ -1,5 +1,5 @@ // Check that we can compile files of different types together. -// RUN: llvmc %s %p/test_data/together.c -o %t +// RUN: llvmc %s %p/../test_data/together.c -o %t // RUN: ./%t | grep hello extern "C" void test(); diff --git a/test/LLVMC/C/dg.exp b/test/LLVMC/C/dg.exp new file mode 100644 index 0000000000..a9be28a63c --- /dev/null +++ b/test/LLVMC/C/dg.exp @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if [ llvm_gcc_supports c ] then { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{ll,c,cpp}]] +} diff --git a/test/LLVMC/emit-llvm.c b/test/LLVMC/C/emit-llvm.c similarity index 100% rename from test/LLVMC/emit-llvm.c rename to test/LLVMC/C/emit-llvm.c diff --git a/test/LLVMC/hello.c b/test/LLVMC/C/hello.c similarity index 100% rename from test/LLVMC/hello.c rename to test/LLVMC/C/hello.c diff --git a/test/LLVMC/include.c b/test/LLVMC/C/include.c similarity index 100% rename from test/LLVMC/include.c rename to test/LLVMC/C/include.c diff --git a/test/LLVMC/opt-test.c b/test/LLVMC/C/opt-test.c similarity index 100% rename from test/LLVMC/opt-test.c rename to test/LLVMC/C/opt-test.c diff --git a/test/LLVMC/sink.c b/test/LLVMC/C/sink.c similarity index 100% rename from test/LLVMC/sink.c rename to test/LLVMC/C/sink.c diff --git a/test/LLVMC/wall.c b/test/LLVMC/C/wall.c similarity index 100% rename from test/LLVMC/wall.c rename to test/LLVMC/C/wall.c diff --git a/test/LLVMC/ObjC++/dg.exp b/test/LLVMC/ObjC++/dg.exp new file mode 100644 index 0000000000..41c3db2af0 --- /dev/null +++ b/test/LLVMC/ObjC++/dg.exp @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if [ llvm_gcc_supports obj-c++ ] then { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{mm}]] +} diff --git a/test/LLVMC/hello.mm b/test/LLVMC/ObjC++/hello.mm similarity index 100% rename from test/LLVMC/hello.mm rename to test/LLVMC/ObjC++/hello.mm diff --git a/test/LLVMC/ObjC/dg.exp b/test/LLVMC/ObjC/dg.exp new file mode 100644 index 0000000000..18f73a7978 --- /dev/null +++ b/test/LLVMC/ObjC/dg.exp @@ -0,0 +1,5 @@ +load_lib llvm.exp + +if [ llvm_gcc_supports objc ] then { + RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{m}]] +} diff --git a/test/LLVMC/hello.m b/test/LLVMC/ObjC/hello.m similarity index 100% rename from test/LLVMC/hello.m rename to test/LLVMC/ObjC/hello.m diff --git a/test/LLVMC/dg.exp b/test/LLVMC/dg.exp new file mode 100644 index 0000000000..f7d275ad8c --- /dev/null +++ b/test/LLVMC/dg.exp @@ -0,0 +1,3 @@ +load_lib llvm.exp + +RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{td}]] diff --git a/test/LLVMC/llvmc.exp b/test/LLVMC/llvmc.exp deleted file mode 100644 index f33e24381d..0000000000 --- a/test/LLVMC/llvmc.exp +++ /dev/null @@ -1,19 +0,0 @@ -load_lib llvm.exp - -if [ llvm_gcc_supports c ] then { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{c}]] -} - -if [ llvm_gcc_supports c++ ] then { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{cpp}]] -} - -if [ llvm_gcc_supports objc ] then { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{m}]] -} - -if [ llvm_gcc_supports obj-c++ ] then { - RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{mm}]] -} - -RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{td}]] -- 2.11.4.GIT