From e5f1ee1832ff9e970833fa5773f46c3e0b93bc04 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 26 Oct 2023 12:05:06 +0100 Subject: gdb/testsuite: add a new check-all-boards target The make-check-all.sh script (gdb/testsuite/make-check-all.sh) is great, it makes it super easy to run some test(s) using all the available board files. This commit aims to make this script even easier to access by adding a check-all-boards target to the GDB Makefile. This new target checks for (and requires) a number of environment variables, so the target should be used like this: make check-all-boards GDB_TARGET_USERNAME=remote-target \ GDB_HOST_USERNAME=remote-host \ TESTS="gdb.base/break.exp" Where GDB_TARGET_USERNAME and GDB_HOST_USERNAME are the user names that should be passed to the make-check-all.sh --target-user and --host-user command line options respectively. My personal intention is to set these variables in my environment, so all I'll need to do is: make check-all-boards TESTS="gdb.base/break.exp" The make rule always passes --keep-results to the make-check-all.sh script, as I find that the most useful. It's super frustrating to run the tests and realise you forgot that option and the results have been discarded. --- gdb/Makefile.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gdb/Makefile.in') diff --git a/gdb/Makefile.in b/gdb/Makefile.in index a50628e..3510577 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -1971,6 +1971,14 @@ check-parallel: force $(MAKE) $(TARGET_FLAGS_TO_PASS) check-parallel; \ else true; fi +check-all-boards: force + @if [ -f testsuite/Makefile ]; then \ + rootme=`pwd`; export rootme; \ + rootsrc=`cd $(srcdir); pwd`; export rootsrc; \ + cd testsuite; \ + $(MAKE) $(TARGET_FLAGS_TO_PASS) check-all-boards; \ + else true; fi + # The idea is to parallelize testing of multilibs, for example: # make -j3 check//sh-hms-sim/{-m1,-m2,-m3,-m3e,-m4}/{,-nofpu} # will run 3 concurrent sessions of check, eventually testing all 10 -- cgit v1.1