]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Replace gmock/gtest with googletest
authorAnirudha Bose <ani07nov@gmail.com>
Sun, 15 May 2016 12:41:19 +0000 (18:11 +0530)
committerJosh Durgin <jdurgin@redhat.com>
Wed, 13 Jul 2016 00:18:09 +0000 (17:18 -0700)
Google Mock has been absorbed into the Google Test project, and
is now available under the googletest repository.

Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
12 files changed:
.gitmodule_mirrors
.gitmodules
Doxyfile
Makefile.am
autogen.sh
configure.ac
src/CMakeLists.txt
src/Makefile.am
src/gmock [deleted submodule]
src/googletest [new submodule]
src/test/CMakeLists.txt
src/test/Makefile.am

index 0e10b99a9a601c0e4830b48af22612b549a44746..2a77bbfe04401b44574880daad022378eb2a337b 100644 (file)
@@ -8,4 +8,5 @@ src/erasure-code/jerasure/jerasure git://apt-mirror.front.sepia.ceph.com/jerasur
 src/erasure-code/jerasure/gf-complete git://apt-mirror.front.sepia.ceph.com/gf-complete.git
 src/rocksdb git://apt-mirror.front.sepia.ceph.com/rocksdb.git
 ceph-erasure-code-corpus git://apt-mirror.front.sepia.ceph.com/ceph-erasure-code-corpus.git
-src/gmock git://apt-mirror.front.sepia.ceph.com/gmock.git
+# FIXME: Should be changed to src/googletest
+# src/gmock git://apt-mirror.front.sepia.ceph.com/gmock.git
index 8ed93e40d525532129eeea3366b81cfc87af0a37..9ab33e2d0b0397c91fb4b6095fcd2c8d7031dde1 100644 (file)
 [submodule "ceph-erasure-code-corpus"]
        path = ceph-erasure-code-corpus
        url = https://github.com/ceph/ceph-erasure-code-corpus.git
-[submodule "src/gmock"]
-       path = src/gmock
-       url = https://github.com/ceph/gmock.git
-        branch = ceph-release-1.7.0
+
+# FIXME: The url must be updated after googletest is forked in ceph
+#        The branch must be updated after a new release (like "release-1.7.5")
+[submodule "src/googletest"]
+       path = src/googletest
+       url = https://github.com/google/googletest
+        branch = master
 [submodule "src/spdk"]
        path = src/spdk
        url = https://github.com/ceph/spdk.git
index 85b4b2cbb87ba1827a31f1264087bb0ce09c520b..4ec246425269b27f6ad963a43fee35c2e2bead82 100644 (file)
--- a/Doxyfile
+++ b/Doxyfile
@@ -7,7 +7,7 @@ SYMBOL_CACHE_SIZE = 2
 WARN_IF_UNDOCUMENTED = NO
 INPUT = src
 RECURSIVE = YES
-EXCLUDE = src/gmock \
+EXCLUDE = src/googletest \
        src/test/virtualenv \
        src/out \
        src/tracing \
index b1d8d949a0b827cd91865224b71ee2245654f470..1b252c1737c0f2262066fb3ebfe7ef0f0a89acb9 100644 (file)
@@ -1,7 +1,7 @@
 AUTOMAKE_OPTIONS = gnu
 ACLOCAL_AMFLAGS = -I m4
 EXTRA_DIST = autogen.sh ceph.spec.in ceph.spec install-deps.sh
-# the "." here makes sure check-local builds gtest and gmock before they are used
+# the "." here makes sure check-local builds googletest and googlemock before they are used
 SUBDIRS = . src man doc systemd selinux
 
 EXTRA_DIST += \
@@ -37,8 +37,8 @@ all-local::
 if WITH_DEBUG
 #      We need gtest to build the rados-api tests. We only build those in
 #      a debug build, though.
-       @cd src/gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-       @cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+       @cd src/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+       @cd src/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
 endif
 
 CHECK_ULIMIT := true
@@ -46,8 +46,8 @@ CHECK_ULIMIT := true
 check-local:: all
 #      We build gtest this way, instead of using SUBDIRS, because with that,
 #      gtest's own tests would be run and that would slow us down.
-       @cd src/gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
-       @cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
+       @cd src/googletest/googletest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la
+       @cd src/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
 #      exercise cli tools
        u=`ulimit -u` ; \
        p=`expr $(shell ${NPROC}) / 2` ; \
@@ -73,9 +73,9 @@ check_SCRIPTS = \
 # gtest is in DIST_SUBDIRS. Take extra care to not fail when
 # effectively cleaned twice.
 clean-local::
-       @if test -e src/gmock/Makefile; then \
-         echo "Making clean in src/gmock"; \
-         cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) clean; \
+       @if test -e src/googletest/googlemock/Makefile; then \
+         echo "Making clean in src/googletest/googlemock"; \
+         cd src/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) clean; \
        fi
 
        @rm -rf src/test/virtualenv
index b6f502940b72d7b31f3f6c104896361b3a642164..0eb66ebe34af70f1867fd9ef037b9f7816f11dbc 100755 (executable)
@@ -45,5 +45,5 @@ aclocal -I m4 --install
 autoconf
 autoheader
 automake -a --add-missing -Wall
-( cd src/gmock && autoreconf -fvi; )
+( cd src/googletest/googlemock && autoreconf -fvi; )
 exit
index 1e7ef67b4c7aca388a9b2be14dd16955ff30211a..fb806d3de2829b72b0ff6e6086f4156363c12472 100644 (file)
@@ -36,7 +36,7 @@ AM_CONDITIONAL(WITH_MAN_PAGES, test -n "$SPHINX_BUILD")
 
 AC_CONFIG_MACRO_DIR([m4])
 
-AC_CONFIG_SUBDIRS([src/gmock])
+AC_CONFIG_SUBDIRS([src/googletest/googlemock])
 
 # Environment
 AC_CANONICAL_HOST
index cec6efbe91974b5adfaa663d5e3a9e5e73ab64b5..d91c7544165dd3c652756f7a6d341c4cce91dc35 100644 (file)
@@ -1010,7 +1010,7 @@ target_link_libraries(crushtool global)
 install(TARGETS crushtool DESTINATION bin)
 
 # Support/Tools
-add_subdirectory(gmock)
+add_subdirectory(googletest/googlemock)
 
 add_subdirectory(test)
 set(cephfs_srcs cephfs.cc)
index a4cf68b797d302e5d1d3e28540f8ccfd8a37d955..4e96326036fa82a5dbb016166349090e117b05f3 100644 (file)
@@ -16,7 +16,7 @@ am__is_gnu_make = { \
 }
 
 SUBDIRS += ocf java
-DIST_SUBDIRS += gmock ocf java
+DIST_SUBDIRS += googletest/googlemock ocf java
 
 LOCAL_ALL =
 LOCAL_CLEAN =
diff --git a/src/gmock b/src/gmock
deleted file mode 160000 (submodule)
index 49beb3b..0000000
--- a/src/gmock
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 49beb3bdf05a728afb48dbfbeb1a693ce4c38027
diff --git a/src/googletest b/src/googletest
new file mode 160000 (submodule)
index 0000000..d225acc
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0
index f8b50aa40c0a1bd9d792179353e64f585147aacf..6af11a61dd2ee36046361e4ab878ace4562d2167 100644 (file)
@@ -1,7 +1,7 @@
 include(AddCephTest)
 
 set(UNITTEST_LIBS gmock_main gmock gtest ${PTHREAD_LIBS} ${CMAKE_DL_LIBS})
-set(UNITTEST_CXX_FLAGS "-I${CMAKE_SOURCE_DIR}/src/gmock/include -I${CMAKE_BINARY_DIR}/src/gmock/include -I${CMAKE_SOURCE_DIR}/src/gmock/gtest/include -I${CMAKE_BINARY_DIR}/src/gmock/gtest/include -fno-strict-aliasing")
+set(UNITTEST_CXX_FLAGS "-I${CMAKE_SOURCE_DIR}/src/googletest/googlemock/include -I${CMAKE_BINARY_DIR}/src/googletest/googlemock/include -I${CMAKE_SOURCE_DIR}/src/googletest/googletest/include -I${CMAKE_BINARY_DIR}/src/googletest/googletest/include -fno-strict-aliasing")
 
 add_subdirectory(bench)
 add_subdirectory(cls_hello)
index b3fd506eb4c669df35db2cc2767684f1a957e430..918cad3487106782a6399552bec58bd75cd50dcf 100644 (file)
@@ -128,14 +128,14 @@ unittests:: $(check_PROGRAMS)
 
 UNITTEST_CXXFLAGS = \
        $(AM_CXXFLAGS) \
-       -I$(top_srcdir)/src/gmock/include \
-       -I$(top_builddir)/src/gmock/include \
-       -I$(top_srcdir)/src/gmock/gtest/include \
-       -I$(top_builddir)/src/gmock/gtest/include
+       -I$(top_srcdir)/src/googletest/googlemock/include \
+       -I$(top_builddir)/src/googletest/googlemock/include \
+       -I$(top_srcdir)/src/googletest/googletest/include \
+       -I$(top_builddir)/src/googletest/googletest/include
 UNITTEST_LDADD = \
-       $(top_builddir)/src/gmock/lib/libgmock_main.la \
-       $(top_builddir)/src/gmock/lib/libgmock.la \
-       $(top_builddir)/src/gmock/gtest/lib/libgtest.la \
+       $(top_builddir)/src/googletest/googlemock/lib/libgmock_main.la \
+       $(top_builddir)/src/googletest/googlemock/lib/libgmock.la \
+       $(top_builddir)/src/googletest/googletest/lib/libgtest.la \
        $(PTHREAD_LIBS)
 
 if SOLARIS