From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUkyG-0007vZ-F3 for qemu-devel@nongnu.org; Thu, 18 Sep 2014 19:18:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XUkyA-0005jh-RN for qemu-devel@nongnu.org; Thu, 18 Sep 2014 19:18:40 -0400 Received: from mail-la0-f54.google.com ([209.85.215.54]:47263) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XUkyA-0005iG-Li for qemu-devel@nongnu.org; Thu, 18 Sep 2014 19:18:34 -0400 Received: by mail-la0-f54.google.com with SMTP id ge10so2061072lab.41 for ; Thu, 18 Sep 2014 16:18:28 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1411081173-14618-1-git-send-email-mdroth@linux.vnet.ibm.com> References: <1411081173-14618-1-git-send-email-mdroth@linux.vnet.ibm.com> From: Peter Maydell Date: Thu, 18 Sep 2014 16:18:08 -0700 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] tests: avoid running duplicate qom-tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: QEMU Trivial , QEMU Developers , =?UTF-8?Q?Andreas_F=C3=A4rber?= On 18 September 2014 15:59, Michael Roth wrote: > Since 3687d532 we've been unconditionally adding qom-test to our qtests > for every arch. However, some archs inherit their tests from Makefile > variables for other archs, such as i386/x86_64, > microblaze/microblazeel, and xtensa/xtensaeb. Since these are evaluated > in a lazy manner, we ultimately end up adding qom-test twice. > > In the case x86_64, where we have a large number of machine types that > we rerun qom-test for, this has lead to a fairly noticeable increase > in the overall run-time of `make check` (78s vs. 42s on my machine). > Similar speed-ups are visible for other such archs, but not nearly as > significant. > > Fix this by only adding qom-test to an arch's test list if it's not > already present. > > Signed-off-by: Michael Roth > --- > tests/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tests/Makefile b/tests/Makefile > index a5e3d0c..9f2a35c 100644 > --- a/tests/Makefile > +++ b/tests/Makefile > @@ -192,7 +192,8 @@ check-qtest-xtensaeb-y = $(check-qtest-xtensa-y) > > # qom-test works for all sysemu architectures: > $(foreach target,$(SYSEMU_TARGET_LIST), \ > - $(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF))) > + $(if $(findstring tests/qom-test$(EXESUF), $(check-qtest-$(target)-y)),, \ > + $(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF)))) See also Andreas' suggested fix: https://lists.gnu.org/archive/html/qemu-devel/2014-04/msg01087.html and mine: https://lists.gnu.org/archive/html/qemu-devel/2014-03/msg05771.html Andreas didn't like my patch because it sorts all the tests as a side effect, and I didn't like the hard-coded listing of architectures in Andreas' patch. It looks like maybe your version will satisfy both of us :-) Reviewed-by: Peter Maydell thanks -- PMM