diff options
author | Roger Leigh <rleigh@debian.org> | 2013-09-08 17:32:50 +0100 |
---|---|---|
committer | Roger Leigh <rleigh@debian.org> | 2013-09-08 20:08:11 +0100 |
commit | 45883d7743a9aa4b749879597e63a72a70bd2c9d (patch) | |
tree | 67e106b6f4db781e091a97c0ce053d18887a6495 /lib | |
parent | 893efce5a1b0c9230904ff72335fafb46d4d65e7 (diff) | |
download | schroot-45883d7743a9aa4b749879597e63a72a70bd2c9d.tar.gz |
build: Drop CppUnit support
Diffstat (limited to 'lib')
-rw-r--r-- | lib/test/Makefile.am | 8 | ||||
-rw-r--r-- | lib/test/gtestmain.cc | 37 | ||||
-rw-r--r-- | lib/test/testmain.cc | 20 |
3 files changed, 7 insertions, 58 deletions
diff --git a/lib/test/Makefile.am b/lib/test/Makefile.am index ba96ff3e..4d87f1b4 100644 --- a/lib/test/Makefile.am +++ b/lib/test/Makefile.am @@ -17,14 +17,10 @@ ##################################################################### if USE_UNIT_TESTS -noinst_LTLIBRARIES += lib/test/libtest.la lib/test/libtest2.la +noinst_LTLIBRARIES += lib/test/libtest.la endif lib_test_libtest_la_SOURCES = \ lib/test/testmain.cc -lib_test_libtest_la_LIBADD = $(top_builddir)/lib/sbuild/libsbuild.la $(CPPUNIT_LIBS) - -lib_test_libtest2_la_SOURCES = \ - lib/test/gtestmain.cc -lib_test_libtest2_la_LIBADD = $(top_builddir)/lib/sbuild/libsbuild.la $(GTEST_LIBS) +lib_test_libtest_la_LIBADD = $(top_builddir)/lib/sbuild/libsbuild.la $(GTEST_LIBS) diff --git a/lib/test/gtestmain.cc b/lib/test/gtestmain.cc deleted file mode 100644 index efeb69f3..00000000 --- a/lib/test/gtestmain.cc +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright © 2006-2013 Roger Leigh <rleigh@debian.org> - * - * schroot is free software: you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * schroot is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - * <http://www.gnu.org/licenses/>. - * - *********************************************************************/ - -#include <config.h> - -#include <sbuild/log.h> - -#include <gtest/gtest.h> - -int -main(int argc, - char *argv[]) -{ -#ifdef SBUILD_DEBUG - sbuild::debug_log_level = sbuild::DEBUG_NOTICE; -#else - sbuild::debug_log_level = sbuild::DEBUG_NONE; -#endif - - testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/lib/test/testmain.cc b/lib/test/testmain.cc index 97dd7b1f..efeb69f3 100644 --- a/lib/test/testmain.cc +++ b/lib/test/testmain.cc @@ -20,15 +20,11 @@ #include <sbuild/log.h> -#include <cstdlib> - -#include <cppunit/ui/text/TestRunner.h> -#include <cppunit/extensions/TestFactoryRegistry.h> - -using namespace CppUnit; +#include <gtest/gtest.h> int -main() +main(int argc, + char *argv[]) { #ifdef SBUILD_DEBUG sbuild::debug_log_level = sbuild::DEBUG_NOTICE; @@ -36,12 +32,6 @@ main() sbuild::debug_log_level = sbuild::DEBUG_NONE; #endif - TextUi::TestRunner runner; - - TestFactoryRegistry ®istry = CppUnit::TestFactoryRegistry::getRegistry(); - runner.addTest(registry.makeTest()); - - bool ok = runner.run(); - - return (ok) ? EXIT_SUCCESS : EXIT_FAILURE; + testing::InitGoogleTest(&argc, argv); + return RUN_ALL_TESTS(); } |