diff --git a/.gitignore b/.gitignore index baf7e95..fe50133 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /chrony-1.30-pre1.tar.gz +/clknetsim-d5a9a5.tar.gz diff --git a/chrony.spec b/chrony.spec index 2bc9e36..99895b8 100644 --- a/chrony.spec +++ b/chrony.spec @@ -19,6 +19,8 @@ Source5: chrony.logrotate Source7: chrony.nm-dispatcher Source8: chrony.dhclient 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} 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 %prep -%setup -q -n %{name}-%{version}%{?prerelease} +%setup -q -n %{name}-%{version}%{?prerelease} -a 10 %{?gitpatch:%patch0 -p1} %{?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 touch -r %{SOURCE1} chrony.conf +mv clknetsim test/simulation + %build %configure \ %{?with_debug: --enable-debug} \ @@ -86,6 +90,10 @@ touch $RPM_BUILD_ROOT%{_localstatedir}/lib/chrony/{drift,rtc} echo 'chronyd.service' > \ $RPM_BUILD_ROOT%{_prefix}/lib/systemd/ntp-units.d/50-chronyd.list +%check +make %{?_smp_mflags} -C test/simulation/clknetsim +make check + %pre getent group chrony > /dev/null || /usr/sbin/groupadd -r chrony getent passwd chrony > /dev/null || /usr/sbin/useradd -r -g chrony \ diff --git a/sources b/sources index f44f5ff..274b49c 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ 3df633d4964d7e92f38fac68ef544d84 chrony-1.30-pre1.tar.gz +ad8f551e14136f3854d97f994f92a64e clknetsim-d5a9a5.tar.gz