Move unittest driver to utils/unittest/UnitTestMain.
authorDaniel Dunbar <daniel@zuster.org>
Sun, 13 Sep 2009 21:31:21 +0000 (21:31 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sun, 13 Sep 2009 21:31:21 +0000 (21:31 +0000)
 - This eliminates a race between building the unittests and linking the
   UnitTestMain library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81719 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/Makefile
unittests/TestMain.cpp [deleted file]
utils/unittest/Makefile
utils/unittest/UnitTestMain/Makefile [new file with mode: 0644]
utils/unittest/UnitTestMain/TestMain.cpp [new file with mode: 0644]

index b743838b868c6ca8268b8c72725d0c2679311235..6f4dae1055c52c2acb28f77d2f6713bf7f34c6d1 100644 (file)
@@ -9,13 +9,6 @@
 
 LEVEL = ..
 
-include $(LEVEL)/Makefile.config
-
-LIBRARYNAME = UnitTestMain
-BUILD_ARCHIVE = 1
-CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include
-CPP.Flags += -Wno-variadic-macros
-
 PARALLEL_DIRS = ADT ExecutionEngine Support VMCore
 
 include $(LEVEL)/Makefile.common
diff --git a/unittests/TestMain.cpp b/unittests/TestMain.cpp
deleted file mode 100644 (file)
index 095076b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-//===--- unittests/TestMain.cpp - unittest driver -------------------------===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "gtest/gtest.h"
-
-int main(int argc, char **argv) {
-  testing::InitGoogleTest(&argc, argv);
-  return RUN_ALL_TESTS();
-}
index 2f3e601b41b7a532b2eee6241806a5d4a1ddaddc..6a09341832bc3d23858ea22f5f30709369c65fda 100644 (file)
@@ -8,6 +8,6 @@
 ##===----------------------------------------------------------------------===##
 
 LEVEL = ../..
-PARALLEL_DIRS = googletest
+PARALLEL_DIRS = googletest UnitTestMain
 
 include $(LEVEL)/Makefile.common
diff --git a/utils/unittest/UnitTestMain/Makefile b/utils/unittest/UnitTestMain/Makefile
new file mode 100644 (file)
index 0000000..07a74e3
--- /dev/null
@@ -0,0 +1,19 @@
+##===- utils/unittest/UnitTestMain/Makefile ----------------*- Makefile -*-===##
+#
+#                     The LLVM Compiler Infrastructure
+#
+# This file is distributed under the University of Illinois Open Source
+# License. See LICENSE.TXT for details.
+#
+##===----------------------------------------------------------------------===##
+
+LEVEL = ../../..
+
+include $(LEVEL)/Makefile.config
+
+LIBRARYNAME = UnitTestMain
+BUILD_ARCHIVE = 1
+CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include
+CPP.Flags += -Wno-variadic-macros
+
+include $(LEVEL)/Makefile.common
diff --git a/utils/unittest/UnitTestMain/TestMain.cpp b/utils/unittest/UnitTestMain/TestMain.cpp
new file mode 100644 (file)
index 0000000..d97dca8
--- /dev/null
@@ -0,0 +1,15 @@
+//===--- utils/unittest/UnitTestMain/TestMain.cpp - unittest driver -------===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "gtest/gtest.h"
+
+int main(int argc, char **argv) {
+  testing::InitGoogleTest(&argc, argv);
+  return RUN_ALL_TESTS();
+}