Skip to content

Commit

Permalink
Replace gmock/gtest with googletest
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
onyb authored and jdurgin committed Jul 13, 2016
1 parent e489cd4 commit a54a195
Show file tree
Hide file tree
Showing 12 changed files with 31 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .gitmodule_mirrors
Expand Up @@ -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/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 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 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
11 changes: 7 additions & 4 deletions .gitmodules
Expand Up @@ -19,10 +19,13 @@
[submodule "ceph-erasure-code-corpus"] [submodule "ceph-erasure-code-corpus"]
path = ceph-erasure-code-corpus path = ceph-erasure-code-corpus
url = https://github.com/ceph/ceph-erasure-code-corpus.git url = https://github.com/ceph/ceph-erasure-code-corpus.git
[submodule "src/gmock"]
path = src/gmock # FIXME: The url must be updated after googletest is forked in ceph
url = https://github.com/ceph/gmock.git # The branch must be updated after a new release (like "release-1.7.5")
branch = ceph-release-1.7.0 [submodule "src/googletest"]
path = src/googletest
url = https://github.com/google/googletest
branch = master
[submodule "src/spdk"] [submodule "src/spdk"]
path = src/spdk path = src/spdk
url = https://github.com/ceph/spdk.git url = https://github.com/ceph/spdk.git
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Expand Up @@ -7,7 +7,7 @@ SYMBOL_CACHE_SIZE = 2
WARN_IF_UNDOCUMENTED = NO WARN_IF_UNDOCUMENTED = NO
INPUT = src INPUT = src
RECURSIVE = YES RECURSIVE = YES
EXCLUDE = src/gmock \ EXCLUDE = src/googletest \
src/test/virtualenv \ src/test/virtualenv \
src/out \ src/out \
src/tracing \ src/tracing \
Expand Down
16 changes: 8 additions & 8 deletions Makefile.am
@@ -1,7 +1,7 @@
AUTOMAKE_OPTIONS = gnu AUTOMAKE_OPTIONS = gnu
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = autogen.sh ceph.spec.in ceph.spec install-deps.sh 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 SUBDIRS = . src man doc systemd selinux


EXTRA_DIST += \ EXTRA_DIST += \
Expand Down Expand Up @@ -37,17 +37,17 @@ all-local::
if WITH_DEBUG if WITH_DEBUG
# We need gtest to build the rados-api tests. We only build those in # We need gtest to build the rados-api tests. We only build those in
# a debug build, though. # a debug build, though.
@cd src/gmock/gtest && $(MAKE) $(AM_MAKEFLAGS) lib/libgtest.la lib/libgtest_main.la @cd src/googletest/googletest && $(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/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
endif endif


CHECK_ULIMIT := true CHECK_ULIMIT := true


check-local:: all check-local:: all
# We build gtest this way, instead of using SUBDIRS, because with that, # 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. # 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/googletest/googletest && $(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/googlemock && $(MAKE) $(AM_MAKEFLAGS) lib/libgmock.la lib/libgmock_main.la
# exercise cli tools # exercise cli tools
u=`ulimit -u` ; \ u=`ulimit -u` ; \
p=`expr $(shell ${NPROC}) / 2` ; \ p=`expr $(shell ${NPROC}) / 2` ; \
Expand All @@ -73,9 +73,9 @@ check_SCRIPTS = \
# gtest is in DIST_SUBDIRS. Take extra care to not fail when # gtest is in DIST_SUBDIRS. Take extra care to not fail when
# effectively cleaned twice. # effectively cleaned twice.
clean-local:: clean-local::
@if test -e src/gmock/Makefile; then \ @if test -e src/googletest/googlemock/Makefile; then \
echo "Making clean in src/gmock"; \ echo "Making clean in src/googletest/googlemock"; \
cd src/gmock && $(MAKE) $(AM_MAKEFLAGS) clean; \ cd src/googletest/googlemock && $(MAKE) $(AM_MAKEFLAGS) clean; \
fi fi


@rm -rf src/test/virtualenv @rm -rf src/test/virtualenv
Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
Expand Up @@ -45,5 +45,5 @@ aclocal -I m4 --install
autoconf autoconf
autoheader autoheader
automake -a --add-missing -Wall automake -a --add-missing -Wall
( cd src/gmock && autoreconf -fvi; ) ( cd src/googletest/googlemock && autoreconf -fvi; )
exit exit
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -36,7 +36,7 @@ AM_CONDITIONAL(WITH_MAN_PAGES, test -n "$SPHINX_BUILD")


AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_MACRO_DIR([m4])


AC_CONFIG_SUBDIRS([src/gmock]) AC_CONFIG_SUBDIRS([src/googletest/googlemock])


# Environment # Environment
AC_CANONICAL_HOST AC_CANONICAL_HOST
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Expand Up @@ -1010,7 +1010,7 @@ target_link_libraries(crushtool global)
install(TARGETS crushtool DESTINATION bin) install(TARGETS crushtool DESTINATION bin)


# Support/Tools # Support/Tools
add_subdirectory(gmock) add_subdirectory(googletest/googlemock)


add_subdirectory(test) add_subdirectory(test)
set(cephfs_srcs cephfs.cc) set(cephfs_srcs cephfs.cc)
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
Expand Up @@ -16,7 +16,7 @@ am__is_gnu_make = { \
} }


SUBDIRS += ocf java SUBDIRS += ocf java
DIST_SUBDIRS += gmock ocf java DIST_SUBDIRS += googletest/googlemock ocf java


LOCAL_ALL = LOCAL_ALL =
LOCAL_CLEAN = LOCAL_CLEAN =
Expand Down
1 change: 0 additions & 1 deletion src/gmock
Submodule gmock deleted from 49beb3
1 change: 1 addition & 0 deletions src/googletest
Submodule googletest added at d225ac
2 changes: 1 addition & 1 deletion src/test/CMakeLists.txt
@@ -1,7 +1,7 @@
include(AddCephTest) include(AddCephTest)


set(UNITTEST_LIBS gmock_main gmock gtest ${PTHREAD_LIBS} ${CMAKE_DL_LIBS}) 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(bench)
add_subdirectory(cls_hello) add_subdirectory(cls_hello)
Expand Down
14 changes: 7 additions & 7 deletions src/test/Makefile.am
Expand Up @@ -128,14 +128,14 @@ unittests:: $(check_PROGRAMS)


UNITTEST_CXXFLAGS = \ UNITTEST_CXXFLAGS = \
$(AM_CXXFLAGS) \ $(AM_CXXFLAGS) \
-I$(top_srcdir)/src/gmock/include \ -I$(top_srcdir)/src/googletest/googlemock/include \
-I$(top_builddir)/src/gmock/include \ -I$(top_builddir)/src/googletest/googlemock/include \
-I$(top_srcdir)/src/gmock/gtest/include \ -I$(top_srcdir)/src/googletest/googletest/include \
-I$(top_builddir)/src/gmock/gtest/include -I$(top_builddir)/src/googletest/googletest/include
UNITTEST_LDADD = \ UNITTEST_LDADD = \
$(top_builddir)/src/gmock/lib/libgmock_main.la \ $(top_builddir)/src/googletest/googlemock/lib/libgmock_main.la \
$(top_builddir)/src/gmock/lib/libgmock.la \ $(top_builddir)/src/googletest/googlemock/lib/libgmock.la \
$(top_builddir)/src/gmock/gtest/lib/libgtest.la \ $(top_builddir)/src/googletest/googletest/lib/libgtest.la \
$(PTHREAD_LIBS) $(PTHREAD_LIBS)


if SOLARIS if SOLARIS
Expand Down

0 comments on commit a54a195

Please sign in to comment.