Sync from SUSE:SLFO:Main googletest revision 1e82bd9dc9e0917f5ae4d9e0f22cb1df

This commit is contained in:
Adrian Schröter 2024-05-03 13:14:36 +02:00
commit 66444d2a3f
5 changed files with 375 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
googletest-release-1.12.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

4
googletest-rpmlintrc Normal file
View File

@ -0,0 +1,4 @@
# Since the main package is a devel package:
addFilter("non-devel-file-in-devel-package")
# The package doesn't provide any libraries anymore:
addFilter("obsolete-not-provided libgoogletest0")

213
googletest.changes Normal file
View File

@ -0,0 +1,213 @@
-------------------------------------------------------------------
Thu Oct 6 13:58:58 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.12.1:
* Support for move-only values to Return
* New matchers: WhenBase64Unescaped
* ResultOf() now has a 3-arg overload that takes a description string for better
error messages
* CMake minimum increased to 3.5
-------------------------------------------------------------------
Fri Apr 8 11:34:37 UTC 2022 - Martin Liška <mliska@suse.cz>
- Disable 2 warnings that are affected by GCC 12:
gh#google/googletest#3792 and gh#google/googletest#3793.
-------------------------------------------------------------------
Wed Feb 2 15:56:01 UTC 2022 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Add missing ldconfig calls in %post/%postun
- Enable unit tests on Tumbleweed (fails on 15.x)
- Update rpmlintrc for rpmlint 2.0
-------------------------------------------------------------------
Wed Jan 5 09:15:53 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.11.0:
* --gtest_brief shows only test failures in output
* --gtest_fail_fast stops test execution on first failure
* Failures in SetUpTestSuite and TearDownTestSuite now cause tests to fail
rather than log
* Uninstantiated TEST_P and TYPED_TEST_P now fail unless allowlisted using
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST
* new matchers and mocking behavior, see
https://github.com/google/googletest/releases/tag/release-1.11.0
-------------------------------------------------------------------
Mon May 17 17:35:26 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Don't depend on python2, when we don't need it.
-------------------------------------------------------------------
Sat Feb 8 12:31:11 UTC 2020 - Luigi Baldoni <aloisio@gmx.com>
- Update to version 1.10.0
* Deprecated "....TEST_CASE" API in favor of "....TEST_SUITE".
In a nutshell if you have code that uses something like
"INSTANTIATE_TYPED_TEST_CASE_P " - this and all other
"*_TEST_CASE " are now deprecated in favor of more standard
_TEST_SUITE.
* New powerful MOCK_METHOD macro.
For example:
(Old) MOCK_METHOD1(Bar, double(std::string s));
(New) MOCK_METHOD(double, Bar, (std::string s), (override));
So there is no need to count the parameters anymore.
-------------------------------------------------------------------
Sat Nov 17 09:01:09 UTC 2018 - Jan Engelhardt <jengelh@inai.de>
- Remove errant backslahes from description.
- Rewrite summaries without em dashes.
-------------------------------------------------------------------
Fri Nov 16 11:06:17 UTC 2018 - adam.majer@suse.de
- Update to version 1.8.1:
* add pkg-config files
* add --no_stacktrace_support for json-output-unittest
* allow macros inside of parametrized test names.
* support JSON output format in addition to XML
* add options to parallelize builds
* fix double free when building Gtest/GMock in shared libraries
and linking a test executable with both.
* 2.6.4 is the minimum CMake version
- cleanup spec file
- googletest-fix-cmake-libdir-install.patch: dropped, upstreamed
-------------------------------------------------------------------
Sat Dec 30 00:13:00 CET 2017 - tiwai@suse.de
- Fix the source (and put the download URL as a comment) for
matching with the actual tarball file name.
-------------------------------------------------------------------
Sat Dec 16 18:55:22 UTC 2017 - luc14n0@linuxmail.org
- Update to version 1.8.0:
* Update the value of GTEST_DIR to reflect the googletest dir.
* Change the GTestDir marco value to reflect the new dir of
googletest.
* Read Bazel's $XML_OUTPUT_FILE environment variable
* Restructure:
- Test so each scenario is independent.
- $XML_OUTPUT_FILE logic
* Fixes:
- Error C2440 'return' in gmock_test
(gh#google/googletest#775).
- Tests that return object which implement operator bool.
- Operator precedence in GTEST_TEST_BOOLEAN_ with expressions
that implement operator bool.
- env_var_test to ignore XML_OUTPUT_FILE if already set.
- Link that's returned when running tests
(gh#google/googletest#714).
- Rework package turning it into a source package essencially, once
its original intention is to provide source files for a testing
framework, a pure development package itself. Aligning with
upstream ease our job and avoid unexpected bugs.
- Drop libgtest0 and googletest-devel subpackages bringing gtest
subpackage instead and obsoleting the previous ones, following
the above change.
- Provide googlemock together with googletest now that upstream
officially brought this project under gloogle's wings.
- Replace autoconf and automake BuildRequires by cmake and switch
configure, make and make_install macros by cmake, cmake_jobs and
cmake_install. Autotools are deprecated and cmake is recommended
by upstream.
- Drop libtool BuildRequires and autoreconf call. With the adoption
of cmake it's no longer need anymore.
- Drop googletest-enable-make-install.patch. No longer needed once
make install is not used anymore.
- Add googletest-fix-cmake-libdir-install.patch for enabling the
use of /usr/lib(64) instead of /usr/local/lib(64), once
upstream's CMakeLists doesn't provide flexibility in this regard.
- Add googletest-rpmlintrc file to filter warnings about
devel-file-in-non-devel-package, shlib-policy-missing-suffix and
obsolete-not-provided as the package is a devel one itself now.
-------------------------------------------------------------------
Thu Aug 20 07:31:46 UTC 2015 - mpluskal@suse.com
- Update project and source url (now on github)
- Change library name, provides obsoletes should not be necessary
as no released binary should link against it
-------------------------------------------------------------------
Sat Feb 28 13:29:29 UTC 2015 - mpluskal@suse.com
- Correct typo in library name
-------------------------------------------------------------------
Fri Feb 27 18:04:48 UTC 2015 - mpluskal@suse.com
- Use source url
- Package libraries as libgoogletest0
- Run tests when building
-------------------------------------------------------------------
Sun Jul 6 06:27:04 UTC 2014 - i@marguerite.su
- add patch: googletest-enable-make-install.patch
* use standard procedure to install googletest.
- add scripts/gtest-config to installation
* used by many programs to find gtest CFLAGS and etc.
- install shared libraries for sles too
-------------------------------------------------------------------
Mon Nov 11 00:46:53 UTC 2013 - i@marguerite.su
- update version 1.7.0
* New feature: death tests are supported on OpenBSD and in iOS
simulator now.
* New feature: Google Test now implements a protocol to allow
a test runner to detect that a test program has exited
prematurely and report it as a failure (before it would be
falsely reported as a success if the exit code is 0).
* New feature: Test::RecordProperty() can now be used outside of the
lifespan of a test method, in which case it will be attributed to
the current test case or the test program in the XML report.
* New feature (potentially breaking): --gtest_list_tests now prints
the type parameters and value parameters for each test.
* Improvement: char pointers and char arrays are now escaped properly
in failure messages.
* Improvement: failure summary in XML reports now includes file and
line information.
* Improvement: the <testsuites> XML element now has a timestamp attribute.
* Improvement: When --gtest_filter is specified, XML report now doesn't
contain information about tests that are filtered out.
* Fixed the bug where long --gtest_filter flag values are truncated in
death tests.
* Potentially breaking change: RUN_ALL_TESTS() is now implemented as a
function instead of a macro in order to work better with Clang.
* Compatibility fixes with C++ 11 and various platforms.
* Bug/warning fixes.
-------------------------------------------------------------------
Sun Aug 12 14:51:34 UTC 2012 - i@marguerite.su
- rename.
-------------------------------------------------------------------
Sun Aug 12 13:27:39 UTC 2012 - i@marguerite.su
- force sles build static libraries, else a lot of inner test can't build.
-------------------------------------------------------------------
Sun Aug 12 11:08:50 UTC 2012 - i@marguerite.su
- further clean spec.
- enable build shared libraries.
-------------------------------------------------------------------
Tue Aug 9 15:36:41 CEST 2011 - tiwai@suse.de
- Add missing Group to gtest-devel
- Add missing BuildRoot (for building with older distros)
- Clean up spec file
-------------------------------------------------------------------
Sat Jul 9 07:29:10 UTC 2011 - ftake@geeko.jp
- Initial import
* Upstream version: 1.6.0

132
googletest.spec Normal file
View File

@ -0,0 +1,132 @@
#
# spec file for package googletest
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%if 0%{?suse_version} >= 1550
%bcond_without tests
%else
%bcond_with tests
%endif
%define _name googlemock
Name: googletest
Version: 1.12.1
Release: 0
Summary: Google C++ Testing Framework
License: BSD-3-Clause
Group: Development/Libraries/C and C++
URL: https://github.com/google/googletest
Source0: https://github.com/google/googletest/archive/release-%{version}.tar.gz#/%{name}-release-%{version}.tar.gz
Source1: googletest-rpmlintrc
BuildRequires: cmake >= 3.5.0
BuildRequires: gcc-c++
BuildRequires: pkgconfig
BuildRequires: python3
BuildRequires: pkgconfig(pthread-stubs)
%description
Google's framework for writing C++ tests on a variety of platforms
(Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian).
Based on the xUnit architecture. Supports automatic test discovery,
a rich set of assertions, user-defined assertions, death tests,
fatal and non-fatal failures, value- and type-parameterized tests,
various options for running the tests, and XML test report generation.
%package -n gtest
Summary: Development files for the Google C++ Testing Framework
Group: Development/Libraries/C and C++
Recommends: %{_name} = %{version}
Obsoletes: %{name}-devel < %{version}
Obsoletes: lib%{name}0 < %{version}
Provides: %{name}-devel = %{version}
%description -n gtest
Google's framework for writing C++ tests on a variety of platforms
(Linux, Mac OS X, Windows, Cygwin, Windows CE, and Symbian).
Based on the xUnit architecture. Supports automatic test discovery,
a rich set of assertions, user-defined assertions, death tests,
fatal and non-fatal failures, value- and type-parameterized tests,
various options for running the tests, and XML test report generation.
This package provides shared libraries and header files for development
with googletest.
%package -n gmock
Summary: Development files for the Google C++ Mocking Framework
Group: Development/Libraries/C and C++
Recommends: %{name} = %{version}
Provides: %{_name}-devel
%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 short) is a library for
writing and using C++ mock classes.
This package provides shared libraries and header files for development
with googlemock.
%prep
%setup -q -n %{name}-release-%{version}
%build
%global optflags %(echo "%{optflags} -Wno-infinite-recursion -Wno-deprecated-declarations")
%cmake \
%{?with_tests:-Dgtest_build_tests=ON} \
%{?with_tests:-Dgmock_build_tests=ON} \
%{nil}
%cmake_build
%install
%cmake_install
# Install the source code needed by some applications
mkdir -p %{buildroot}%{_includedir}/gmock/src && install -m 0644 googlemock/src/* %{buildroot}%{_includedir}/gmock/src
mkdir -p %{buildroot}%{_includedir}/gtest/src && install -m 0644 googletest/src/* %{buildroot}%{_includedir}/gtest/src
%check
%if %{with tests}
# googletest-port-test is checking the threadcount which is incorrect under user mode emulation
%ctest -- %{?qemu_user_space_build: -E googletest-port-test}
%endif
%post -n gtest -p /sbin/ldconfig
%postun -n gtest -p /sbin/ldconfig
%post -n gmock -p /sbin/ldconfig
%postun -n gmock -p /sbin/ldconfig
%files -n gtest
%license LICENSE
%doc README.md
%{_libdir}/libgtest.so
%{_libdir}/libgtest.so.%{version}
%{_libdir}/libgtest_main.so
%{_libdir}/libgtest_main.so.%{version}
%{_includedir}/gtest
%{_libdir}/pkgconfig/gtest*.pc
%files -n gmock
%license LICENSE
%doc README.md
%{_libdir}/libgmock.so
%{_libdir}/libgmock.so.%{version}
%{_libdir}/libgmock_main.so
%{_libdir}/libgmock_main.so.%{version}
%{_includedir}/gmock
%{_libdir}/cmake/GTest
%{_libdir}/pkgconfig/gmock*.pc
%changelog