packages: varnish/varnish.spec - add tests; All 145 tests passed on carme

glen glen at pld-linux.org
Thu Apr 15 12:59:04 CEST 2010


Author: glen                         Date: Thu Apr 15 10:59:04 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add tests; All 145 tests passed on carme

---- Files affected:
packages/varnish:
   varnish.spec (1.51 -> 1.52) 

---- Diffs:

================================================================
Index: packages/varnish/varnish.spec
diff -u packages/varnish/varnish.spec:1.51 packages/varnish/varnish.spec:1.52
--- packages/varnish/varnish.spec:1.51	Tue Apr  6 12:55:06 2010
+++ packages/varnish/varnish.spec	Thu Apr 15 12:58:58 2010
@@ -1,4 +1,11 @@
 # $Revision$, $Date$
+# TODO
+# - make tests use secure dir, not /tmp, see varnish-2.0.6/bin/varnishtest
+# - some -l missing: /usr/lib64/libvcl.so.1.0.0
+#
+# Conditional build:
+%bcond_with	tests		# build without tests. needs http daemon on 127.0.0.1:80
+
 Summary:	Varnish - a high-performance HTTP accelerator
 Summary(pl.UTF-8):	Varnish - wydajny akcelerator HTTP
 Name:		varnish
@@ -105,23 +112,39 @@
 
 %{__make}
 
+%if %{with tests}
+workdir=$(pwd)/workdir
+install -d $workdir
+
+# start varnishd
+LD_LIBRARY_PATH="lib/libvarnish/.libs:lib/libvarnishcompat/.libs:lib/libvarnishapi/.libs:lib/libvcl/.libs" \
+./bin/varnishd/varnishd -b 127.0.0.1:80 -C -n $workdir -P $workdir/pid
+
+%{__make} check \
+	LD_LIBRARY_PATH="../../lib/libvarnish/.libs:../../lib/libvarnishcompat/.libs:../../lib/libvarnishapi/.libs:../../lib/libvcl/.libs"
+
+# kill varnishd
+kill $(cat $workdir/pid)
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %{__make} install \
+	INSTALL="install -p" \
 	DESTDIR=$RPM_BUILD_ROOT
 
 # make dirs after make install to know which ones needs spec and which ones make install
 install -d $RPM_BUILD_ROOT{%{_sysconfdir},/etc/{logrotate.d,rc.d/init.d,sysconfig},/var/{run,lib}/varnish} \
 	$RPM_BUILD_ROOT/var/log/{archive/,}varnish
 
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnish
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishlog
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishncsa
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/varnish
-install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/varnishncsa
-install %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/varnish
-install %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default.vcl
+install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnish
+install -p %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishlog
+install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/rc.d/init.d/varnishncsa
+cp -a %{SOURCE4} $RPM_BUILD_ROOT/etc/sysconfig/varnish
+cp -a %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/varnishncsa
+cp -a %{SOURCE6} $RPM_BUILD_ROOT/etc/logrotate.d/varnish
+cp -a %{SOURCE7} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/default.vcl
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -144,7 +167,6 @@
 	%groupremove %{name}
 fi
 
-
 %preun
 if [ "$1" = "0" ]; then
 	%service -q varnish stop
@@ -173,8 +195,8 @@
 %attr(755,root,root) %{_bindir}/varnish*
 %{_mandir}/man1/*
 %{_mandir}/man7/*
-/var/lib/varnish
-/var/run/varnish
+%dir /var/lib/varnish
+%dir /var/run/varnish
 
 %dir %attr(751,root,root) /var/log/varnish
 %dir %attr(750,root,root) /var/log/archive/varnish
@@ -203,6 +225,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.52  2010/04/15 10:58:58  glen
+- add tests; All 145 tests passed on carme
+
 Revision 1.51  2010/04/06 10:55:06  glen
 - suggest vim syntax
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/varnish/varnish.spec?r1=1.51&r2=1.52&f=u



More information about the pld-cvs-commit mailing list