qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: kwolf@redhat.com, Peter Maydell <peter.maydell@linaro.org>,
	aliguori@us.ibm.com, stefanha@gmail.com, qemu-devel@nongnu.org,
	blauwirbel@gmail.com
Subject: Re: [Qemu-devel] [PATCH V9 2/8] Buildsystem clean tests directory clearly
Date: Fri, 16 Nov 2012 19:01:22 +0800	[thread overview]
Message-ID: <50A61D02.70007@linux.vnet.ibm.com> (raw)
In-Reply-To: <50A61BC0.5070903@redhat.com>

于 2012-11-16 18:56, Paolo Bonzini 写道:
> Il 16/11/2012 11:31, Wenchao Xia ha scritto:
>> 于 2012-11-16 18:23, Peter Maydell 写道:
>>> On 16 November 2012 10:12, Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>>> wrote:
>>>>     Currently make clean only clean tests/tcg and hard to extend.
>>>> This patch added command make check-clean, which clean all
>>>> generated files used in tests. With this command root Makefile
>>>> do not care tests clean method any more, it simply calls the
>>>> command to do it, so any more clean script could be added in
>>>> tests/Makefile make it easier to extend.
>>>>
>>>> Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
>>>> ---
>>>>    Makefile       |    2 +-
>>>>    configure      |    2 +-
>>>>    tests/Makefile |    7 +++++++
>>>>    3 files changed, 9 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/Makefile b/Makefile
>>>> index f40885b..8201e80 100644
>>>> --- a/Makefile
>>>> +++ b/Makefile
>>>> @@ -251,7 +251,7 @@ clean:
>>>>           rm -f $(foreach f,$(GENERATED_SOURCES),$(f) $(f)-timestamp)
>>>>           rm -rf qapi-generated
>>>>           rm -rf qga/qapi-generated
>>>> -       $(MAKE) -C tests/tcg clean
>>>> +       MAKEFILES=./tests/Makefile $(MAKE) check-clean
>>>
>>> tests/Makefile is directly included by the top level makefile,
>>> so there's no need to reinvoke make here. You should be able to
>>> just make check-clean a dependency of the clean target here.
>>>
>>    if make destclean is executed, that tests/Makefile is not include
>> any more for a condition in root Makefile, change that condition may
>> bring extra trouble, MAKEFILES= is added to work around it.
>
> Does it work if you change
>
> ifneq ($(wildcard config-host.mak),)
> include $(SRC_PATH)/tests/Makefile
> endif
>
> to
>
> -include $(SRC_PATH)/tests/Makefile
>
> ?
>
> Paolo
>
   yes, but original author seems not include tests/Makefile in
this condition on purpose, so using MAKEFILES to keep it unchanged.

>>
>>>>           for d in $(ALL_SUBDIRS) $(QEMULIBS) libcacard; do \
>>>>           if test -d $$d; then $(MAKE) -C $$d $@ || exit 1; fi; \
>>>>           rm -f $$d/qemu-options.def; \
>>>> diff --git a/configure b/configure
>>>> index f847ee2..a18e267 100755
>>>> --- a/configure
>>>> +++ b/configure
>>>> @@ -4163,7 +4163,7 @@ DIRS="$DIRS pc-bios/optionrom pc-bios/spapr-rtas"
>>>>    DIRS="$DIRS roms/seabios roms/vgabios"
>>>>    DIRS="$DIRS qapi-generated"
>>>>    DIRS="$DIRS libcacard libcacard/libcacard libcacard/trace"
>>>> -FILES="Makefile tests/tcg/Makefile qdict-test-data.txt"
>>>> +FILES="Makefile tests/Makefile tests/tcg/Makefile qdict-test-data.txt"
>>>>    FILES="$FILES tests/tcg/cris/Makefile tests/tcg/cris/.gdbinit"
>>>>    FILES="$FILES tests/tcg/lm32/Makefile libcacard/Makefile"
>>>>    FILES="$FILES pc-bios/optionrom/Makefile pc-bios/keymaps"
>>>> diff --git a/tests/Makefile b/tests/Makefile
>>>> index 9bf0765..a286622 100644
>>>> --- a/tests/Makefile
>>>> +++ b/tests/Makefile
>>>> @@ -94,6 +94,7 @@ check-help:
>>>>           @echo " make check-unit           Run qobject tests"
>>>>           @echo " make check-block          Run block tests"
>>>>           @echo " make check-report.html    Generates an HTML test
>>>> report"
>>>> +       @echo " make check-clean          Clean the tests"
>>>>           @echo
>>>>           @echo "Please note that HTML reports do not regenerate if
>>>> the unit tests"
>>>>           @echo "has not changed."
>>>> @@ -148,4 +149,10 @@ check-unit: $(patsubst %,check-%, $(check-unit-y))
>>>>    check-block: $(patsubst %,check-%, $(check-block-y))
>>>>    check: check-unit check-qtest
>>>>
>>>> +check-clean:
>>>> +       $(MAKE) -C tests/tcg clean
>>>> +       rm -f $(check-unit-y)
>>>> +       rm -f $(check-qtest-i386-y) $(check-qtest-x86_64-y)
>>>> $(check-qtest-sparc64-y) $(check-qtest-sparc-y)
>>>
>>> Overlong line.
>>>
>>> -- PMM
>>>
>> ok.
>>
>>
>>
>


-- 
Best Regards

Wenchao Xia

  reply	other threads:[~2012-11-16 11:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-16 10:12 [Qemu-devel] [PATCH V9 0/8] libqblock qemu block layer library Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 1/8] Buildsystem fix distclean error in pixman Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 2/8] Buildsystem clean tests directory clearly Wenchao Xia
2012-11-16 10:23   ` Peter Maydell
2012-11-16 10:31     ` Wenchao Xia
2012-11-16 10:56       ` Paolo Bonzini
2012-11-16 11:01         ` Wenchao Xia [this message]
2012-11-16 11:16           ` Paolo Bonzini
2012-11-16 12:40             ` Wenchao Xia
2012-11-16 12:49               ` Paolo Bonzini
2012-11-18 13:09                 ` Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 3/8] Buildsystem move qapi generation to Makefile.objs Wenchao Xia
2012-11-16 10:54   ` Paolo Bonzini
2012-11-16 10:58     ` Wenchao Xia
2012-11-16 11:12       ` Paolo Bonzini
2012-11-18 12:56         ` Wenchao Xia
2012-11-18 14:55           ` Paolo Bonzini
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 4/8] block export function path_has_protocol Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 5/8] libqblock build system Wenchao Xia
2012-11-16 11:08   ` Paolo Bonzini
2012-11-18 13:06     ` Wenchao Xia
2012-11-18 14:58       ` Paolo Bonzini
2012-11-19  7:47         ` Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 6/8] libqblock type defines Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 7/8] libqblock API Wenchao Xia
2012-11-16 10:12 ` [Qemu-devel] [PATCH V9 8/8] libqblock test example Wenchao Xia

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=50A61D02.70007@linux.vnet.ibm.com \
    --to=xiawenc@linux.vnet.ibm.com \
    --cc=aliguori@us.ibm.com \
    --cc=blauwirbel@gmail.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).