summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2013-04-15 10:07:31 +0200
committerRemi Collet <fedora@famillecollet.com>2013-04-15 10:07:31 +0200
commit6550c0047402a16d4212fe92010de1a33eca529d (patch)
tree713705a359c9dde22aac569840cf4828117cb021
parenta44ea76e53c0b1fe6f4ca840e267246c9c209062 (diff)
libcouchbase: make check if --with tests
-rw-r--r--.gitignore1
-rw-r--r--libcouchbase.spec11
2 files changed, 12 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..8b8a66e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*jar
diff --git a/libcouchbase.spec b/libcouchbase.spec
index 2305a49..87ac676 100644
--- a/libcouchbase.spec
+++ b/libcouchbase.spec
@@ -14,6 +14,11 @@ License: ASL 2.0
URL: http://www.couchbase.com/develop/c/current
Source0: https://github.com/%{gh_owner}/%{name}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
+%if %{with_tests}
+Source10: http://googletest.googlecode.com/files/gtest-1.6.0.zip
+Source11: http://files.couchbase.com/maven2/org/couchbase/mock/CouchbaseMock/0.5-SNAPSHOT/CouchbaseMock-0.5-20120726.220757-19.jar
+%endif
+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf
BuildRequires: cyrus-sasl-devel
@@ -58,6 +63,11 @@ m4_define([VERSION_NUMBER], [%{version}])
m4_define([GIT_CHANGESET],[%{gh_commit}])
EOF
+%if %{with_tests}
+cp %{SOURCE10} gtest-1.6.0.zip
+cp %{SOURCE11} tests/CouchbaseMock.jar
+
+%endif
%build
autoreconf -i --force
@@ -101,6 +111,7 @@ rm -f %{buildroot}%{_libdir}/*.la
%check
%if %{with_tests}
+make check
%else
: check disabled, missing '--with tests' option
%endif