diff --git a/gdb/testsuite/gdb.base/new-ui.exp b/gdb/testsuite/gdb.base/new-ui.exp index 2dfcbf7e108..a56d213e527 100644 --- a/gdb/testsuite/gdb.base/new-ui.exp +++ b/gdb/testsuite/gdb.base/new-ui.exp @@ -184,9 +184,11 @@ proc_with_prefix do_test_invalid_args {} { "new-ui with bad interpreter name" # Test that the TUI cannot be used for a new UI. - gdb_test "new-ui tui $extra_tty_name" \ - "interpreter 'tui' cannot be used with a new UI" \ - "new-ui with tui" + if [allow_tui_tests] { + gdb_test "new-ui tui $extra_tty_name" \ + "interpreter 'tui' cannot be used with a new UI" \ + "new-ui with tui" + } # Test that we can continue working normally. if ![runto_main] {