[binutils-gdb] gdb/testsuite: improve rerun scripts generated by make-check-all.sh
Andrew Burgess via Gdb-cvs <[email protected]> Thu, 23 Jul 2026 16:42:45 +0000 (GMT)
| Newsgroups | gmane.comp.gdb.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D5be71a6445ce= 90a1dec06a68aab2b62639036811 commit 5be71a6445ce90a1dec06a68aab2b62639036811 Author: Andrew Burgess <[email protected]> Date: Sat Jul 18 11:37:37 2026 +0100 gdb/testsuite: improve rerun scripts generated by make-check-all.sh =20 The make-check-all.sh script creates little scripts that allow each board to easily be rerun, useful if a particular test fails and you want to check a possible fix. =20 The scripts as currently generated only include the 'make check-...' line, and are not executable, which means you need to first change to the correct directory, and invoke the script with 'sh'. =20 This commit extends the script to include a '#! /bin/sh' line as well as a 'cd ....' line to switch to the correct directory to run the test. The script is then made executable. =20 It should now be easier to rerun tests. There is no change to how tests are run, or what tests are run with this commit. =20 Approved-By: Tom Tromey <[email protected]> Diff: --- gdb/testsuite/make-check-all.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/make-check-all.sh b/gdb/testsuite/make-check-all= .sh index 3cf6b46cdb0..8708ecec1cc 100755 --- a/gdb/testsuite/make-check-all.sh +++ b/gdb/testsuite/make-check-all.sh @@ -215,8 +215,14 @@ do_tests () cp gdb.sum gdb.log "$dir" =20 # Record the 'make check' command to enable easy re-running. - echo "make $maketarget RUNTESTFLAGS=3D\"${rtf[*]}\" TESTS=3D\"${tests[*]}= \"" \ - > "$dir/make-check.sh" + make_check_script=3D"$dir/make-check.sh" + cat <<-EOF > "$make_check_script" + #!/bin/sh + + cd "$PWD" && \\ + make $maketarget RUNTESTFLAGS=3D"${rtf[*]}" TESTS=3D"${tests[*]}" + EOF + chmod +x "$make_check_script" fi }