From 92d39c09e3bd08603acaaaff1b8b7cc9fe6ffaa8 Mon Sep 17 00:00:00 2001 From: Drake Arconis <drake@alchemyviewer.org> Date: Wed, 22 Jul 2015 12:33:00 -0400 Subject: [PATCH] Remove gmock as its unused --- autobuild.xml | 86 ------------------------ indra/cmake/CMakeLists.txt | 1 - indra/cmake/GoogleMock.cmake | 27 -------- indra/cmake/LLAddBuildTest.cmake | 6 -- indra/llcommon/CMakeLists.txt | 2 +- indra/llcorehttp/CMakeLists.txt | 3 - indra/llmessage/CMakeLists.txt | 2 - indra/llmessage/tests/llmockhttpclient.h | 66 ------------------ indra/newview/CMakeLists.txt | 2 - indra/test/CMakeLists.txt | 4 -- indra/test/test.cpp | 10 --- 11 files changed, 1 insertion(+), 208 deletions(-) delete mode 100755 indra/cmake/GoogleMock.cmake delete mode 100755 indra/llmessage/tests/llmockhttpclient.h diff --git a/autobuild.xml b/autobuild.xml index a80dc1fc0f..02740961dc 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -1397,92 +1397,6 @@ <key>version</key> <string>1474</string> </map> - <key>googlemock</key> - <map> - <key>copyright</key> - <string>Copyright 2008, Google Inc.</string> - <key>description</key> - <string>a library for writing and using C++ mock classes</string> - <key>license</key> - <string>BSD</string> - <key>license_file</key> - <string>LICENSES/gmock.txt</string> - <key>name</key> - <string>googlemock</string> - <key>platforms</key> - <map> - <key>darwin</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>0703d56505c1d8c26a0f672b343b7998</string> - <key>hash_algorithm</key> - <string>md5</string> - <key>url</key> - <string>https://bitbucket.org/alchemyviewer/publiclibs-darwin/downloads/googlemock-1.7.0-darwin-201504240950.tar.bz2</string> - </map> - <key>name</key> - <string>darwin</string> - </map> - <key>linux</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>3de99704847b34c7acccf5ab87222f6c</string> - <key>url</key> - <string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3pl_3p-google-mock-update/rev/290574/arch/Linux/installer/gmock-1.7.0-linux-20140602.tar.bz2</string> - </map> - <key>name</key> - <string>linux</string> - </map> - <key>linux64</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>c6e45120273752f6200ea2e87db5ffea</string> - <key>hash_algorithm</key> - <string>md5</string> - <key>url</key> - <string>http://depot.alchemyviewer.org/pub/linux64/lib/googlemock-1.7.0-linux64-201504231410.tar.bz2</string> - </map> - <key>name</key> - <string>linux64</string> - </map> - <key>windows</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>e610722ac81977f3fc68ec7868a83ae5</string> - <key>hash_algorithm</key> - <string>md5</string> - <key>url</key> - <string>http://depot.alchemyviewer.org/pub/windows/lib/googlemock-1.7.0-windows-201504271833.tar.bz2</string> - </map> - <key>name</key> - <string>windows</string> - </map> - <key>windows64</key> - <map> - <key>archive</key> - <map> - <key>hash</key> - <string>5ca403747fb99ffd028727f830e5e841</string> - <key>hash_algorithm</key> - <string>md5</string> - <key>url</key> - <string>http://depot.alchemyviewer.org/pub/windows64/lib/googlemock-1.7.0-windows64-201504271807.tar.bz2</string> - </map> - <key>name</key> - <string>windows64</string> - </map> - </map> - <key>version</key> - <string>1.7.0</string> - </map> <key>gperftools</key> <map> <key>license</key> diff --git a/indra/cmake/CMakeLists.txt b/indra/cmake/CMakeLists.txt index 8ad61fe523..bf563d4086 100755 --- a/indra/cmake/CMakeLists.txt +++ b/indra/cmake/CMakeLists.txt @@ -47,7 +47,6 @@ set(cmake_SOURCE_FILES Glui.cmake Glut.cmake GoogleBreakpad.cmake - GoogleMock.cmake GooglePerfTools.cmake Havok.cmake Hunspell.cmake diff --git a/indra/cmake/GoogleMock.cmake b/indra/cmake/GoogleMock.cmake deleted file mode 100755 index a8812d1737..0000000000 --- a/indra/cmake/GoogleMock.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# -*- cmake -*- -include(Prebuilt) -include(Linking) - -#use_prebuilt_binary(googlemock) - -#set(GOOGLEMOCK_INCLUDE_DIRS -# ${LIBS_PREBUILT_DIR}/include) - -#if (LINUX) -# # VWR-24366: gmock is underlinked, it needs gtest. -# set(GOOGLEMOCK_LIBRARIES -# gmock -Wl,--no-as-needed -# gtest -Wl,--as-needed) -#elseif(WINDOWS) -# set(GOOGLEMOCK_LIBRARIES -# gmock) -# set(GOOGLEMOCK_INCLUDE_DIRS -# ${LIBS_PREBUILT_DIR}/include -# ${LIBS_PREBUILT_DIR}/include/gmock) -#elseif(DARWIN) -# set(GOOGLEMOCK_LIBRARIES -# gmock -# gtest) -#endif(LINUX) - - diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake index ad6a61a208..99bd401cd0 100644 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -1,6 +1,5 @@ # -*- cmake -*- include(LLTestCommand) -include(GoogleMock) include(Tut) MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) @@ -16,8 +15,6 @@ MACRO(LL_ADD_PROJECT_UNIT_TESTS project sources) # # WARNING: do NOT modify this code without working with poppy - # there is another branch that will conflict heavily with any changes here. -INCLUDE(GoogleMock) - IF(LL_TEST_VERBOSE) MESSAGE("LL_ADD_PROJECT_UNIT_TESTS UNITTEST_PROJECT_${project} sources: ${sources}") @@ -46,10 +43,8 @@ INCLUDE(GoogleMock) ${LLMATH_INCLUDE_DIRS} ${LLCOMMON_INCLUDE_DIRS} ${LIBS_OPEN_DIR}/test - ${GOOGLEMOCK_INCLUDE_DIRS} ) SET(alltest_LIBRARIES - ${GOOGLEMOCK_LIBRARIES} ${PTHREAD_LIBRARY} ${WINDOWS_LIBRARIES} ) @@ -191,7 +186,6 @@ FUNCTION(LL_ADD_INTEGRATION_TEST SET(libraries ${library_dependencies} - ${GOOGLEMOCK_LIBRARIES} ${PTHREAD_LIBRARY} ) diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index e5574966cf..4b1aee3773 100755 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -309,7 +309,7 @@ if (LL_TESTS) LL_ADD_PROJECT_UNIT_TESTS(llcommon "${llcommon_TEST_SOURCE_FILES}") #set(TEST_DEBUG on) - set(test_libs llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES} ${GOOGLEMOCK_LIBRARIES} ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARIES}) + set(test_libs llcommon ${LLCOMMON_LIBRARIES} ${WINDOWS_LIBRARIES} ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARIES}) LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}") LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}") LL_ADD_INTEGRATION_TEST(llbase64 "" "${test_libs}") diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index d07323f4db..76acb56b8e 100755 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -3,7 +3,6 @@ project(llcorehttp) include(00-Common) -include(GoogleMock) include(CURL) include(CARes) include(OpenSSL) @@ -127,7 +126,6 @@ if (LL_TESTS) ${WINDOWS_LIBRARIES} ${LLMESSAGE_LIBRARIES} ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} ${CURL_LIBRARIES} ${CARES_LIBRARIES} ${OPENSSL_LIBRARIES} @@ -155,7 +153,6 @@ if (LL_TESTS) ${WINDOWS_LIBRARIES} ${LLMESSAGE_LIBRARIES} ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} ${CURL_LIBRARIES} ${CARES_LIBRARIES} ${OPENSSL_LIBRARIES} diff --git a/indra/llmessage/CMakeLists.txt b/indra/llmessage/CMakeLists.txt index 66ebbb60aa..2795afc61d 100755 --- a/indra/llmessage/CMakeLists.txt +++ b/indra/llmessage/CMakeLists.txt @@ -3,7 +3,6 @@ project(llmessage) include(00-Common) -include(GoogleMock) include(LLAddBuildTest) include(LLCommon) include(LLCoreHttp) @@ -259,7 +258,6 @@ if (LL_TESTS) ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} ) LL_ADD_INTEGRATION_TEST( diff --git a/indra/llmessage/tests/llmockhttpclient.h b/indra/llmessage/tests/llmockhttpclient.h deleted file mode 100755 index af26bf8803..0000000000 --- a/indra/llmessage/tests/llmockhttpclient.h +++ /dev/null @@ -1,66 +0,0 @@ -/** - * @file - * @brief - * - * $LicenseInfo:firstyear=2008&license=viewerlgpl$ - * Second Life Viewer Source Code - * Copyright (C) 2010, Linden Research, Inc. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; - * version 2.1 of the License only. - * - * This library 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - * - * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA - * $/LicenseInfo$ - */ - -/* Macro Definitions */ -#ifndef LL_LLMOCKHTTPCLIENT_H -#define LL_LLMOCKHTTPCLIENT_H - -#include "linden_common.h" -#include "llhttpclientinterface.h" - -#include <gmock/gmock.h> - -class LLMockHTTPClient : public LLHTTPClientInterface -{ -public: - MOCK_METHOD2(get, void(const std::string& url, LLCurl::ResponderPtr responder)); - MOCK_METHOD3(get, void(const std::string& url, LLCurl::ResponderPtr responder, const LLSD& headers)); - MOCK_METHOD3(put, void(const std::string& url, const LLSD& body, LLCurl::ResponderPtr responder)); -}; - -// A helper to match responder types -template<typename T> -struct ResponderType -{ - bool operator()(LLCurl::ResponderPtr ptr) const - { - T* p = dynamic_cast<T*>(ptr.get()); - return p != NULL; - } -}; - -inline bool operator==(const LLSD& l, const LLSD& r) -{ - std::ostringstream ls, rs; - ls << l; - rs << r; - return ls.str() == rs.str(); - -} - - -#endif //LL_LLMOCKHTTPCLIENT_H - diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7e0b7b9b1b..b9c4e5255b 100755 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2455,7 +2455,6 @@ if (LL_TESTS) ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} ) LL_ADD_INTEGRATION_TEST(llcapabilitylistener @@ -2472,7 +2471,6 @@ if (LL_TESTS) ${LLVFS_LIBRARIES} ${LLMATH_LIBRARIES} ${LLCOMMON_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} ${OPENSSL_LIBRARIES} ${CRYPTO_LIBRARIES} ) diff --git a/indra/test/CMakeLists.txt b/indra/test/CMakeLists.txt index 88b244d8fd..5437eaa41b 100755 --- a/indra/test/CMakeLists.txt +++ b/indra/test/CMakeLists.txt @@ -13,8 +13,6 @@ include(Linking) include(Tut) include(LLAddBuildTest) -include(GoogleMock) - include_directories( ${LLCOMMON_INCLUDE_DIRS} ${LLDATABASE_INCLUDE_DIRS} @@ -23,7 +21,6 @@ include_directories( ${LLINVENTORY_INCLUDE_DIRS} ${LLVFS_INCLUDE_DIRS} ${LLXML_INCLUDE_DIRS} - ${GOOGLEMOCK_INCLUDE_DIRS} ${TUT_INCLUDE_DIR} ) include_directories(SYSTEM @@ -88,7 +85,6 @@ target_link_libraries(lltest ${LLXML_LIBRARIES} ${LLCOMMON_LIBRARIES} ${EXPAT_LIBRARIES} - ${GOOGLEMOCK_LIBRARIES} ${PTHREAD_LIBRARY} ${WINDOWS_LIBRARIES} ${BOOST_PROGRAM_OPTIONS_LIBRARY} diff --git a/indra/test/test.cpp b/indra/test/test.cpp index e42374d56b..89fbe75e39 100755 --- a/indra/test/test.cpp +++ b/indra/test/test.cpp @@ -53,11 +53,6 @@ # include "ctype_workaround.h" #endif -#ifndef LL_WINDOWS -#include <gmock/gmock.h> -#include <gtest/gtest.h> -#endif - #if LL_MSVC #pragma warning (push) #pragma warning (disable : 4702) // warning C4702: unreachable code @@ -516,11 +511,6 @@ static LLTrace::ThreadRecorder* sMasterThreadRecorder = NULL; int main(int argc, char **argv) { - // The following line must be executed to initialize Google Mock - // (and Google Test) before running the tests. -#ifndef LL_WINDOWS - ::testing::InitGoogleMock(&argc, argv); -#endif // LOGTEST overrides default, but can be overridden by --debug or LOGFAIL. const char* LOGTEST = getenv("LOGTEST"); if (LOGTEST) -- GitLab