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 <berra...@redhat.com> > --- > 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
signature.asc
Description: OpenPGP digital signature