Accepting request 286452 from devel:libraries:c_c++
Update to cmocka 1.0 OBS-URL: https://build.opensuse.org/request/show/286452 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/cmocka?expand=0&rev=10
This commit is contained in:
commit
df28fb8708
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:5bba53c108a693d1cad33a2edd2ee36b0cb7ea0d9b1b94b608784d41f7fec803
|
||||
size 68688
|
3
cmocka-1.0.0.tar.xz
Normal file
3
cmocka-1.0.0.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f9a1dad1c29f36edd9ab820cefa821a9ce052394f4f6af84a98c1da7ef898862
|
||||
size 184016
|
@ -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
|
||||
|
||||
|
81
cmocka.spec
81
cmocka.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# 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
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -21,7 +21,7 @@ BuildRequires: glibc-devel
|
||||
BuildRequires: pkg-config
|
||||
|
||||
Name: cmocka
|
||||
Version: 0.4.1
|
||||
Version: 1.0.0
|
||||
Release: 0
|
||||
#
|
||||
Summary: Lightweight library to simplify and generalize unit tests for C
|
||||
@ -34,57 +34,54 @@ Source1: baselibs.conf
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
There are a variety of C unit testing frameworks available however many of them
|
||||
are fairly complex and require the latest compiler technology. Some development
|
||||
requires the use of old compilers which makes it difficult to use some unit
|
||||
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 is an elegant unit testing framework for C with support for mock
|
||||
objects. It only requires the standard C library, works on a range of computing
|
||||
platforms (including embedded) and with different compilers.
|
||||
|
||||
Cmocka only requires a test application is linked with the standard C library
|
||||
which minimizes conflicts with standard C library headers. Also, CMocka tries
|
||||
to avoid the use of some of the newer features of C compilers.
|
||||
Features:
|
||||
* Support for mock objects
|
||||
* 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
|
||||
test a variety of exotic code. If a developer wishes to simply test an
|
||||
application with the latest compiler then other unit testing frameworks may be
|
||||
preferable.
|
||||
|
||||
This is the successor of Google's Cmockery.
|
||||
Also, CMocka tries to avoid the use of some of the newer features of C
|
||||
compilers.
|
||||
|
||||
%package -n libcmocka0
|
||||
Summary: Lightweight library to simplify and generalize unit tests for C
|
||||
Group: System/Libraries
|
||||
|
||||
%description -n libcmocka0
|
||||
There are a variety of C unit testing frameworks available however many of them
|
||||
are fairly complex and require the latest compiler technology. Some development
|
||||
requires the use of old compilers which makes it difficult to use some unit
|
||||
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 is an elegant unit testing framework for C with support for mock
|
||||
objects. It only requires the standard C library, works on a range of computing
|
||||
platforms (including embedded) and with different compilers.
|
||||
|
||||
CMocka only requires a test application is linked with the standard C library
|
||||
which minimizes conflicts with standard C library headers. Also, CMocka tries
|
||||
to avoid the use of some of the newer features of C compilers.
|
||||
Features:
|
||||
* Support for mock objects
|
||||
* 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
|
||||
test a variety of exotic code. If a developer wishes to simply test an
|
||||
application with the latest compiler then other unit testing frameworks may be
|
||||
preferable.
|
||||
Also, CMocka tries to avoid the use of some of the newer features of C
|
||||
compilers.
|
||||
|
||||
This is the successor of Google's Cmockery.
|
||||
|
||||
%package -n libcmocka-devel
|
||||
Summary: Development headers for the cmocka library
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: cmake
|
||||
Requires: libcmocka0 = %{version}
|
||||
Requires: pkg-config
|
||||
|
||||
%description -n libcmocka-devel
|
||||
Development headers for the cmocka unit testing library.
|
||||
@ -108,15 +105,15 @@ pushd obj
|
||||
cmake \
|
||||
-DCMAKE_C_FLAGS:STRING="%{optflags}" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DCMAKE_INSTALL_PREFIX=%{_prefix} \
|
||||
-DWITH_STATIC_LIB=ON \
|
||||
%if %{_lib} == lib64
|
||||
-DLIB_SUFFIX=64 \
|
||||
%endif
|
||||
-DUNIT_TESTING=ON \
|
||||
%{_builddir}/%{name}-%{version}
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
%__make %{?_smp_mflags} VERBOSE=1
|
||||
popd obj
|
||||
|
||||
%install
|
||||
@ -124,6 +121,11 @@ pushd obj
|
||||
%makeinstall
|
||||
popd
|
||||
|
||||
%check
|
||||
pushd obj
|
||||
%__make test || cat Testing/Temporary/LastTest.log
|
||||
popd
|
||||
|
||||
%post -n libcmocka0
|
||||
/sbin/ldconfig
|
||||
|
||||
@ -141,6 +143,7 @@ popd
|
||||
%files -n libcmocka-devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/cmocka.h
|
||||
%{_includedir}/cmocka_pbc.h
|
||||
%{_libdir}/libcmocka.so
|
||||
%{_libdir}/pkgconfig/cmocka.pc
|
||||
%dir %{_libdir}/cmake/cmocka
|
||||
|
Loading…
Reference in New Issue
Block a user