execute test suite

This commit is contained in:
Miroslav Lichvar 2014-06-09 12:40:52 +02:00
parent 73d97b1e27
commit 1540bac3e4
3 changed files with 11 additions and 1 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/chrony-1.30-pre1.tar.gz /chrony-1.30-pre1.tar.gz
/clknetsim-d5a9a5.tar.gz

View File

@ -19,6 +19,8 @@ Source5: chrony.logrotate
Source7: chrony.nm-dispatcher Source7: chrony.nm-dispatcher
Source8: chrony.dhclient Source8: chrony.dhclient
Source9: chrony-wait.service Source9: chrony-wait.service
# simulator for test suite from https://github.com/mlichvar/clknetsim.git
Source10: clknetsim-d5a9a5.tar.gz
%{?gitpatch:Patch0: chrony-%{version}%{?prerelease}-%{gitpatch}.patch.gz} %{?gitpatch:Patch0: chrony-%{version}%{?prerelease}-%{gitpatch}.patch.gz}
BuildRequires: libcap-devel libedit-devel nss-devel pps-tools-devel BuildRequires: libcap-devel libedit-devel nss-devel pps-tools-devel
@ -42,7 +44,7 @@ clocks, system real-time clock or manual input as time references.
%endif %endif
%prep %prep
%setup -q -n %{name}-%{version}%{?prerelease} %setup -q -n %{name}-%{version}%{?prerelease} -a 10
%{?gitpatch:%patch0 -p1} %{?gitpatch:%patch0 -p1}
%{?gitpatch: echo %{version}-%{gitpatch} > version.txt} %{?gitpatch: echo %{version}-%{gitpatch} > version.txt}
@ -50,6 +52,8 @@ clocks, system real-time clock or manual input as time references.
sed -e 's|VENDORZONE\.|%{vendorzone}|' < %{SOURCE1} > chrony.conf sed -e 's|VENDORZONE\.|%{vendorzone}|' < %{SOURCE1} > chrony.conf
touch -r %{SOURCE1} chrony.conf touch -r %{SOURCE1} chrony.conf
mv clknetsim test/simulation
%build %build
%configure \ %configure \
%{?with_debug: --enable-debug} \ %{?with_debug: --enable-debug} \
@ -86,6 +90,10 @@ touch $RPM_BUILD_ROOT%{_localstatedir}/lib/chrony/{drift,rtc}
echo 'chronyd.service' > \ echo 'chronyd.service' > \
$RPM_BUILD_ROOT%{_prefix}/lib/systemd/ntp-units.d/50-chronyd.list $RPM_BUILD_ROOT%{_prefix}/lib/systemd/ntp-units.d/50-chronyd.list
%check
make %{?_smp_mflags} -C test/simulation/clknetsim
make check
%pre %pre
getent group chrony > /dev/null || /usr/sbin/groupadd -r chrony getent group chrony > /dev/null || /usr/sbin/groupadd -r chrony
getent passwd chrony > /dev/null || /usr/sbin/useradd -r -g chrony \ getent passwd chrony > /dev/null || /usr/sbin/useradd -r -g chrony \

View File

@ -1 +1,2 @@
3df633d4964d7e92f38fac68ef544d84 chrony-1.30-pre1.tar.gz 3df633d4964d7e92f38fac68ef544d84 chrony-1.30-pre1.tar.gz
ad8f551e14136f3854d97f994f92a64e clknetsim-d5a9a5.tar.gz