From: Tom de Vries Date: Tue, 29 Oct 2024 11:59:44 +0000 (+0100) Subject: [gdb/testsuite] Add read1 and readmore to make-check-all.sh X-Git-Tag: gdb-16-branchpoint~565 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=51527eb809f01a14a2e2a8b1ff104c0b2e4823e0;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Add read1 and readmore to make-check-all.sh There are two useful ways to run a test-case, that are not represented by a board file in gdb/testsuite/boards: check-read1 and check-readmore. Consequently, they're not run either by make-check-all.sh. Fix this by adding check-read1 and check-readmore to make-check-all.sh. Tested on x86_64-linux. Verified with shellcheck. Approved-By: Andrew Burgess --- diff --git a/gdb/testsuite/make-check-all.sh b/gdb/testsuite/make-check-all.sh index 33a50d708c6..0f529ffe791 100755 --- a/gdb/testsuite/make-check-all.sh +++ b/gdb/testsuite/make-check-all.sh @@ -14,7 +14,8 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -# Run make check with all boards from gdb/testsuite/boards. +# Run make check with all boards from gdb/testsuite/boards, and other useful +# test configurations. # It is recommended to create users on the local system that will act as # "remote host" and "remote target", for the boards that use them. @@ -82,6 +83,12 @@ target_boards=( stabs ) +# Like target_boards, but not actual files in gdb/testsuite/boards. +virtual_boards=( + read1 + readmore +) + # Get RUNTESTFLAGS needed for specific boards. rtf_for_board () { @@ -139,6 +146,25 @@ rtf_for_board () esac } +# Get make target needed for specific boards. +maketarget_for_board () +{ + local b + b="$1" + + case $b in + read1) + maketarget=check-read1 + ;; + readmore) + maketarget=check-readmore + ;; + *) + maketarget=check + ;; + esac +} + # Summarize make check output. summary () { @@ -164,7 +190,7 @@ do_tests () fi # Run make check. - make check \ + make $maketarget \ RUNTESTFLAGS="${rtf[*]} ${tests[*]}" \ 2>&1 \ | summary @@ -189,7 +215,7 @@ do_tests () cp gdb.sum gdb.log "$dir" # Record the 'make check' command to enable easy re-running. - echo "make check RUNTESTFLAGS=\"${rtf[*]} ${tests[*]}\"" \ + echo "make $maketarget RUNTESTFLAGS=\"${rtf[*]} ${tests[*]}\"" \ > "$dir/make-check.sh" fi } @@ -279,8 +305,17 @@ main () # For reference, run the tests without any explicit host or target board. echo "LOCAL:" rtf=() + maketarget_for_board do_tests + # Run the virtual boards. + for b in "${virtual_boards[@]}"; do + echo "TARGET BOARD: $b" + rtf_for_board "$b" + maketarget_for_board "$b" + do_tests + done + # Run the boards for local host and local target. for b in "${target_boards[@]}"; do echo "TARGET BOARD: $b" @@ -288,6 +323,7 @@ main () --target_board="$b" ) rtf_for_board "$b" + maketarget_for_board "$b" do_tests done @@ -299,6 +335,7 @@ main () --target_board="$b" ) rtf_for_board "$b" + maketarget_for_board "$b" do_tests done @@ -313,6 +350,7 @@ main () ) rtf_for_board "$h" rtf_for_board "$b" + maketarget_for_board "$h-$b" do_tests done done @@ -326,6 +364,7 @@ main () --target_board="$b" ) rtf_for_board "$b" + maketarget_for_board "$b" do_tests done }