diff options
author | Tom de Vries <tdevries@suse.de> | 2021-07-14 06:52:44 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-07-14 06:52:44 +0200 |
commit | 90d7916ac136613b8118f6429c3436664a700a2e (patch) | |
tree | 411efcd0b35c82d5ce9d32357005468ca5cecd25 /gdb/testsuite/gdb.python | |
parent | fac3b6a2e04f7feeefbf425c3798c34d134752d6 (diff) | |
download | gdb-90d7916ac136613b8118f6429c3436664a700a2e.zip gdb-90d7916ac136613b8118f6429c3436664a700a2e.tar.gz gdb-90d7916ac136613b8118f6429c3436664a700a2e.tar.bz2 |
[gdb/testsuite] Add missing skip_tui_tests
When building gdb with --disable-tui, we run into:
...
(gdb) frame apply all -- -^M
Undefined command: "-". Try "help".^M
(gdb) ERROR: Undefined command "frame apply all -- -".
UNRESOLVED: gdb.base/options.exp: test-frame-apply: frame apply all -- -
...
Fix this by detecting whether tui is supported, and skipping the tui-related
tests otherwise. Same in some gdb.tui test-cases.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2021-07-13 Tom de Vries <tdevries@suse.de>
* gdb.base/options.exp: Skip tui-related tests when tui is not
supported.
* gdb.python/tui-window-disabled.exp: Same.
* gdb.python/tui-window.exp: Same.
Diffstat (limited to 'gdb/testsuite/gdb.python')
-rw-r--r-- | gdb/testsuite/gdb.python/tui-window-disabled.exp | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/tui-window.exp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/tui-window-disabled.exp b/gdb/testsuite/gdb.python/tui-window-disabled.exp index af1fa0c..f43530b 100644 --- a/gdb/testsuite/gdb.python/tui-window-disabled.exp +++ b/gdb/testsuite/gdb.python/tui-window-disabled.exp @@ -30,6 +30,11 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} { return -1 } +clean_restart +if {[skip_tui_tests]} { + return +} + # Copy the Python script to where the tests are being run. set remote_python_file [gdb_remote_download host \ ${srcdir}/${subdir}/${testfile}.py] diff --git a/gdb/testsuite/gdb.python/tui-window.exp b/gdb/testsuite/gdb.python/tui-window.exp index 8d86afb..4710dd6 100644 --- a/gdb/testsuite/gdb.python/tui-window.exp +++ b/gdb/testsuite/gdb.python/tui-window.exp @@ -25,6 +25,11 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} { return -1 } +clean_restart +if {[skip_tui_tests]} { + return +} + Term::clean_restart 24 80 $testfile # Skip all tests if Python scripting is not enabled. |