From 5ea7213f5304313a5a9fa7a37d6454094b1c23a2 Mon Sep 17 00:00:00 2001 From: Jorge Camarero Vera <jorge.camarero@cern.ch> Date: Thu, 6 Oct 2022 20:46:41 +0200 Subject: [PATCH] Resolve "Check latest version of gtest suite" --- ReleaseNotes.md | 4 ++- cmake/Findgmock.cmake | 27 ------------------- .../cc7/etc/yum.repos.d/cta-ci.repo | 7 +++++ cta.spec.in | 3 ++- objectstore/AlgorithmsTest.cpp | 11 -------- tests/CMakeLists.txt | 16 +++++------ 6 files changed, 19 insertions(+), 49 deletions(-) delete mode 100644 cmake/Findgmock.cmake diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 5dbbb707f4..2fc8747a30 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -2,7 +2,9 @@ ## Summary ### Features -- cta/CTA#146 - Refactoring of operation tools cmd line parsing +- cta/CTA#146 - Refactoring of operation tools cmd line parsing +### Building and Packaging +- cta/CTA#107 - Check latest version of gtest suite # v4.7.12-1 diff --git a/cmake/Findgmock.cmake b/cmake/Findgmock.cmake deleted file mode 100644 index 5869e3d2bf..0000000000 --- a/cmake/Findgmock.cmake +++ /dev/null @@ -1,27 +0,0 @@ -# @project The CERN Tape Archive (CTA) -# @copyright Copyright © 2015-2022 CERN -# @license This program is free software, distributed under the terms of the GNU General Public -# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". You can -# redistribute it and/or modify it under the terms of the GPL Version 3, or (at your -# option) any later version. -# -# This program 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. -# -# In applying this licence, CERN does not waive the privileges and immunities -# granted to it by virtue of its status as an Intergovernmental Organization or -# submit itself to any jurisdiction. - -# This module will set the following variables: -# GMOCK_SRC - -set(GMOCK_SRC "/usr/src/gmock/gmock-all.cc") - -if(NOT EXISTS ${GMOCK_SRC}) - unset(GMOCK_SRC) -endif(NOT EXISTS ${GMOCK_SRC}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(gmock DEFAULT_MSG - GMOCK_SRC) diff --git a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo index 9de33fa871..05b95d6fee 100644 --- a/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo +++ b/continuousintegration/docker/ctafrontend/cc7/etc/yum.repos.d/cta-ci.repo @@ -39,3 +39,10 @@ baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/xrootd5/ priority=4 gpgcheck=0 enabled=0 + +[cta-ci-dependencies] +name=CTA CI repo dependencies +baseurl=https://cta-ci-repo.web.cern.ch/cta-ci-repo/cta-dependencies/ +priority=4 +gpgcheck=0 +enabled=1 \ No newline at end of file diff --git a/cta.spec.in b/cta.spec.in index c2089a9653..4f372eab5c 100644 --- a/cta.spec.in +++ b/cta.spec.in @@ -52,7 +52,7 @@ BuildRequires: xrootd-server-devel >= %{xrootdVersion} BuildRequires: xrootd-private-devel >= %{xrootdVersion} BuildRequires: librados-devel = %{radosVersion}, libradosstriper-devel = %{radosVersion}, BuildRequires: protobuf3-compiler >= 3.3.1 protobuf3-devel >= 3.3.1 -BuildRequires: gmock-devel >= 1.5.0 gtest-devel >= 1.5.0 +BuildRequires: gtest-devel >= 1.12.0 BuildRequires: sqlite-devel >= 3.6 BuildRequires: libcap-devel >= 2.16 BuildRequires: binutils-devel >= 2.20 @@ -316,6 +316,7 @@ Requires: cta-taped = %{ctaVersion}-%{ctaRelease}%{mydist} Requires: make Requires: moreutils Requires: xrootd-client-libs >= %{xrootdVersion} +Requires: gtest-devel >= 1.12.0 %description -n cta-systemtests CERN Tape Archive: Unit tests and system tests with virtual tape drives diff --git a/objectstore/AlgorithmsTest.cpp b/objectstore/AlgorithmsTest.cpp index 07edd30bc8..dcd239a22a 100644 --- a/objectstore/AlgorithmsTest.cpp +++ b/objectstore/AlgorithmsTest.cpp @@ -32,17 +32,6 @@ #include "RootEntry.hpp" #include "tests/TestsCompileTimeSwitches.hpp" -std::ostream& operator<<(std::ostream& os, const cta::objectstore::ContainerTraits<cta::objectstore::RetrieveQueue, cta::objectstore::RetrieveQueueToTransfer>::PoppedElementsSummary& s) { - os << - "{" - "files=" << s.files << "," - "bytes=" << s.bytes << "," - "diskSystemFull=" << (s.diskSystemFull ? "true" : "false") << "," - "fullDiskSystem=\"" << s.fullDiskSystem << "\"" - "}"; - return os; -} - namespace unitTests { /** diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6fa2ddfe20..a46a965ad4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,13 +14,11 @@ # submit itself to any jurisdiction. cmake_minimum_required (VERSION 3.17) -find_package(gmock REQUIRED) find_package(Protobuf3 REQUIRED) include_directories(${PROTOBUF3_INCLUDE_DIRS}) add_executable(cta-unitTests - unit_tests.cpp - ${GMOCK_SRC}) + unit_tests.cpp) set (CTA_UNIT_TEST_LIBS ctacataloguecmdlineunittests @@ -42,6 +40,7 @@ set (CTA_UNIT_TEST_LIBS ctadiskunittests ctatapelabelunittests gtest + gmock pthread ctatapeserverraounittests) @@ -61,8 +60,7 @@ endif (OCCI_SUPPORT) add_executable(cta-rdbmsUnitTests GlobalCatalogueFactoryForUnitTests.cpp RdbmsUnitTestsCmdLineArgs.cpp - rdbmsUnitTests.cpp - ${GMOCK_SRC}) + rdbmsUnitTests.cpp) target_link_libraries(cta-rdbmsUnitTests ctadropschemacmd @@ -72,6 +70,7 @@ target_link_libraries(cta-rdbmsUnitTests ctardbmsunittests ctadisk gtest + gmock pthread ${PROTOBUF3_LIBRARIES}) @@ -81,13 +80,13 @@ if (OCCI_SUPPORT) endif (OCCI_SUPPORT) add_executable(cta-unitTests-multiProcess - unit_tests.cpp - ${GMOCK_SRC}) + unit_tests.cpp) target_link_libraries(cta-unitTests-multiProcess ctadaemonunittests-multiprocess ctacommon gtest + gmock pthread ${PROTOBUF3_LIBRAIRES} sqlite3) @@ -109,8 +108,7 @@ target_link_libraries(systemTestHelperTests ctacommon) add_executable(cta-systemTests - system_tests.cpp - ${GMOCK_SRC}) + system_tests.cpp) set_property (TARGET cta-systemTests APPEND PROPERTY INSTALL_RPATH ${PROTOBUF3_RPATH}) -- GitLab