Accepting request 148392 from home:gladiac
A unit testing framework for C. Used by libssh, csync and owncloud. I'm the developer and maintainer please give the the needed rights for the package. OBS-URL: https://build.opensuse.org/request/show/148392 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/cmocka?expand=0&rev=1
This commit is contained in:
commit
f2d7749ae0
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
6
baselibs.conf
Normal file
6
baselibs.conf
Normal file
@ -0,0 +1,6 @@
|
||||
libcmocka0
|
||||
provides "libcmocka-<targettype> = <version>"
|
||||
obsoletes "libmockery-<targettype> <= <version>"
|
||||
libcmocka-devel
|
||||
requires -"libcmocka-<targettype>"
|
||||
requires "libcmocka0-<targettype> = <version>"
|
3
cmocka-0.2.0.tar.gz
Normal file
3
cmocka-0.2.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e47d17507ea0695466e9d759a69e745d306e86dabfdc80ebcfdd4bac72c920df
|
||||
size 75823
|
14
cmocka.changes
Normal file
14
cmocka.changes
Normal file
@ -0,0 +1,14 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 14 10:29:40 UTC 2013 - asn@cryptomilk.org
|
||||
|
||||
- Uploaded release tarball.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 10 08:56:04 UTC 2012 - asn@cryptomilk.org
|
||||
|
||||
- Fix building i686 on a x86_64 platform.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 26 13:40:20 UTC 2012 - asn@cryptomilk.org
|
||||
|
||||
- Initial version 0.2.0
|
124
cmocka.spec
Normal file
124
cmocka.spec
Normal file
@ -0,0 +1,124 @@
|
||||
#
|
||||
# spec file for package cmocka (version 0.2.0)
|
||||
#
|
||||
|
||||
BuildRequires: cmake glibc-devel
|
||||
|
||||
Name: cmocka
|
||||
Version: 0.2.0
|
||||
Release: 1
|
||||
#
|
||||
License: Apache-2.0
|
||||
Group: Productivity/Networking/Other
|
||||
Summary: Lightweight library to simplify and generalize unit tests for C
|
||||
Url: http://open.cryptomilk.org/cmocka
|
||||
#
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
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 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.
|
||||
|
||||
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.
|
||||
|
||||
%package -n libcmocka0
|
||||
License: Apache License 2.0
|
||||
Group: System/Libraries
|
||||
Summary: Lightweight library to simplify and generalize unit tests for C
|
||||
|
||||
%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 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.
|
||||
|
||||
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.
|
||||
|
||||
%package -n libcmocka-devel
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/C and C++
|
||||
Summary: Development headers for the cmocka library
|
||||
Requires: libcmocka0 = %{version}
|
||||
|
||||
%description -n libcmocka-devel
|
||||
Development headers for the cmocka unit testing library.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
if test ! -e "build"; then
|
||||
mkdir build
|
||||
fi
|
||||
pushd build
|
||||
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
|
||||
%{_builddir}/%{name}-%{version}
|
||||
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
popd build
|
||||
|
||||
%install
|
||||
pushd build
|
||||
%makeinstall
|
||||
popd
|
||||
|
||||
%post -n libcmocka0
|
||||
/sbin/ldconfig
|
||||
|
||||
%postun -n libcmocka0
|
||||
/sbin/ldconfig
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
|
||||
%files -n libcmocka0
|
||||
%defattr(-,root,root)
|
||||
%doc AUTHORS README ChangeLog COPYING
|
||||
%{_libdir}/libcmocka.so.*
|
||||
|
||||
%files -n libcmocka-devel
|
||||
%defattr(-,root,root)
|
||||
%{_includedir}/cmocka.h
|
||||
%{_libdir}/libcmocka.so
|
||||
%{_libdir}/libcmocka.a
|
||||
|
||||
%changelog
|
Loading…
Reference in New Issue
Block a user