]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: log 'make check' command in make-check-all.sh
authorAndrew Burgess <aburgess@redhat.com>
Tue, 7 Nov 2023 18:11:13 +0000 (18:11 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Tue, 28 Nov 2023 10:33:44 +0000 (10:33 +0000)
I have been making more use of the make-check-all.sh script to run
tests against all boards.

But one thing is pretty annoying.  When a test fails on some random
board, I have to run make-check-all.sh with --verbose and --dry-run in
order to see what RUNTESTFLAGS I should be using.

I always run with --keep-results on, so, in this commit, I propose
that, when --keep-results is on the 'make check' command will be
written out to a file within the stored results directory, like:

  check-all/BOARD_NAME/make-check.sh

then, if I want to rerun a test, I can just:

  sh check-all/BOARD_NAME/make-check.sh

and the test will be re-run for me.

gdb/testsuite/make-check-all.sh

index 947e6e32eaa501d5dff029f04993bf1ada206e51..e0c1fdbc424ea4f5ebce18b1cf66f90d14587991 100755 (executable)
@@ -187,6 +187,10 @@ do_tests ()
 
        mkdir -p "$dir"
        cp gdb.sum gdb.log "$dir"
+
+       # Record the 'make check' command to enable easy re-running.
+       echo "make check RUNTESTFLAGS=\"${rtf[*]} ${tests[*]}\"" \
+            > "$dir/make-check.sh"
     fi
 }