2019-11-29 11:53:49 +08:00
|
|
|
Name: gtest
|
2023-08-25 11:43:48 +08:00
|
|
|
Version: 1.14.0
|
2024-07-11 20:48:24 +08:00
|
|
|
Release: 2
|
2019-11-29 11:53:49 +08:00
|
|
|
Summary: Google C++ testing framework
|
2024-07-11 20:48:24 +08:00
|
|
|
License: BSD-3-Clause and Apache-2.0
|
2019-11-29 11:53:49 +08:00
|
|
|
URL: https://github.com/google/googletest
|
2023-08-25 11:43:48 +08:00
|
|
|
Source0: https://github.com/google/googletest/archive/refs/tags/v%{version}.tar.gz
|
2019-11-29 11:53:49 +08:00
|
|
|
BuildRequires: gcc-c++ cmake python3-devel
|
|
|
|
|
%description
|
|
|
|
|
This package is Google C++ testing framework,It can be compiled for
|
|
|
|
|
a variety of platforms.Google Test is a unit testing library for
|
|
|
|
|
the C++ programming language, based on the xUnit architecture,
|
|
|
|
|
allowing unit-testing of C sources as well as C++ with minimal source modification.
|
|
|
|
|
|
|
|
|
|
%package -n gtest-devel
|
|
|
|
|
Summary: Gtest development files
|
|
|
|
|
Requires: gtest = %{version}-%{release}
|
2024-07-11 20:48:24 +08:00
|
|
|
Requires: gmock = %{version}-%{release}
|
2019-11-29 11:53:49 +08:00
|
|
|
%description -n gtest-devel
|
|
|
|
|
This package is libraries and head files for google testing framework.
|
|
|
|
|
|
|
|
|
|
%package -n gmock
|
|
|
|
|
Summary: Google framework for writing and using C++ mock classes
|
|
|
|
|
Requires: gtest = %{version}-%{release}
|
|
|
|
|
%description -n gmock
|
|
|
|
|
The package is Google's framework for writing and using C++ mock classes.
|
|
|
|
|
It can help you derive better designs of your system and write better tests.
|
|
|
|
|
Gmock is a suite of testing tools developed by Google.
|
|
|
|
|
It is often used in combination with GTest.
|
|
|
|
|
|
|
|
|
|
%package -n gmock-devel
|
|
|
|
|
Summary: Gmock development files
|
|
|
|
|
Requires: gmock = %{version}-%{release}
|
|
|
|
|
%description -n gmock-devel
|
|
|
|
|
The package is libraries and head files for google mocking framework.
|
|
|
|
|
|
|
|
|
|
%prep
|
2023-08-25 11:43:48 +08:00
|
|
|
%autosetup -p1 -n googletest-%{version}
|
2019-11-29 11:53:49 +08:00
|
|
|
sed -e "s/set(GOOGLETEST_VERSION .*)/set(GOOGLETEST_VERSION %{version})/" -i CMakeLists.txt
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
mkdir build && cd build
|
2024-07-11 20:48:24 +08:00
|
|
|
%cmake -DBUILD_SHARED_LIBS=ON -DPYTHON_EXECUTABLE=%{__python3} -Dgtest_build_tests=ON -S.. -B.
|
2019-11-29 11:53:49 +08:00
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
%install
|
2024-07-11 20:48:24 +08:00
|
|
|
%make_install -C build
|
2019-11-29 11:53:49 +08:00
|
|
|
|
|
|
|
|
%check
|
2024-07-11 20:48:24 +08:00
|
|
|
%make_build test -C build
|
2019-11-29 11:53:49 +08:00
|
|
|
|
|
|
|
|
%files
|
2023-08-25 11:43:48 +08:00
|
|
|
%license LICENSE
|
2019-11-29 11:53:49 +08:00
|
|
|
%{_libdir}/libgtest*.%{version}
|
|
|
|
|
|
|
|
|
|
%files -n gtest-devel
|
2023-08-25 11:43:48 +08:00
|
|
|
%doc CONTRIBUTORS README.md
|
|
|
|
|
%doc docs/
|
2019-11-29 11:53:49 +08:00
|
|
|
%{_includedir}/gtest/
|
|
|
|
|
%{_libdir}/libgtest*.so
|
|
|
|
|
%{_libdir}/cmake/GTest/
|
|
|
|
|
%{_libdir}/pkgconfig/gtest*
|
|
|
|
|
|
|
|
|
|
%files -n gmock
|
2023-08-25 11:43:48 +08:00
|
|
|
%license LICENSE
|
2019-11-29 11:53:49 +08:00
|
|
|
%{_libdir}/libgmock*.%{version}
|
|
|
|
|
|
|
|
|
|
%files -n gmock-devel
|
2023-08-25 11:43:48 +08:00
|
|
|
%doc CONTRIBUTORS README.md
|
|
|
|
|
%doc docs/
|
2019-11-29 11:53:49 +08:00
|
|
|
%{_includedir}/gmock/
|
|
|
|
|
%{_libdir}/libgmock*.so
|
|
|
|
|
%{_libdir}/pkgconfig/gmock*
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-07-11 20:48:24 +08:00
|
|
|
* Thu Jul 11 2024 Funda Wang <fundawang@yeah.net> - 1.14.0-2
|
|
|
|
|
- cmake modules in gtest-devel needs libgmock.so.*
|
|
|
|
|
|
2023-08-25 11:43:48 +08:00
|
|
|
* Fri Aug 25 2023 wangkai <13474090681@163.com> - 1.14.0-1
|
|
|
|
|
- Update to 1.14.0
|
|
|
|
|
|
2023-01-07 12:05:09 +08:00
|
|
|
* Sat Jan 07 2023 xingxing<xingxing@xfusion.com> - 1.8.1-4
|
|
|
|
|
- Internal Change
|
|
|
|
|
|
2019-11-29 11:53:49 +08:00
|
|
|
* Wed Nov 27 2019 zhujunhao <zhujunhao5@huawei.com> - 1.8.1-3
|
|
|
|
|
- Package init
|