From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aKRwN3RaO2C6fgAAWB0awg (envelope-from ) for ; Sun, 28 Feb 2021 03:55:16 -0500 Received: by simark.ca (Postfix, from userid 112) id D3DC91EF78; Sun, 28 Feb 2021 03:55:16 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_NONE,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6E7671EF5D for ; Sun, 28 Feb 2021 03:55:13 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6DF80386EC70; Sun, 28 Feb 2021 08:55:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6DF80386EC70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1614502512; bh=GiejVTTbr86IQPx6Ipg9O2Z5Zk/VaA+RVJybtYHRx0Y=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=o8JC5GGfHnt6p3RH0LZshKX/NHzann2rMwf6julUnlmwrezddnAHoR/FGZywDuHIY 973l7LWYXegfNgnOU4Il06fUr2qJUfI9sq5cUiaSlYxHXBQc/9XsbueHWsRI/zVkx/ VceoAhprYTE9vA5pH9aB81j3ICoz2dLPpUBh4HK0= Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id C8A1A384A018 for ; Sun, 28 Feb 2021 08:55:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C8A1A384A018 Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 085A7340CF4 for ; Sun, 28 Feb 2021 08:55:04 +0000 (UTC) To: gdb-patches@sourceware.org Subject: [PATCH 2/2] sim: testsuite: merge into toplevel automake Date: Sun, 28 Feb 2021 03:55:01 -0500 Message-Id: <20210228085501.19153-2-vapier@gentoo.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210228085501.19153-1-vapier@gentoo.org> References: <20210228085501.19153-1-vapier@gentoo.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" This allows us to delete most of our custom test logic, and avoids a recursive make for minor speed up. sim/: * configure.ac (AC_CONFIG_FILES): Delete testsuite/Makefile. * Makefile.am: Include testsuite/local.mk. * aclocal.m4, configure, Makefile.in: Regenerated. sim/common/: * Make-common.in (check): Delete body. sim/testsuite/: * Makefile.in: Delete. * lib/sim-defs.exp (sim): Update default path. * local.mk: New file based on Makefile.in. --- sim/Makefile.am | 4 +- sim/Makefile.in | 102 +++++++++++++++---- sim/common/Make-common.in | 1 - sim/configure | 3 +- sim/configure.ac | 2 +- sim/testsuite/Makefile.in | 178 --------------------------------- sim/testsuite/lib/sim-defs.exp | 2 +- sim/testsuite/local.mk | 34 +++++++ 8 files changed, 125 insertions(+), 201 deletions(-) delete mode 100644 sim/testsuite/Makefile.in create mode 100644 sim/testsuite/local.mk diff --git a/sim/Makefile.am b/sim/Makefile.am index bcca70623e9a..c6e2d04f33ae 100644 --- a/sim/Makefile.am +++ b/sim/Makefile.am @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -AUTOMAKE_OPTIONS = foreign no-dist subdir-objects +AUTOMAKE_OPTIONS = dejagnu foreign no-dist subdir-objects ACLOCAL_AMFLAGS = -I.. -I../config srcroot = $(srcdir)/.. @@ -34,3 +34,5 @@ MOSTLYCLEANFILES = core nltvals: $(abs_srcdir)/common/gennltvals.py --cpp "$(CPP)" --output nltvals.def --srcroot $(srcroot) $(SHELL) $(srcroot)/move-if-change nltvals.def $(abs_srcdir)/common/nltvals.def + +include testsuite/local.mk diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 3f16dc476ef5..cf92e94993c5 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -471,7 +471,6 @@ installdirs: $(SHELL) $(srcdir)/../../mkinstalldirs $(DESTDIR)$(libdir) check: - cd ../testsuite && $(MAKE) check RUNTESTFLAGS="$(RUNTESTFLAGS)" info: clean-info: diff --git a/sim/configure.ac b/sim/configure.ac index de5779642c50..23478521e94c 100644 --- a/sim/configure.ac +++ b/sim/configure.ac @@ -152,5 +152,5 @@ if test "${enable_sim}" != no; then fi fi -AC_CONFIG_FILES([Makefile testsuite/Makefile]) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp index 43a07050f508..0157f9bb2834 100644 --- a/sim/testsuite/lib/sim-defs.exp +++ b/sim/testsuite/lib/sim-defs.exp @@ -106,7 +106,7 @@ proc sim_run { prog sim_opts prog_opts redir options } { # These global variables come from generated site.exp. global objdir global arch - set sim "$objdir/../$arch/run" + set sim "$objdir/$arch/run" } if [is_remote host] { diff --git a/sim/testsuite/local.mk b/sim/testsuite/local.mk new file mode 100644 index 000000000000..bd8a20696434 --- /dev/null +++ b/sim/testsuite/local.mk @@ -0,0 +1,34 @@ +## See sim/Makefile.am. +# +# Copyright (C) 1997-2021 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Tweak the site.exp so it works with plain `runtest` from user. +EXTRA_DEJAGNU_SITE_CONFIG = site-srcdir.exp + +site-srcdir.exp: Makefile + echo "set srcdir \"$(srcdir)/testsuite\"" > $@ + +check-DEJAGNU: site.exp + LC_ALL=C; export LC_ALL; \ + EXPECT=${EXPECT} ; export EXPECT ; \ + runtest=$(RUNTEST); \ + if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ + $$runtest $(RUNTESTFLAGS); \ + else echo "WARNING: could not find \`runtest'" 1>&2; :;\ + fi + +MOSTLYCLEANFILES += \ + site-srcdir.exp testrun.log testrun.sum -- 2.30.0