Re: [libvirt] [PATCH] Run test suite as part of RPM build process

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Daniel P. Berrange wrote:
> To ensure that patches in the RPM don't break any functionality
> it is neccessary to run the test suites during build. It currently
> has 3 tests disabled
>
>  - daemon-conf: this is totally broken, since it relies on
>    being able to resolve the 'libvirt' group & being able to
>    resolve hostnames at daemon startup. This isn't possible
>    in a mock build root
>  - seclabeltest: fails to initialize selinux in the mock
>    build root. Possibly fixable
>  - nodeinfotest: broken on s390 + ppc - this is a real bug
>
> * libvirt.spec.in: Add a %check section, with 3 tests
>    temporarily disabled
> ---
>  libvirt.spec.in |   11 +++++++++++
>  1 files changed, 11 insertions(+), 0 deletions(-)
>
> diff --git a/libvirt.spec.in b/libvirt.spec.in
> index 748a1e7..a8b078a 100644
> --- a/libvirt.spec.in
> +++ b/libvirt.spec.in
> @@ -618,6 +618,17 @@ chmod 0644 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/libvirtd
>  %clean
>  rm -fr %{buildroot}
>
> +%check
> +cd tests
> +# These 3 tests don't current work in a mock build root
> +for i in nodeinfotest daemon-conf seclabeltest
> +do
> +  rm -f $i
> +  echo -e "#!/bin/sh\nexit 0" > $i

ACK, but it'd be better to use printf in place of "echo -e".
(don't forget to add the trailing \n)

     printf "#!/bin/sh\nexit 0\n" > $i

There's only one other use of echo -e in all of libvirt,
and I've just posted a patch to fix it.

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]