qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH PULL 02/11] tests: remove repetition in unit tes


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH PULL 02/11] tests: remove repetition in unit test object deps
Date: Fri, 11 Sep 2015 10:24:29 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 09/11/2015 06:10 AM, Daniel P. Berrange wrote:
> Most of the unit tests have identical sets of object deps.
> For example all block unit tests need to depend on
> 
>  $(block-obj-y) libqemuutil.a libqemustub.a
> 
> Currently each unit test repeats this list of test deps.
> This list of deps will grow as future patches add more
> modules to the build, so define some common variables
> that can be used by all unit tests to remove the
> repetition.
> 
> Signed-off-by: Daniel P. Berrange <address@hidden>
> ---
>  tests/Makefile | 94 
> ++++++++++++++++++++++++++++++----------------------------
>  1 file changed, 49 insertions(+), 45 deletions(-)
> 

> +++ b/tests/Makefile
> @@ -276,47 +276,51 @@ test-obj-y = tests/check-qint.o tests/check-qstring.o 
> tests/check-qdict.o \
>       tests/test-opts-visitor.o tests/test-qmp-event.o \
>       tests/rcutorture.o tests/test-rcu-list.o

As it is, I found that we have a bug where we rely on undefined
$(qapi-py). So you may want to squash this in (otherwise, I have it as a
patch on my local tree that I still need to publish):


+++ b/tests/Makefile
@@ -1,5 +1,7 @@
 export SRC_PATH

+qapi-py = $(SRC_PATH)/scripts/qapi.py $(SRC_PATH)/scripts/ordereddict.py
+
 # Get the list of all supported sysemu targets
 SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \
    $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak)))


> +
> +# Deps that are common to various different sets of tests below
> +test-util-obj-y = libqemuutil.a libqemustub.a
> +test-qom-obj-y = qom/object.o qom/qom-qobject.o \
> +     qom/container.o qom/object_interfaces.o \
> +     $(test-util-obj-y)
> +test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o \
> +     tests/test-qapi-event.o \
> +     $(test-qom-obj-y)

as well as add $(qapi-py) to the prereqs of test-qapi-obj-y.

but overall looks sane.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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