Fix package conflicts.

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=23
This commit is contained in:
Andreas Schneider 2015-02-17 09:18:18 +00:00 committed by Git OBS Bridge
parent 5957539a3a
commit 6f53b19abe
3 changed files with 69 additions and 39 deletions

3
cmocka-1.0.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f9a1dad1c29f36edd9ab820cefa821a9ce052394f4f6af84a98c1da7ef898862
size 184016

View File

@ -1,3 +1,27 @@
-------------------------------------------------------------------
Tue Feb 17 08:13:09 UTC 2015 - asn@cryptomilk.org
- Add missing requires for cmake and pkg-config
-------------------------------------------------------------------
Tue Feb 17 08:10:18 UTC 2015 - asn@cryptomilk.org
- Turn on unit tests
-------------------------------------------------------------------
Mon Feb 16 18:14:15 UTC 2015 - asn@cryptomilk.org
- Update to version 1.0.0
* Added new test runner with group fixtures. The old runner is deprecated
* Added an extensible message output formatter
* Added jUnit XML message output
* Added subunit message output
* Added Test Anything Protocol message output
* Added skip() command
* Added test_realloc()
* Added a cmockery compat header
* Fixed a lot of bugs on Windows
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Sep 11 15:03:12 UTC 2014 - asn@cryptomilk.org Thu Sep 11 15:03:12 UTC 2014 - asn@cryptomilk.org

View File

@ -1,7 +1,7 @@
# #
# spec file for package cmocka # spec file for package cmocka
# #
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -21,7 +21,7 @@ BuildRequires: glibc-devel
BuildRequires: pkg-config BuildRequires: pkg-config
Name: cmocka Name: cmocka
Version: 0.4.1 Version: 1.0.0
Release: 0 Release: 0
# #
Summary: Lightweight library to simplify and generalize unit tests for C Summary: Lightweight library to simplify and generalize unit tests for C
@ -34,57 +34,54 @@ Source1: baselibs.conf
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description %description
There are a variety of C unit testing frameworks available however many of them cmocka is an elegant unit testing framework for C with support for mock
are fairly complex and require the latest compiler technology. Some development objects. It only requires the standard C library, works on a range of computing
requires the use of old compilers which makes it difficult to use some unit platforms (including embedded) and with different compilers.
testing frameworks. In addition many unit testing frameworks assume the code
being tested is an application or module that is targeted to the same platform
that will ultimately execute the test. Because of this assumption many
frameworks require the inclusion of standard C library headers in the code
module being tested which may collide with the custom or incomplete
implementation of the C library utilized by the code under test.
Cmocka only requires a test application is linked with the standard C library Features:
which minimizes conflicts with standard C library headers. Also, CMocka tries * Support for mock objects
to avoid the use of some of the newer features of C compilers. * Only requires the C library
* Several supported output formats (Subunit, TAP, jUnit XML)
* Fully documented API
* Test fixtures
* Exception handling for signals (SIGSEGV, SIGILL, ...)
* No fork() used
* Very well tested
* Testing of memory leaks, buffer overflows and underflows.
This results in CMocka being a relatively small library that can be used to Also, CMocka tries to avoid the use of some of the newer features of C
test a variety of exotic code. If a developer wishes to simply test an compilers.
application with the latest compiler then other unit testing frameworks may be
preferable.
This is the successor of Google's Cmockery.
%package -n libcmocka0 %package -n libcmocka0
Summary: Lightweight library to simplify and generalize unit tests for C Summary: Lightweight library to simplify and generalize unit tests for C
Group: System/Libraries Group: System/Libraries
%description -n libcmocka0 %description -n libcmocka0
There are a variety of C unit testing frameworks available however many of them cmocka is an elegant unit testing framework for C with support for mock
are fairly complex and require the latest compiler technology. Some development objects. It only requires the standard C library, works on a range of computing
requires the use of old compilers which makes it difficult to use some unit platforms (including embedded) and with different compilers.
testing frameworks. In addition many unit testing frameworks assume the code
being tested is an application or module that is targeted to the same platform
that will ultimately execute the test. Because of this assumption many
frameworks require the inclusion of standard C library headers in the code
module being tested which may collide with the custom or incomplete
implementation of the C library utilized by the code under test.
CMocka only requires a test application is linked with the standard C library Features:
which minimizes conflicts with standard C library headers. Also, CMocka tries * Support for mock objects
to avoid the use of some of the newer features of C compilers. * Only requires the C library
* Several supported output formats (Subunit, TAP, jUnit XML)
* Fully documented API
* Test fixtures
* Exception handling for signals (SIGSEGV, SIGILL, ...)
* No fork() used
* Very well tested
* Testing of memory leaks, buffer overflows and underflows.
This results in CMocka being a relatively small library that can be used to Also, CMocka tries to avoid the use of some of the newer features of C
test a variety of exotic code. If a developer wishes to simply test an compilers.
application with the latest compiler then other unit testing frameworks may be
preferable.
This is the successor of Google's Cmockery.
%package -n libcmocka-devel %package -n libcmocka-devel
Summary: Development headers for the cmocka library Summary: Development headers for the cmocka library
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: cmake
Requires: libcmocka0 = %{version} Requires: libcmocka0 = %{version}
Requires: pkg-config
%description -n libcmocka-devel %description -n libcmocka-devel
Development headers for the cmocka unit testing library. Development headers for the cmocka unit testing library.
@ -108,15 +105,15 @@ pushd obj
cmake \ cmake \
-DCMAKE_C_FLAGS:STRING="%{optflags}" \ -DCMAKE_C_FLAGS:STRING="%{optflags}" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_SKIP_RPATH=ON \
-DCMAKE_INSTALL_PREFIX=%{_prefix} \ -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DWITH_STATIC_LIB=ON \ -DWITH_STATIC_LIB=ON \
%if %{_lib} == lib64 %if %{_lib} == lib64
-DLIB_SUFFIX=64 \ -DLIB_SUFFIX=64 \
%endif %endif
-DUNIT_TESTING=ON \
%{_builddir}/%{name}-%{version} %{_builddir}/%{name}-%{version}
make %{?_smp_mflags} VERBOSE=1 %__make %{?_smp_mflags} VERBOSE=1
popd obj popd obj
%install %install
@ -124,6 +121,11 @@ pushd obj
%makeinstall %makeinstall
popd popd
%check
pushd obj
%__make test || cat Testing/Temporary/LastTest.log
popd
%post -n libcmocka0 %post -n libcmocka0
/sbin/ldconfig /sbin/ldconfig
@ -141,6 +143,7 @@ popd
%files -n libcmocka-devel %files -n libcmocka-devel
%defattr(-,root,root) %defattr(-,root,root)
%{_includedir}/cmocka.h %{_includedir}/cmocka.h
%{_includedir}/cmocka_pbc.h
%{_libdir}/libcmocka.so %{_libdir}/libcmocka.so
%{_libdir}/pkgconfig/cmocka.pc %{_libdir}/pkgconfig/cmocka.pc
%dir %{_libdir}/cmake/cmocka %dir %{_libdir}/cmake/cmocka