]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/testsuite/ChangeLog-2014-2021
[gdb/testsuite] Add -lbl option in gdb_test_multiple
authorTom de Vries <tdevries@suse.de>
Mon, 2 Mar 2020 13:47:27 +0000 (14:47 +0100)
committerTom de Vries <tdevries@suse.de>
Mon, 2 Mar 2020 13:47:27 +0000 (14:47 +0100)
commit590003dc0ea7653ead62899d850fba0a5c4a595e
tree01399ff3fd88ebdf7161a43e61d37551b7fa915a
parent40b35c78b62eec2ab41219906a7ea0c0be323499
[gdb/testsuite] Add -lbl option in gdb_test_multiple

Add gdb_test_multiple option -lbl, that adds a regexp after the user code that
reads one line, and discards it:
...
           -re "\r\n\[^\r\n\]*(?=\r\n)" {
               exp_continue
           }
...

In order to be able to write:
...
gdb_test_multiple "command" "testname" -lbl {
  ...
}
...
rewrite the promp_regexp argument usage into the similar:
...
gdb_test_multiple "command" "testname" -prompt $prompt_regexp {
  ...
}
...

Build and reg-tested on x86_64-linux.

Tested gdb.base/corefile-buildid.exp with both make targets check and
check-read1.

gdb/testsuite/ChangeLog:

2020-03-02  Pedro Alves  <palves@redhat.com>
      Tom de Vries  <tdevries@suse.de>

* lib/gdb.exp (gdb_test_multiple): Handle prompt_regexp option using
-prompt prefix, before user_code argument.  Add -lbl option likewise.
(skip_python_tests_prompt, skip_libstdcxx_probe_tests_prompt)
(gdb_is_target_1): Add -prompt prefix and move to before user_code
argument.
* gdb.base/corefile-buildid.exp: Use -lbl option.  Rewrite regexps to
have "\r\n" at start-of-line, instead of at end-of-line.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/corefile-buildid.exp
gdb/testsuite/lib/gdb.exp