Sink llvm-gcc dependent tests into distinct subdirs.
authorDaniel Dunbar <daniel@zuster.org>
Sun, 13 Sep 2009 01:39:08 +0000 (01:39 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 13 Sep 2009 01:39:08 +0000 (01:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81661 91177308-0d34-0410-b5e6-96231b3b80d8

28 files changed:
test/LLVMC/C++/dash-x.cpp [new file with mode: 0644]
test/LLVMC/C++/dg.exp [new file with mode: 0644]
test/LLVMC/C++/hello.cpp [new file with mode: 0644]
test/LLVMC/C++/together.cpp [new file with mode: 0644]
test/LLVMC/C/dg.exp [new file with mode: 0644]
test/LLVMC/C/emit-llvm.c [new file with mode: 0644]
test/LLVMC/C/hello.c [new file with mode: 0644]
test/LLVMC/C/include.c [new file with mode: 0644]
test/LLVMC/C/opt-test.c [new file with mode: 0644]
test/LLVMC/C/sink.c [new file with mode: 0644]
test/LLVMC/C/wall.c [new file with mode: 0644]
test/LLVMC/ObjC++/dg.exp [new file with mode: 0644]
test/LLVMC/ObjC++/hello.mm [new file with mode: 0644]
test/LLVMC/ObjC/dg.exp [new file with mode: 0644]
test/LLVMC/ObjC/hello.m [new file with mode: 0644]
test/LLVMC/dash-x.cpp [deleted file]
test/LLVMC/dg.exp [new file with mode: 0644]
test/LLVMC/emit-llvm.c [deleted file]
test/LLVMC/hello.c [deleted file]
test/LLVMC/hello.cpp [deleted file]
test/LLVMC/hello.m [deleted file]
test/LLVMC/hello.mm [deleted file]
test/LLVMC/include.c [deleted file]
test/LLVMC/llvmc.exp [deleted file]
test/LLVMC/opt-test.c [deleted file]
test/LLVMC/sink.c [deleted file]
test/LLVMC/together.cpp [deleted file]
test/LLVMC/wall.c [deleted file]

diff --git a/test/LLVMC/C++/dash-x.cpp b/test/LLVMC/C++/dash-x.cpp
new file mode 100644 (file)
index 0000000..faf8b30
--- /dev/null
@@ -0,0 +1,14 @@
+// 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: ./%t | grep hello
+
+#include <iostream>
+
+extern "C" void test();
+extern std::string test2();
+
+int main() {
+    std::cout << "h";
+    test();
+    std::cout << test2() << '\n';
+}
diff --git a/test/LLVMC/C++/dg.exp b/test/LLVMC/C++/dg.exp
new file mode 100644 (file)
index 0000000..fc852e3
--- /dev/null
@@ -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/C++/hello.cpp b/test/LLVMC/C++/hello.cpp
new file mode 100644 (file)
index 0000000..27c89d6
--- /dev/null
@@ -0,0 +1,8 @@
+// Test that we can compile C++ code.
+// RUN: llvmc %s -o %t
+// RUN: ./%t | grep hello
+#include <iostream>
+
+int main() {
+    std::cout << "hello" << '\n';
+}
diff --git a/test/LLVMC/C++/together.cpp b/test/LLVMC/C++/together.cpp
new file mode 100644 (file)
index 0000000..f1320ca
--- /dev/null
@@ -0,0 +1,9 @@
+// Check that we can compile files of different types together.
+// RUN: llvmc %s %p/../test_data/together.c -o %t
+// RUN: ./%t | grep hello
+
+extern "C" void test();
+
+int main() {
+  test();
+}
diff --git a/test/LLVMC/C/dg.exp b/test/LLVMC/C/dg.exp
new file mode 100644 (file)
index 0000000..a9be28a
--- /dev/null
@@ -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/C/emit-llvm.c b/test/LLVMC/C/emit-llvm.c
new file mode 100644 (file)
index 0000000..38bbba6
--- /dev/null
@@ -0,0 +1,4 @@
+// RUN: llvmc -c -emit-llvm -o - %s | llvm-dis | grep "@f0()" | count 1
+
+int f0(void) {
+}
diff --git a/test/LLVMC/C/hello.c b/test/LLVMC/C/hello.c
new file mode 100644 (file)
index 0000000..1cda9c3
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Check that we can compile helloworld
+ * RUN: llvmc %s -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+    printf("hello\n");
+    return 0;
+}
diff --git a/test/LLVMC/C/include.c b/test/LLVMC/C/include.c
new file mode 100644 (file)
index 0000000..07ae761
--- /dev/null
@@ -0,0 +1,9 @@
+/*
+ * Check that the 'include' options work.
+ * RUN: echo "int x;\n" > %t1.inc
+ * RUN: llvmc -include %t1.inc -fsyntax-only %s
+ */
+
+int f0(void) {
+  return x;
+}
diff --git a/test/LLVMC/C/opt-test.c b/test/LLVMC/C/opt-test.c
new file mode 100644 (file)
index 0000000..ed2df52
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Check that the -opt switch works.
+ * RUN: llvmc %s -opt -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+    printf("hello\n");
+    return 0;
+}
diff --git a/test/LLVMC/C/sink.c b/test/LLVMC/C/sink.c
new file mode 100644 (file)
index 0000000..3edbf78
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Check that the 'sink' options work.
+ * RUN: llvmc -v -Wall %s -o %t |& grep "Wall"
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+    printf("hello\n");
+    return 0;
+}
diff --git a/test/LLVMC/C/wall.c b/test/LLVMC/C/wall.c
new file mode 100644 (file)
index 0000000..2c72ea6
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Check that -Wall works as intended
+ * RUN: llvmc -Wall %s -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+    printf("hello\n");
+    return 0;
+}
diff --git a/test/LLVMC/ObjC++/dg.exp b/test/LLVMC/ObjC++/dg.exp
new file mode 100644 (file)
index 0000000..41c3db2
--- /dev/null
@@ -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/ObjC++/hello.mm b/test/LLVMC/ObjC++/hello.mm
new file mode 100644 (file)
index 0000000..ff82e4a
--- /dev/null
@@ -0,0 +1,8 @@
+// Test that we can compile Objective-C++ code.
+// RUN: llvmc %s -o %t
+// RUN: ./%t | grep hello
+#include <iostream>
+
+int main() {
+    std::cout << "hello" << '\n';
+}
diff --git a/test/LLVMC/ObjC/dg.exp b/test/LLVMC/ObjC/dg.exp
new file mode 100644 (file)
index 0000000..18f73a7
--- /dev/null
@@ -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/ObjC/hello.m b/test/LLVMC/ObjC/hello.m
new file mode 100644 (file)
index 0000000..1cda9c3
--- /dev/null
@@ -0,0 +1,12 @@
+/*
+ * Check that we can compile helloworld
+ * RUN: llvmc %s -o %t
+ * RUN: ./%t | grep hello
+ */
+
+#include <stdio.h>
+
+int main() {
+    printf("hello\n");
+    return 0;
+}
diff --git a/test/LLVMC/dash-x.cpp b/test/LLVMC/dash-x.cpp
deleted file mode 100644 (file)
index eb2883d..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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: ./%t | grep hello
-
-#include <iostream>
-
-extern "C" void test();
-extern std::string test2();
-
-int main() {
-    std::cout << "h";
-    test();
-    std::cout << test2() << '\n';
-}
diff --git a/test/LLVMC/dg.exp b/test/LLVMC/dg.exp
new file mode 100644 (file)
index 0000000..f7d275a
--- /dev/null
@@ -0,0 +1,3 @@
+load_lib llvm.exp
+
+RunLLVMTests [lsort [glob -nocomplain $srcdir/$subdir/*.{td}]]
diff --git a/test/LLVMC/emit-llvm.c b/test/LLVMC/emit-llvm.c
deleted file mode 100644 (file)
index 38bbba6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: llvmc -c -emit-llvm -o - %s | llvm-dis | grep "@f0()" | count 1
-
-int f0(void) {
-}
diff --git a/test/LLVMC/hello.c b/test/LLVMC/hello.c
deleted file mode 100644 (file)
index 1cda9c3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Check that we can compile helloworld
- * RUN: llvmc %s -o %t
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
-    printf("hello\n");
-    return 0;
-}
diff --git a/test/LLVMC/hello.cpp b/test/LLVMC/hello.cpp
deleted file mode 100644 (file)
index 27c89d6..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// Test that we can compile C++ code.
-// RUN: llvmc %s -o %t
-// RUN: ./%t | grep hello
-#include <iostream>
-
-int main() {
-    std::cout << "hello" << '\n';
-}
diff --git a/test/LLVMC/hello.m b/test/LLVMC/hello.m
deleted file mode 100644 (file)
index 1cda9c3..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Check that we can compile helloworld
- * RUN: llvmc %s -o %t
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
-    printf("hello\n");
-    return 0;
-}
diff --git a/test/LLVMC/hello.mm b/test/LLVMC/hello.mm
deleted file mode 100644 (file)
index ff82e4a..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// Test that we can compile Objective-C++ code.
-// RUN: llvmc %s -o %t
-// RUN: ./%t | grep hello
-#include <iostream>
-
-int main() {
-    std::cout << "hello" << '\n';
-}
diff --git a/test/LLVMC/include.c b/test/LLVMC/include.c
deleted file mode 100644 (file)
index 07ae761..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/*
- * Check that the 'include' options work.
- * RUN: echo "int x;\n" > %t1.inc
- * RUN: llvmc -include %t1.inc -fsyntax-only %s
- */
-
-int f0(void) {
-  return x;
-}
diff --git a/test/LLVMC/llvmc.exp b/test/LLVMC/llvmc.exp
deleted file mode 100644 (file)
index f33e243..0000000
+++ /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}]]
diff --git a/test/LLVMC/opt-test.c b/test/LLVMC/opt-test.c
deleted file mode 100644 (file)
index ed2df52..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Check that the -opt switch works.
- * RUN: llvmc %s -opt -o %t
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
-    printf("hello\n");
-    return 0;
-}
diff --git a/test/LLVMC/sink.c b/test/LLVMC/sink.c
deleted file mode 100644 (file)
index 3edbf78..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Check that the 'sink' options work.
- * RUN: llvmc -v -Wall %s -o %t |& grep "Wall"
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
-    printf("hello\n");
-    return 0;
-}
diff --git a/test/LLVMC/together.cpp b/test/LLVMC/together.cpp
deleted file mode 100644 (file)
index b07250e..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-// Check that we can compile files of different types together.
-// RUN: llvmc %s %p/test_data/together.c -o %t
-// RUN: ./%t | grep hello
-
-extern "C" void test();
-
-int main() {
-  test();
-}
diff --git a/test/LLVMC/wall.c b/test/LLVMC/wall.c
deleted file mode 100644 (file)
index 2c72ea6..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-/*
- * Check that -Wall works as intended
- * RUN: llvmc -Wall %s -o %t
- * RUN: ./%t | grep hello
- */
-
-#include <stdio.h>
-
-int main() {
-    printf("hello\n");
-    return 0;
-}