|
|
835e90 |
Name: cmocka
|
|
|
835e90 |
Version: 1.1.5
|
|
|
835e90 |
Release: 1%{?dist}
|
|
|
835e90 |
|
|
|
835e90 |
License: ASL 2.0
|
|
|
835e90 |
Summary: An elegant unit testing framework for C with support for mock objects
|
|
|
835e90 |
URL: https://cmocka.org
|
|
|
835e90 |
|
|
|
835e90 |
Source0: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz
|
|
|
835e90 |
Source1: https://cmocka.org/files/1.1/%{name}-%{version}.tar.xz.asc
|
|
|
835e90 |
Source2: cmocka.keyring
|
|
|
835e90 |
|
|
|
835e90 |
BuildRequires: gcc
|
|
|
835e90 |
BuildRequires: cmake
|
|
|
835e90 |
BuildRequires: doxygen
|
|
|
835e90 |
BuildRequires: glibc-devel
|
|
|
835e90 |
BuildRequires: gnupg2
|
|
|
835e90 |
|
|
|
835e90 |
%description
|
|
|
835e90 |
There are a variety of C unit testing frameworks available however many of them
|
|
|
835e90 |
are fairly complex and require the latest compiler technology. Some development
|
|
|
835e90 |
requires the use of old compilers which makes it difficult to use some unit
|
|
|
835e90 |
testing frameworks. In addition many unit testing frameworks assume the code
|
|
|
835e90 |
being tested is an application or module that is targeted to the same platform
|
|
|
835e90 |
that will ultimately execute the test. Because of this assumption many
|
|
|
835e90 |
frameworks require the inclusion of standard C library headers in the code
|
|
|
835e90 |
module being tested which may collide with the custom or incomplete
|
|
|
835e90 |
implementation of the C library utilized by the code under test.
|
|
|
835e90 |
|
|
|
835e90 |
Cmocka only requires a test application is linked with the standard C library
|
|
|
835e90 |
which minimizes conflicts with standard C library headers. Also, CMocka tries
|
|
|
835e90 |
to avoid the use of some of the newer features of C compilers.
|
|
|
835e90 |
|
|
|
835e90 |
This results in CMocka being a relatively small library that can be used to
|
|
|
835e90 |
test a variety of exotic code. If a developer wishes to simply test an
|
|
|
835e90 |
application with the latest compiler then other unit testing frameworks may be
|
|
|
835e90 |
preferable.
|
|
|
835e90 |
|
|
|
835e90 |
This is the successor of Google's Cmockery.
|
|
|
835e90 |
|
|
|
835e90 |
%package -n libcmocka
|
|
|
835e90 |
Summary: Lightweight library to simplify and generalize unit tests for C
|
|
|
835e90 |
|
|
|
835e90 |
Conflicts: cmockery2
|
|
|
835e90 |
|
|
|
835e90 |
%description -n libcmocka
|
|
|
835e90 |
There are a variety of C unit testing frameworks available however many of them
|
|
|
835e90 |
are fairly complex and require the latest compiler technology. Some development
|
|
|
835e90 |
requires the use of old compilers which makes it difficult to use some unit
|
|
|
835e90 |
testing frameworks. In addition many unit testing frameworks assume the code
|
|
|
835e90 |
being tested is an application or module that is targeted to the same platform
|
|
|
835e90 |
that will ultimately execute the test. Because of this assumption many
|
|
|
835e90 |
frameworks require the inclusion of standard C library headers in the code
|
|
|
835e90 |
module being tested which may collide with the custom or incomplete
|
|
|
835e90 |
implementation of the C library utilized by the code under test.
|
|
|
835e90 |
|
|
|
835e90 |
CMocka only requires a test application is linked with the standard C library
|
|
|
835e90 |
which minimizes conflicts with standard C library headers. Also, CMocka tries
|
|
|
835e90 |
to avoid the use of some of the newer features of C compilers.
|
|
|
835e90 |
|
|
|
835e90 |
This results in CMocka being a relatively small library that can be used to
|
|
|
835e90 |
test a variety of exotic code. If a developer wishes to simply test an
|
|
|
835e90 |
application with the latest compiler then other unit testing frameworks may be
|
|
|
835e90 |
preferable.
|
|
|
835e90 |
|
|
|
835e90 |
This is the successor of Google's Cmockery.
|
|
|
835e90 |
|
|
|
835e90 |
%package -n libcmocka-static
|
|
|
835e90 |
Summary: Lightweight library to simplify and generalize unit tests for C
|
|
|
835e90 |
|
|
|
835e90 |
%description -n libcmocka-static
|
|
|
835e90 |
Static version of the cmocka library.
|
|
|
835e90 |
|
|
|
835e90 |
%package -n libcmocka-devel
|
|
|
835e90 |
Summary: Development headers for the cmocka library
|
|
|
835e90 |
Requires: libcmocka = %{version}-%{release}
|
|
|
835e90 |
|
|
|
835e90 |
Conflicts: cmockery2-devel
|
|
|
835e90 |
|
|
|
835e90 |
%description -n libcmocka-devel
|
|
|
835e90 |
Development headers for the cmocka unit testing library.
|
|
|
835e90 |
|
|
|
835e90 |
%prep
|
|
|
835e90 |
%autosetup -p1
|
|
|
835e90 |
|
|
|
835e90 |
%build
|
|
|
835e90 |
if test ! -e "obj"; then
|
|
|
835e90 |
mkdir obj
|
|
|
835e90 |
fi
|
|
|
835e90 |
pushd obj
|
|
|
835e90 |
%cmake \
|
|
|
835e90 |
-DWITH_STATIC_LIB=ON \
|
|
|
835e90 |
-DWITH_CMOCKERY_SUPPORT=ON \
|
|
|
835e90 |
-DUNIT_TESTING=ON \
|
|
|
835e90 |
%{_builddir}/%{name}-%{version}
|
|
|
835e90 |
|
|
|
835e90 |
make %{?_smp_mflags} VERBOSE=1
|
|
|
835e90 |
make docs
|
|
|
835e90 |
popd
|
|
|
835e90 |
|
|
|
835e90 |
%install
|
|
|
835e90 |
pushd obj
|
|
|
835e90 |
make DESTDIR=%{buildroot} install
|
|
|
835e90 |
popd
|
|
|
835e90 |
ln -s libcmocka.so %{buildroot}%{_libdir}/libcmockery.so
|
|
|
835e90 |
|
|
|
835e90 |
%ldconfig_scriptlets -n libcmocka
|
|
|
835e90 |
|
|
|
835e90 |
%check
|
|
|
835e90 |
pushd obj
|
|
|
835e90 |
ctest --output-on-failure
|
|
|
835e90 |
popd
|
|
|
835e90 |
|
|
|
835e90 |
%files -n libcmocka
|
|
|
835e90 |
%doc AUTHORS README.md ChangeLog
|
|
|
835e90 |
%license COPYING
|
|
|
835e90 |
%{_libdir}/libcmocka.so.*
|
|
|
835e90 |
|
|
|
835e90 |
%files -n libcmocka-static
|
|
|
835e90 |
%{_libdir}/libcmocka-static.a
|
|
|
835e90 |
|
|
|
835e90 |
%files -n libcmocka-devel
|
|
|
835e90 |
%doc obj/doc/html
|
|
|
835e90 |
%{_includedir}/cmocka.h
|
|
|
835e90 |
%{_includedir}/cmocka_pbc.h
|
|
|
835e90 |
%{_includedir}/cmockery/cmockery.h
|
|
|
835e90 |
%{_includedir}/cmockery/pbc.h
|
|
|
835e90 |
%{_libdir}/libcmocka.so
|
|
|
835e90 |
%{_libdir}/libcmockery.so
|
|
|
835e90 |
%{_libdir}/pkgconfig/cmocka.pc
|
|
|
835e90 |
%{_libdir}/cmake/cmocka/cmocka-config-version.cmake
|
|
|
835e90 |
%{_libdir}/cmake/cmocka/cmocka-config.cmake
|
|
|
835e90 |
|
|
|
835e90 |
%changelog
|
|
|
835e90 |
* Thu Mar 28 2019 Andreas Schneider <asn@redhat.com> - 1.1.5-1
|
|
|
835e90 |
- Update to version 1.1.5
|
|
|
835e90 |
|
|
|
835e90 |
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-2
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Thu Sep 27 2018 Andreas Schneider <asn@redhat.com> - 1.1.3-1
|
|
|
835e90 |
- Update to version 1.1.3
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Aug 29 2018 Andreas Schneider <asn@redhat.com> - 1.1.2-1
|
|
|
835e90 |
- Update to version 1.1.2
|
|
|
835e90 |
|
|
|
835e90 |
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-9
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-8
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-7
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-6
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Tue Mar 28 2017 Than Ngo <than@redhat.com> - 1.1.0-5
|
|
|
835e90 |
- added workaround for gcc7 bug on ppc64le temporary
|
|
|
835e90 |
|
|
|
835e90 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-4
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Sep 21 2016 Jakub Hrozek <jhrozek@redhat.com> - 1.1.0-1
|
|
|
835e90 |
- Update to version 1.1.0
|
|
|
835e90 |
* Added support to catch multiple exceptions
|
|
|
835e90 |
* Added support to verify call ordering
|
|
|
835e90 |
* Added support to pass initial data to test cases
|
|
|
835e90 |
* Added will_return_maybe() for ignoring mock returns
|
|
|
835e90 |
* Added subtests for groups using TAP output
|
|
|
835e90 |
* Added support to write multiple XML files for groups
|
|
|
835e90 |
* Improved documentation
|
|
|
835e90 |
* Fixed XML output generataion
|
|
|
835e90 |
* Fixed Windows builds with VS2015
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-2
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Thu Mar 12 2015 Andreas Schneider <asn@redhat.com> - 1.0.1-1
|
|
|
835e90 |
- Update to version 1.0.1:
|
|
|
835e90 |
* Added a macro for assert_ptr_equal().
|
|
|
835e90 |
* Fixed test_realloc() if 0 size is passed.
|
|
|
835e90 |
* Fixed objects packaging bug.
|
|
|
835e90 |
* Fixed building with newer gcc versions.
|
|
|
835e90 |
|
|
|
835e90 |
* Mon Feb 16 2015 Andreas Schneider <asn@redhat.com> - 1.0.0-1
|
|
|
835e90 |
- Update to version 1.0.0:
|
|
|
835e90 |
* Added new test runner with group fixtures. The old runner is deprecated
|
|
|
835e90 |
* Added an extensible message output formatter
|
|
|
835e90 |
* Added jUnit XML message output
|
|
|
835e90 |
* Added subunit message output
|
|
|
835e90 |
* Added Test Anything Protocol message output
|
|
|
835e90 |
* Added skip() command
|
|
|
835e90 |
* Added test_realloc()
|
|
|
835e90 |
* Added a cmockery compat header
|
|
|
835e90 |
* Fixed a lot of bugs on Windows
|
|
|
835e90 |
|
|
|
835e90 |
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-3
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.1-2
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Mon May 26 2014 - Andreas Schneider <asn@redhat.com> - 0.4.1-1
|
|
|
835e90 |
- Update to version 0.4.1.
|
|
|
835e90 |
|
|
|
835e90 |
* Fri Apr 11 2014 - Andreas Schneider <asn@redhat.com> - 0.4.0-1
|
|
|
835e90 |
- Update to version 0.4.0.
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Nov 06 2013 - Andreas Schneider <asn@redhat.com> - 0.3.2-1
|
|
|
835e90 |
- Update to version 0.3.2.
|
|
|
835e90 |
- Include API documentation.
|
|
|
835e90 |
|
|
|
835e90 |
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.3.1-2
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Jul 10 2013 - Andreas Schneider <asn@redhat.com> - 0.3.0-2
|
|
|
835e90 |
- Update to version 0.3.1.
|
|
|
835e90 |
- Fixed cmocka issues on big endian.
|
|
|
835e90 |
- resolves: #975044
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Jun 05 2013 - Andreas Schneider <asn@redhat.com> - 0.3.0-1
|
|
|
835e90 |
- Update to version 0.3.0.
|
|
|
835e90 |
|
|
|
835e90 |
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.0-4
|
|
|
835e90 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
835e90 |
|
|
|
835e90 |
* Fri Jan 18 2013 - Andreas Schneider <asn@redhat.com> - 0.2.0-3
|
|
|
835e90 |
- Fixed typo in Source URL.
|
|
|
835e90 |
|
|
|
835e90 |
* Thu Jan 17 2013 - Andreas Schneider <asn@redhat.com> - 0.2.0-2
|
|
|
835e90 |
- Fixed Source URL.
|
|
|
835e90 |
- Fixed package groups.
|
|
|
835e90 |
|
|
|
835e90 |
* Tue Jan 15 2013 - Andreas Schneider <asn@redhat.com> - 0.2.0-1
|
|
|
835e90 |
- Initial version 0.2.0
|