From: Mike Frysinger via Gdb-patches <gdb-patches@sourceware.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] sim: testsuite: merge into toplevel automake
Date: Mon, 18 Jan 2021 12:54:58 -0500 [thread overview]
Message-ID: <20210118175458.24594-2-vapier@gentoo.org> (raw)
In-Reply-To: <20210118175458.24594-1-vapier@gentoo.org>
This allows us to delete all our custom test logic.
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 | 2 +
sim/Makefile.in | 72 +++++++++----
sim/aclocal.m4 | 21 +---
sim/common/Make-common.in | 1 -
sim/configure | 3 +-
sim/configure.ac | 2 +-
sim/testsuite/Makefile.in | 181 ---------------------------------
sim/testsuite/lib/sim-defs.exp | 2 +-
sim/testsuite/local.mk | 46 +++++++++
9 files changed, 104 insertions(+), 226 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 150209c565c8..5e4b0a3df88c 100644
--- a/sim/Makefile.am
+++ b/sim/Makefile.am
@@ -34,3 +34,5 @@ MOSTLYCLEANFILES = core
nltvals:
$(SHELL) $(abs_srcdir)/common/gennltvals.sh --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 8740a4a079e7..11330357491a 100644
--- a/sim/common/Make-common.in
+++ b/sim/common/Make-common.in
@@ -480,7 +480,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 178abf41827e..c447dc02cb54 100644
--- a/sim/configure.ac
+++ b/sim/configure.ac
@@ -56,5 +56,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..f27581ba2db6
--- /dev/null
+++ b/sim/testsuite/local.mk
@@ -0,0 +1,46 @@
+## 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 <http://www.gnu.org/licenses/>.
+
+# We don't need dejagnu's tool-filtering logic as all tests under testsuite/
+# are for the sim.
+DEJATOOL = ""
+EXPECT = expect
+RUNTEST = runtest
+RUNTESTFLAGS =
+
+check-DEJAGNU: site.exp
+ if [ -d testsuite ]; then \
+ true; \
+ else \
+ mkdir testsuite; \
+ fi
+ rm -f testsuite/site.exp
+ cp site.exp testsuite/site.exp
+ rootme=`pwd`; export rootme; \
+ srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
+ LC_ALL=C; export LC_ALL; \
+ EXPECT=${EXPECT} ; export EXPECT ; \
+ runtest=$(RUNTEST); \
+ cd testsuite; \
+ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
+ $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
+ $(RUNTESTFLAGS); \
+ else echo "WARNING: could not find \`runtest'" 1>&2; :;\
+ fi
+
+MOSTLYCLEANFILES += \
+ site.exp site.bak %D%/site.exp %D%/testrun.log %D%/testrun.sum
--
2.28.0
next prev parent reply other threads:[~2021-01-18 17:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-17 16:09 [PATCH] sim: testsuite: push $arch out to targets Mike Frysinger via Gdb-patches
2021-01-18 9:52 ` Andrew Burgess
2021-01-18 18:01 ` Mike Frysinger via Gdb-patches
2021-01-20 19:53 ` Tom Tromey
2021-01-21 0:37 ` Mike Frysinger via Gdb-patches
2021-01-22 16:29 ` Tom Tromey
2021-01-23 4:35 ` Mike Frysinger via Gdb-patches
2021-01-23 17:33 ` Tom Tromey
2021-01-25 5:34 ` Mike Frysinger via Gdb-patches
2021-01-21 9:22 ` Andrew Burgess
2021-01-22 6:36 ` Mike Frysinger via Gdb-patches
2021-01-31 1:27 ` Mike Frysinger via Gdb-patches
2021-01-31 10:54 ` Andrew Burgess
2021-01-31 19:41 ` Mike Frysinger via Gdb-patches
2021-02-06 17:16 ` Mike Frysinger via Gdb-patches
2021-02-08 12:12 ` Andrew Burgess
2021-02-09 5:25 ` Mike Frysinger via Gdb-patches
2021-01-18 17:54 ` [PATCH 1/2] sim: switch top level to automake Mike Frysinger via Gdb-patches
2021-01-18 17:54 ` Mike Frysinger via Gdb-patches [this message]
2021-02-28 8:55 Mike Frysinger via Gdb-patches
2021-02-28 8:55 ` [PATCH 2/2] sim: testsuite: merge into toplevel automake Mike Frysinger via Gdb-patches
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=20210118175458.24594-2-vapier@gentoo.org \
--to=gdb-patches@sourceware.org \
--cc=vapier@gentoo.org \
/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