diff options
author | Tom de Vries <tdevries@suse.de> | 2023-04-07 10:26:02 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-04-07 10:26:02 +0200 |
commit | 31c502801798f397d6ec44d081350c704ca4a901 (patch) | |
tree | 1827af426c1b8812da44f4bd1180371ff77dd2b2 /gdb/testsuite/lib | |
parent | 929a05081ec2ca6448927b96f673b0cd9633a342 (diff) | |
download | gdb-31c502801798f397d6ec44d081350c704ca4a901.zip gdb-31c502801798f397d6ec44d081350c704ca4a901.tar.gz gdb-31c502801798f397d6ec44d081350c704ca4a901.tar.bz2 |
[gdb/testsuite] Add -q to INTERNAL_GDBFLAGS
Whenever we start gdb in the testsuite, we have the rather verbose:
...
$ gdb
GNU gdb (GDB) 14.0.50.20230405-git
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb)
...
This makes gdb.log longer than necessary and harder to read.
We do need to test that the output is produced, but that should be limited to
one or a few test-cases.
Fix this by adding -q to INTERNAL_GDBFLAGS, such that we simply have:
...
$ gdb -q
(gdb)
...
Tested on x86_64-linux.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 9 | ||||
-rw-r--r-- | gdb/testsuite/lib/mi-support.exp | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index bb4bd65..7538071 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -216,6 +216,7 @@ if ![info exists INTERNAL_GDBFLAGS] { [join [list \ "-nw" \ "-nx" \ + "-q" \ {-iex "set height 0"} \ {-iex "set width 0"}]] @@ -2302,6 +2303,14 @@ proc default_gdb_start { } { # that case, this case is hit. verbose "GDB initialized." } + -re "^$gdb_prompt $" { + # Output with -q. + verbose "GDB initialized." + } + -re "^\033\\\[.2004h$gdb_prompt $" { + # Output with -q, and bracketed paste mode enabled, see above. + verbose "GDB initialized." + } -re "$gdb_prompt $" { perror "GDB never initialized." unset gdb_spawn_id diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp index c914ed4..1841816 100644 --- a/gdb/testsuite/lib/mi-support.exp +++ b/gdb/testsuite/lib/mi-support.exp @@ -265,6 +265,10 @@ proc default_mi_gdb_start { { flags {} } } { # We have a new format mi startup prompt. verbose "GDB initialized." } + -re "^(=\[^\r\n\]*\r\n)*$mi_gdb_prompt$" { + # Output with -q. + verbose "GDB initialized." + } -re ".*unrecognized option.*for a complete list of options." { untested "skip mi tests (not compiled with mi support)." remote_close host |