Add "new-ui console" tests
authorPedro Alves <palves@redhat.com>
Tue, 21 Jun 2016 00:11:57 +0000 (01:11 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 21 Jun 2016 00:11:57 +0000 (01:11 +0100)
commitac69f7863a6b5dbd1792356275de437371b8c879
tree753e80633e0c23edfff69f969d78c215b9dc2bb3
parent49940788ab38b9d58c663cf38855f29c0ebb1b55
Add "new-ui console" tests

This adds a test that uses new-ui to create a secondary console, and
then runs some basic smoke tests.  It ensures that:

 - synchronous commands send output to the UI that initiated it

 - asynchronous events like breakpoint hits are reported on all
   consoles.

 - "new-ui" without arguments doesn't crash.

 - The "new-ui" command doesn't repeat.

gdb/testsuite/ChangeLog:
2016-06-21  Pedro Alves  <palves@redhat.com>

* gdb.base/new-ui.exp: New file.
* lib/mi-support.exp (switch_gdb_spawn_id): Move to ...
* lib/gdb.exp (switch_gdb_spawn_id): ... here.
(with_spawn_id): New procedure.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/new-ui.c [new file with mode: 0644]
gdb/testsuite/gdb.base/new-ui.exp [new file with mode: 0644]
gdb/testsuite/lib/gdb.exp
gdb/testsuite/lib/mi-support.exp