Change-Id: I7d4d5bcb4d54d43eb9462b4f67121960bfa4aa87
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/1392
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: rongrong qiu <rqiu@vmware.com>
... | ... |
@@ -45,8 +45,17 @@ find %{buildroot}/usr/lib/ -name '*.la' -delete |
45 | 45 |
%{find_lang} Linux-PAM |
46 | 46 |
|
47 | 47 |
%{_fixperms} %{buildroot}/* |
48 |
+ |
|
48 | 49 |
%check |
49 |
-make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
|
50 |
+install -v -m755 -d /etc/pam.d |
|
51 |
+cat > /etc/pam.d/other << "EOF" |
|
52 |
+auth required pam_deny.so |
|
53 |
+account required pam_deny.so |
|
54 |
+password required pam_deny.so |
|
55 |
+session required pam_deny.so |
|
56 |
+EOF |
|
57 |
+make %{?_smp_mflags} check |
|
58 |
+ |
|
50 | 59 |
%post -p /sbin/ldconfig |
51 | 60 |
%postun -p /sbin/ldconfig |
52 | 61 |
%clean |
... | ... |
@@ -52,6 +52,9 @@ mkdir -p %{buildroot}/%{_localstatedir}/log |
52 | 52 |
mkdir -p -m 0700 %{buildroot}/%{_sharedstatedir}/waagent |
53 | 53 |
touch %{buildroot}/%{_localstatedir}/log/waagent.log |
54 | 54 |
|
55 |
+%check |
|
56 |
+%{__python} setup.py check && %{__python} setup.py test |
|
57 |
+ |
|
55 | 58 |
%post |
56 | 59 |
%systemd_post waagent.service |
57 | 60 |
|
... | ... |
@@ -24,8 +24,10 @@ if [ -e %{_libdir}/perl5/5.22.1/x86_64-linux-thread-multi/perllocal.pod ]; then |
24 | 24 |
cat %{buildroot}/%{_libdir}/perl5/5.22.1/x86_64-linux-thread-multi/perllocal.pod >> %{_libdir}/perl5/5.22.1/x86_64-linux-thread-multi/perllocal.pod |
25 | 25 |
fi |
26 | 26 |
rm %{buildroot}/%{_libdir}/perl5/5.22.1/x86_64-linux-thread-multi/perllocal.pod |
27 |
+ |
|
27 | 28 |
%check |
28 |
-make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
|
29 |
+make %{?_smp_mflags} test |
|
30 |
+ |
|
29 | 31 |
%files |
30 | 32 |
%defattr(-,root,root) |
31 | 33 |
%{_libdir}/perl5/* |
... | ... |
@@ -84,6 +84,10 @@ ATFTPD_DIRECTORY=/var/lib/tftpboot |
84 | 84 |
ATFTPD_BIND_ADDRESSES= |
85 | 85 |
EOF |
86 | 86 |
|
87 |
+%check |
|
88 |
+sed -i 's/^start_server$/chown -R nobody $DIRECTORY\nstart_server/g' test/test.sh || true |
|
89 |
+make %{?_smp_mflags} check |
|
90 |
+ |
|
87 | 91 |
%pre |
88 | 92 |
if [ $1 -eq 1 ] ; then |
89 | 93 |
getent group tftp >/dev/null || groupadd -r tftp |
... | ... |
@@ -32,8 +32,10 @@ rm %{buildroot}/%{_libdir}/*.la |
32 | 32 |
rm -rv %{buildroot}/%{_mandir}/man2 |
33 | 33 |
rm -fv %{buildroot}%{_mandir}/man5/attr.5* |
34 | 34 |
rmdir "%{buildroot}%{_mandir}/man5" |
35 |
+ |
|
35 | 36 |
%check |
36 |
-make -k check |& tee %{_specdir}/%{name}-check-log || %{nocheck} |
|
37 |
+make %{?_smp_mflags} tests |
|
38 |
+ |
|
37 | 39 |
%files |
38 | 40 |
%defattr(-,root,root) |
39 | 41 |
%{_mandir}/man1/* |