binutils-gdb/gdb/testsuite/lib
Tom de Vries 4ccdfbec50 [gdb/testsuite] Add -wrap pattern flag to gdb_test_multiple
Currently, in order to rewrite:
...
gdb_test <command> <pattern> <message>
...
using gdb_test_multiple, we get:
...
gdb_test_multiple <command> <message> {
    -re "\[\r\n\]*(?:<pattern>)\[\r\n\]+$gdb_prompt $" {
    	pass $gdb_test_name
    }
}
...

Add a '-wrap pattern flag to gdb_test_multiple, that wraps the regexp
pattern as gdb_test wraps its message argument.

This allows us to rewrite into the more compact:
...
gdb_test_multiple <command> <message> {
    -re -wrap <pattern> {
        pass $gdb_test_name
    }
}
...

Tested on x86_64-linux.

gdb/testsuite/ChangeLog:

2019-10-24  Tom de Vries  <tdevries@suse.de>

	* lib/gdb.exp (gdb_test_multiple): Add -wrap pattern flag.
	* gdb.reverse/step-precsave.exp: Rewrite gdb_test_multiple containing
	kfail using -wrap pattern flag and convenience variable
	gdb_test_name.

Change-Id: Ie42c97d5ab7acf6db351299ccd23a83540fe6e1a
2019-10-24 18:43:46 +02:00
..
ada.exp [gdb/testsuite] Fix ada tests with -fPIE/-pie 2019-10-10 11:51:34 +02:00
append_gdb_boards_dir.exp
build-piece.exp
cache.exp
cl_util.c
cl_util.h
compile-support.exp
compiler.c
compiler.cc
completion-support.exp Add check for readline support to more GDB tab-completion tests. 2019-08-04 14:26:39 -07:00
cp-support.exp
d-support.exp
data-structures.exp
dtrace.exp
dwarf.exp
fortran.exp [gdb/testsuite] Fix gdb.fortran/info-types.exp regexp 2019-08-29 14:43:11 +02:00
future.exp
gdb-guile.exp
gdb-python.exp
gdb-utils.exp Introduce metadata style 2019-10-01 15:12:40 -06:00
gdb.exp [gdb/testsuite] Add -wrap pattern flag to gdb_test_multiple 2019-10-24 18:43:46 +02:00
gdbserver-support.exp [gdb/testsuite] Fix gdb_target_cmd 2019-09-19 01:14:19 +02:00
gen-perf-test.exp
go.exp
memory.exp
mi-support.exp [gdb/testsuite] Test skip_libstdcxx_probe_tests in mi-catch-cpp-exceptions.exp 2019-07-25 18:39:31 +02:00
objc.exp
opencl_hostapp.c
opencl_kernel.cl
opencl.exp
pascal.exp [gdb/testsuite] Clean up stale exec in gdb_compile_pascal 2019-08-20 17:18:09 +02:00
pdtrace.in
perftest.exp
prelink-support.exp
prompt.exp
range-stepping-support.exp
read1.c [gdb/testsuite] Work around tcl bug in libsegfault.exp with check-read1 2019-07-30 16:15:46 +02:00
rust-support.exp
selftest-support.exp
set_unbuffered_mode.c
trace-support.exp
tuiterm.exp Remove the TUI execution info window 2019-08-16 14:17:36 -06:00
unbuffer_output.c
valgrind.exp