qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] docker: add installation to build tests


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v2] docker: add installation to build tests
Date: Mon, 25 Sep 2017 11:11:03 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0

On 25/09/2017 05:09, Fam Zheng wrote:
> On Fri, 09/22 17:49, Paolo Bonzini wrote:
>> diff --git a/tests/docker/common.rc b/tests/docker/common.rc
>> index 6865689..1522aab 100755
>> --- a/tests/docker/common.rc
>> +++ b/tests/docker/common.rc
>> @@ -36,3 +36,11 @@ build_qemu()
>>      $QEMU_SRC/configure $config_opts
>>      make $MAKEFLAGS
>>  }
>> +
>> +install_qemu()
>> +{
>> +    make install $MAKEFLAGS DESTDIR=$PWD/=destdir
> 
> Why provide DESTDIR? build_qemu already has "--prefix=$INSTALL_DIR", can a
> simple "make install $MAKEFLAGS" work? Is there a permission problem?

Just to test the $DESTDIR case.  I have plans to extend the test a bit
further, such as:

- checking that $INSTALL_DIR remains empty

- comparing the destdir installation against the $INSTALL_DIR (to ensure
that the destdir doesn't end up in the installed files; distro packaging
conventions usually don't like that).

- doing the DESTDIR install as a non-root user

>> +    ret=$?
>> +    rm -rf $PWD/=destdir
> 
> Why is this cleanup needed given the container will go away anyway?

Again it's just for cleanliness.  Another possible test to add is that
"make distclean" actually leaves the build tree in a pristine state, and
this would fail if we leave the installation tree around.

All these tests, by the way, are inspired by the "make distcheck"
produced by Automake.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]