Compare commits
No commits in common. "c8" and "c10s" have entirely different histories.
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
13
.gitignore
vendored
13
.gitignore
vendored
@ -1 +1,12 @@
|
||||
SOURCES/release-1.8.0.tar.gz
|
||||
gtest-1.4.0.tar.bz2
|
||||
/gtest-1.5.0.tar.bz2
|
||||
/gtest-1.6.0.zip
|
||||
/gtest-1.7.0.zip
|
||||
/release-1.8.0.tar.gz
|
||||
/release-1.8.1.tar.gz
|
||||
/googletest-release-1.10.0.tar.gz
|
||||
/googletest-release-1.11.0.tar.gz
|
||||
/googletest-release-1.12.0.tar.gz
|
||||
/googletest-release-1.12.1.tar.gz
|
||||
/v1.13.0.tar.gz
|
||||
/v1.14.0.tar.gz
|
||||
|
||||
@ -1 +0,0 @@
|
||||
e7e646a6204638fe8e87e165292b8dd9cd4c36ed SOURCES/release-1.8.0.tar.gz
|
||||
@ -1,98 +0,0 @@
|
||||
From 0663ce9024c9b78ddf6eb3fc1ceb45361ed91767 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Geissler <romain.geissler@gmail.com>
|
||||
Date: Sat, 2 Dec 2017 22:47:20 +0100
|
||||
Subject: [PATCH] Fix double free when building Gtest/GMock in shared libraries
|
||||
and linking a test executable with both.
|
||||
|
||||
---
|
||||
googlemock/CMakeLists.txt | 63 ++++++++++++++++++++++++++++++-----------------
|
||||
1 file changed, 40 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
|
||||
index 724fdd5..f7bad8a 100644
|
||||
--- a/googlemock/CMakeLists.txt
|
||||
+++ b/googlemock/CMakeLists.txt
|
||||
@@ -86,16 +86,23 @@ endif()
|
||||
# Google Mock libraries. We build them using more strict warnings than what
|
||||
# are used for other targets, to ensure that Google Mock can be compiled by
|
||||
# a user aggressive about warnings.
|
||||
-cxx_library(gmock
|
||||
- "${cxx_strict}"
|
||||
- "${gtest_dir}/src/gtest-all.cc"
|
||||
- src/gmock-all.cc)
|
||||
-
|
||||
-cxx_library(gmock_main
|
||||
- "${cxx_strict}"
|
||||
- "${gtest_dir}/src/gtest-all.cc"
|
||||
- src/gmock-all.cc
|
||||
- src/gmock_main.cc)
|
||||
+if (MSVC)
|
||||
+ cxx_library(gmock
|
||||
+ "${cxx_strict}"
|
||||
+ "${gtest_dir}/src/gtest-all.cc"
|
||||
+ src/gmock-all.cc)
|
||||
+
|
||||
+ cxx_library(gmock_main
|
||||
+ "${cxx_strict}"
|
||||
+ "${gtest_dir}/src/gtest-all.cc"
|
||||
+ src/gmock-all.cc
|
||||
+ src/gmock_main.cc)
|
||||
+else()
|
||||
+ cxx_library(gmock "${cxx_strict}" src/gmock-all.cc)
|
||||
+ target_link_libraries(gmock gtest)
|
||||
+ cxx_library(gmock_main "${cxx_strict}" src/gmock_main.cc)
|
||||
+ target_link_libraries(gmock_main gmock)
|
||||
+endif()
|
||||
|
||||
# If the CMake version supports it, attach header directory information
|
||||
# to the targets for when we are part of a parent build (ie being pulled
|
||||
@@ -175,23 +182,33 @@ if (gmock_build_tests)
|
||||
############################################################
|
||||
# C++ tests built with non-standard compiler flags.
|
||||
|
||||
- cxx_library(gmock_main_no_exception "${cxx_no_exception}"
|
||||
- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
|
||||
-
|
||||
- cxx_library(gmock_main_no_rtti "${cxx_no_rtti}"
|
||||
- "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
|
||||
+ if (MSVC)
|
||||
+ cxx_library(gmock_main_no_exception "${cxx_no_exception}"
|
||||
+ "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
|
||||
|
||||
- if (NOT MSVC OR MSVC_VERSION LESS 1600) # 1600 is Visual Studio 2010.
|
||||
- # Visual Studio 2010, 2012, and 2013 define symbols in std::tr1 that
|
||||
- # conflict with our own definitions. Therefore using our own tuple does not
|
||||
- # work on those compilers.
|
||||
- cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}"
|
||||
+ cxx_library(gmock_main_no_rtti "${cxx_no_rtti}"
|
||||
"${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
|
||||
|
||||
- cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}"
|
||||
- gmock_main_use_own_tuple test/gmock-spec-builders_test.cc)
|
||||
+ if (MSVC_VERSION LESS 1600) # 1600 is Visual Studio 2010.
|
||||
+ # Visual Studio 2010, 2012, and 2013 define symbols in std::tr1 that
|
||||
+ # conflict with our own definitions. Therefore using our own tuple does not
|
||||
+ # work on those compilers.
|
||||
+ cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}"
|
||||
+ "${gtest_dir}/src/gtest-all.cc" src/gmock-all.cc src/gmock_main.cc)
|
||||
+
|
||||
+ cxx_test_with_flags(gmock_use_own_tuple_test "${cxx_use_own_tuple}"
|
||||
+ gmock_main_use_own_tuple test/gmock-spec-builders_test.cc)
|
||||
+ endif()
|
||||
+ else()
|
||||
+ cxx_library(gmock_main_no_exception "${cxx_no_exception}" src/gmock_main.cc)
|
||||
+ target_link_libraries(gmock_main_no_exception gmock)
|
||||
+
|
||||
+ cxx_library(gmock_main_no_rtti "${cxx_no_rtti}" src/gmock_main.cc)
|
||||
+ target_link_libraries(gmock_main_no_rtti gmock)
|
||||
+
|
||||
+ cxx_library(gmock_main_use_own_tuple "${cxx_use_own_tuple}" src/gmock_main.cc)
|
||||
+ target_link_libraries(gmock_main_use_own_tuple gmock)
|
||||
endif()
|
||||
-
|
||||
cxx_test_with_flags(gmock-more-actions_no_exception_test "${cxx_no_exception}"
|
||||
gmock_main_no_exception test/gmock-more-actions_test.cc)
|
||||
|
||||
--
|
||||
2.14.3
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
diff -up googletest-release-1.8.0/googlemock/CMakeLists.txt.libdir googletest-release-1.8.0/googlemock/CMakeLists.txt
|
||||
--- googletest-release-1.8.0/googlemock/CMakeLists.txt.libdir 2016-08-31 16:20:48.805836249 -0600
|
||||
+++ googletest-release-1.8.0/googlemock/CMakeLists.txt 2016-08-31 16:19:24.596216228 -0600
|
||||
@@ -104,7 +104,7 @@ endif()
|
||||
#
|
||||
# Install rules
|
||||
install(TARGETS gmock gmock_main
|
||||
- DESTINATION lib)
|
||||
+ DESTINATION lib${LIB_SUFFIX})
|
||||
install(DIRECTORY ${gmock_SOURCE_DIR}/include/gmock
|
||||
DESTINATION include)
|
||||
|
||||
diff -up googletest-release-1.8.0/googletest/CMakeLists.txt.libdir googletest-release-1.8.0/googletest/CMakeLists.txt
|
||||
--- googletest-release-1.8.0/googletest/CMakeLists.txt.libdir 2016-07-14 11:15:38.000000000 -0600
|
||||
+++ googletest-release-1.8.0/googletest/CMakeLists.txt 2016-08-31 16:20:19.357969126 -0600
|
||||
@@ -103,7 +103,7 @@ endif()
|
||||
#
|
||||
# Install rules
|
||||
install(TARGETS gtest gtest_main
|
||||
- DESTINATION lib)
|
||||
+ DESTINATION lib${LIB_SUFFIX})
|
||||
install(DIRECTORY ${gtest_SOURCE_DIR}/include/gtest
|
||||
DESTINATION include)
|
||||
|
||||
@ -1,28 +0,0 @@
|
||||
diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
|
||||
index 4304995..5ca735b 100644
|
||||
--- a/googlemock/CMakeLists.txt
|
||||
+++ b/googlemock/CMakeLists.txt
|
||||
@@ -99,6 +99,9 @@ else()
|
||||
target_link_libraries(gmock_main gmock)
|
||||
endif()
|
||||
|
||||
+set_target_properties(gmock PROPERTIES VERSION 1.8.0)
|
||||
+set_target_properties(gmock_main PROPERTIES VERSION 1.8.0)
|
||||
+
|
||||
# If the CMake version supports it, attach header directory information
|
||||
# to the targets for when we are part of a parent build (ie being pulled
|
||||
# in via add_subdirectory() rather than being a standalone build).
|
||||
diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt
|
||||
index ab82f23..97f7554 100644
|
||||
--- a/googletest/CMakeLists.txt
|
||||
+++ b/googletest/CMakeLists.txt
|
||||
@@ -88,7 +88,9 @@ endif()
|
||||
# are used for other targets, to ensure that gtest can be compiled by a user
|
||||
# aggressive about warnings.
|
||||
cxx_library(gtest "${cxx_strict}" src/gtest-all.cc)
|
||||
+set_target_properties(gtest PROPERTIES VERSION 1.8.0)
|
||||
cxx_library(gtest_main "${cxx_strict}" src/gtest_main.cc)
|
||||
+set_target_properties(gtest_main PROPERTIES VERSION 1.8.0)
|
||||
target_link_libraries(gtest_main gtest)
|
||||
|
||||
# If the CMake version supports it, attach header directory information
|
||||
@ -1,34 +0,0 @@
|
||||
From 62466cfccad1a4fe3f59a2c33104c40adc01b4fe Mon Sep 17 00:00:00 2001
|
||||
From: Jonathan Wakely <jwakely@redhat.com>
|
||||
Date: Fri, 23 Dec 2016 01:56:14 +0000
|
||||
Subject: [PATCH] Stop TestInfo::Run() calling a function through null pointer
|
||||
|
||||
If the object was never created then trying to call &Test::DeleteSelf_
|
||||
will dereference a null pointer, with undefined behaviour.
|
||||
|
||||
Fixes #845
|
||||
---
|
||||
googletest/src/gtest.cc | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc
|
||||
index d882ab2..1fb05ea 100644
|
||||
--- a/googletest/src/gtest.cc
|
||||
+++ b/googletest/src/gtest.cc
|
||||
@@ -2656,10 +2656,12 @@ void TestInfo::Run() {
|
||||
test->Run();
|
||||
}
|
||||
|
||||
- // Deletes the test object.
|
||||
- impl->os_stack_trace_getter()->UponLeavingGTest();
|
||||
- internal::HandleExceptionsInMethodIfSupported(
|
||||
- test, &Test::DeleteSelf_, "the test fixture's destructor");
|
||||
+ if (test != NULL) {
|
||||
+ // Deletes the test object.
|
||||
+ impl->os_stack_trace_getter()->UponLeavingGTest();
|
||||
+ internal::HandleExceptionsInMethodIfSupported(
|
||||
+ test, &Test::DeleteSelf_, "the test fixture's destructor");
|
||||
+ }
|
||||
|
||||
result_.set_elapsed_time(internal::GetTimeInMillis() - start);
|
||||
|
||||
7
gating.yaml
Normal file
7
gating.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.installability.functional}
|
||||
|
||||
@ -1,21 +1,13 @@
|
||||
Summary: Google C++ testing framework
|
||||
Name: gtest
|
||||
Version: 1.8.0
|
||||
Release: 5%{?dist}
|
||||
License: BSD and ASL2.0
|
||||
Version: 1.14.0
|
||||
Release: 6%{?dist}
|
||||
# scripts/generator/* are Apache-2.0
|
||||
License: BSD-3-Clause and Apache-2.0
|
||||
URL: https://github.com/google/googletest
|
||||
Source0: https://github.com/google/googletest/archive/release-%{version}.tar.gz
|
||||
# Install into lib64 if needed
|
||||
Patch0: gtest-1.8.0-libdir.patch
|
||||
# https://github.com/google/googletest/issues/845
|
||||
Patch1: gtest-1.8.0-null-pointer.patch
|
||||
# https://github.com/google/googletest/issues/930
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1513522
|
||||
Patch2: gtest-1.8.0-fix-double-free-with-shared-libs.patch
|
||||
# Fedora-specific patches
|
||||
## Set libversion for libraries to version of gtest
|
||||
## WARNING: must be rediffed for each version bump
|
||||
Patch100: gtest-1.8.0-libversion.patch
|
||||
Source0: https://github.com/google/googletest/archive/refs/tags/v%{version}.tar.gz
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake
|
||||
BuildRequires: python3-devel
|
||||
%description
|
||||
@ -29,11 +21,13 @@ generation.
|
||||
%package -n gtest-devel
|
||||
Summary: Development files for %{name}
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: gmock = %{version}-%{release}
|
||||
%description -n gtest-devel
|
||||
This package contains development files for %{name}.
|
||||
|
||||
%package -n gmock
|
||||
Summary: Google C++ Mocking Framework
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
%description -n gmock
|
||||
Inspired by jMock, EasyMock, and Hamcrest, and designed with C++s
|
||||
specifics in mind, Google C++ Mocking Framework (or Google Mock for
|
||||
@ -56,54 +50,145 @@ Requires: gmock = %{version}-%{release}
|
||||
This package contains development files for gmock.
|
||||
|
||||
%prep
|
||||
%autosetup -p1 -n googletest-release-%{version}
|
||||
%autosetup -p1 -n googletest-%{version}
|
||||
|
||||
# Set the version correctly
|
||||
sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMakeLists.txt
|
||||
|
||||
|
||||
%build
|
||||
mkdir build && cd build
|
||||
%cmake -DBUILD_SHARED_LIBS=ON \
|
||||
-DPYTHON_EXECUTABLE=%{__python3} \
|
||||
-Dgtest_build_tests=ON ..
|
||||
make %{?_smp_mflags}
|
||||
-Dgtest_build_tests=ON
|
||||
%cmake_build
|
||||
|
||||
%install
|
||||
cd build
|
||||
%make_install
|
||||
%cmake_install
|
||||
|
||||
%check
|
||||
cd build
|
||||
make test
|
||||
%ctest
|
||||
|
||||
%files
|
||||
%license googletest/LICENSE
|
||||
%license LICENSE
|
||||
%{_libdir}/libgtest.so.%{version}
|
||||
%{_libdir}/libgtest_main.so.%{version}
|
||||
|
||||
%files -n gtest-devel
|
||||
%doc googletest/{CHANGES,CONTRIBUTORS,README.md}
|
||||
%doc googletest/docs/
|
||||
%doc CONTRIBUTORS README.md
|
||||
%doc docs/
|
||||
%doc googletest/samples
|
||||
%{_includedir}/gtest/
|
||||
%{_libdir}/libgtest.so
|
||||
%{_libdir}/libgtest_main.so
|
||||
%{_libdir}/cmake/GTest/
|
||||
%{_libdir}/pkgconfig/gtest.pc
|
||||
%{_libdir}/pkgconfig/gtest_main.pc
|
||||
|
||||
%files -n gmock
|
||||
%license googlemock/LICENSE
|
||||
%license LICENSE
|
||||
%{_libdir}/libgmock.so.%{version}
|
||||
%{_libdir}/libgmock_main.so.%{version}
|
||||
|
||||
%files -n gmock-devel
|
||||
%doc googlemock/{CHANGES,CONTRIBUTORS,README.md}
|
||||
%doc googlemock/docs/
|
||||
%doc CONTRIBUTORS README.md
|
||||
%doc docs/
|
||||
%{_includedir}/gmock/
|
||||
%{_libdir}/libgmock.so
|
||||
%{_libdir}/libgmock_main.so
|
||||
%{_libdir}/pkgconfig/gmock.pc
|
||||
%{_libdir}/pkgconfig/gmock_main.pc
|
||||
|
||||
%changelog
|
||||
* Thu Jul 19 2018 Stephen Gallagher <sgallagh@redhat.com> - 1.8.0-5
|
||||
- Fix license field to accurately represent the content
|
||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.14.0-6
|
||||
- Bump release for October 2024 mass rebuild:
|
||||
Resolves: RHEL-64018
|
||||
|
||||
* Fri Jun 29 2018 Charalampos Stratakis <cstratak@redhat.com> - 1.8.0-4
|
||||
- Change to Python 3 as a build dependency
|
||||
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 1.14.0-5
|
||||
- Bump release for June 2024 mass rebuild
|
||||
|
||||
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Nov 19 2023 Benson Muite <benson_muite@emailplus.org> - 1.14.0-2
|
||||
- Use SPDX license identifiers
|
||||
|
||||
* Sun Oct 15 2023 Terje Rosten <terje.rosten@ntnu.no> - 1.14.0-1
|
||||
- 1.14.0
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.13.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Wed Jan 18 2023 Terje Rosten <terje.rosten@ntnu.no> - 1.13.0-1
|
||||
- 1.13.0
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.1-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
* Sat Jul 09 2022 Terje Rosten <terje.rosten@ntnu.no> - 1.12.1-1
|
||||
- 1.12.1
|
||||
|
||||
* Mon Jun 27 2022 Terje Rosten <terje.rosten@ntnu.no> - 1.12.0-1
|
||||
- 1.12.0
|
||||
|
||||
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
||||
|
||||
* Thu Aug 19 2021 Federico Pellegrin <fede@evolware.org> - 1.11.0-1
|
||||
- Bump to version 1.11.0, removing now upstreamed patches
|
||||
|
||||
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||
|
||||
* Mon Apr 05 2021 Terje Rosten <terje.rosten@ntnu.no> - 1.10.0-6
|
||||
- cmake modules in gtest-devel needs libgmock.so.* (rhzb#1925617)
|
||||
|
||||
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
||||
|
||||
* Sun Nov 15 2020 Jeff Law <law@redhat.com> - 1.10.0-4
|
||||
- Disable pointer-comparison warning in StackLowerThanAddress
|
||||
|
||||
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.10.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
* Sat Jul 25 2020 Terje Rosten <terje.rosten@ntnu.no> - 1.10.0-2
|
||||
- Use new set of cmake macros
|
||||
|
||||
* Sat Mar 21 2020 Neal Gompa <ngompa13@gmail.com> - 1.10.0-1
|
||||
- Rebase to 1.10.0 (rhbz#1810432)
|
||||
- Remove upstreamed patches
|
||||
- Backport fixes from upstream for pkgconfig files
|
||||
- Refresh pkgconfig dependency information patch
|
||||
|
||||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-5
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
|
||||
* Thu Sep 27 2018 Neal Gompa <ngompa13@gmail.com> - 1.8.1-2
|
||||
- Fix the build to set the version in the CMakeLists correctly
|
||||
- Update the libversion patch to use the version in CMakeLists
|
||||
- Correctly install the CMake and pkgconfig files
|
||||
- Fix the pkgconfig dependency information
|
||||
- Add missing strong dependency on gtest by gmock
|
||||
- Add patch to make tests work with Python 3
|
||||
|
||||
* Mon Sep 10 2018 Terje Rosten <terje.rosten@ntnu.no> - 1.8.1-1
|
||||
- Fix license (rhbz#1603577)
|
||||
- 1.8.1
|
||||
|
||||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.8.0-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||||
|
||||
* Wed Feb 14 2018 Neal Gompa <ngompa13@gmail.com> - 1.8.0-3
|
||||
- Add patch to fix gmock segfaults (rhbz#1513522)
|
||||
Loading…
Reference in New Issue
Block a user