Blame SPECS/cmocka.spec

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