diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2020-06-17 21:57:16 -0700 |
---|---|---|
committer | Sandra Loosemore <sandra@codesourcery.com> | 2020-06-17 21:57:16 -0700 |
commit | 581bea2c99751391fc49d104d5eacb85bfb63c96 (patch) | |
tree | e1861824d9ba30175e8ac71240431ff14775d51a | |
parent | 612f258a491539f36c618030cc558e83e7d58b4e (diff) | |
download | gdb-581bea2c99751391fc49d104d5eacb85bfb63c96.zip gdb-581bea2c99751391fc49d104d5eacb85bfb63c96.tar.gz gdb-581bea2c99751391fc49d104d5eacb85bfb63c96.tar.bz2 |
Fix TUI support checks in gdb.tui tests.
2020-06-17 Sandra Loosemore <sandra@codesourcery.com>
gdb/testsuite/
* gdb.tui/basic.exp: Skip test when TUI is unsupported, don't
just say UNSUPPORTED.
* gdb.tui/corefile-run.exp: Likewise.
* gdb.tui/empty.exp: Likewise.
* gdb.tui/list-before.exp: Likewise.
* gdb.tui/list.exp: Likewise.
* gdb.tui/main.exp: Likewise.
* gdb.tui/regs.exp: Likewise.
* gdb.tui/resize.exp: Likewise.
* gdb.tui/tui-layout-asm-short-prog.exp: Likewise.
* gdb.tui/tui-layout-asm.exp: Likewise.
* gdb.tui/tui-missing-src.exp: Likewise.
* gdb.tui/winheight.exp: Likewise.
* gdb.tui/new-layout.exp: Likewise. Also move check earlier.
-rw-r--r-- | gdb/testsuite/ChangeLog | 19 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/basic.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/corefile-run.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/empty.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/list-before.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/list.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/main.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/new-layout.exp | 8 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/regs.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/resize.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/tui-layout-asm.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/tui-missing-src.exp | 1 | ||||
-rw-r--r-- | gdb/testsuite/gdb.tui/winheight.exp | 1 |
14 files changed, 39 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2cdd2ea..0e1dc5a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,24 @@ 2020-06-17 Sandra Loosemore <sandra@codesourcery.com> + Fix TUI support checks in gdb.tui tests. + + * gdb.tui/basic.exp: Skip test when TUI is unsupported, don't + just say UNSUPPORTED. + * gdb.tui/corefile-run.exp: Likewise. + * gdb.tui/empty.exp: Likewise. + * gdb.tui/list-before.exp: Likewise. + * gdb.tui/list.exp: Likewise. + * gdb.tui/main.exp: Likewise. + * gdb.tui/regs.exp: Likewise. + * gdb.tui/resize.exp: Likewise. + * gdb.tui/tui-layout-asm-short-prog.exp: Likewise. + * gdb.tui/tui-layout-asm.exp: Likewise. + * gdb.tui/tui-missing-src.exp: Likewise. + * gdb.tui/winheight.exp: Likewise. + * gdb.tui/new-layout.exp: Likewise. Also move check earlier. + +2020-06-17 Sandra Loosemore <sandra@codesourcery.com> + Fix TCL error in gdb.python/py-format-string.exp. * gdb.python/py-format-string.exp: Move test for python support diff --git a/gdb/testsuite/gdb.tui/basic.exp b/gdb/testsuite/gdb.tui/basic.exp index 3e013a9..0296e54 100644 --- a/gdb/testsuite/gdb.tui/basic.exp +++ b/gdb/testsuite/gdb.tui/basic.exp @@ -26,6 +26,7 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} { Term::clean_restart 24 80 $testfile if {![Term::enter_tui]} { unsupported "TUI not supported" + return } set text [Term::get_all_lines] diff --git a/gdb/testsuite/gdb.tui/corefile-run.exp b/gdb/testsuite/gdb.tui/corefile-run.exp index 1878770..94a599e 100644 --- a/gdb/testsuite/gdb.tui/corefile-run.exp +++ b/gdb/testsuite/gdb.tui/corefile-run.exp @@ -47,6 +47,7 @@ if { ![gdb_gcore_cmd "$core" "save a corefile"] } { Term::clean_restart 24 80 $testfile if {![Term::enter_tui]} { unsupported "TUI not supported" + return } set text [Term::get_all_lines] diff --git a/gdb/testsuite/gdb.tui/empty.exp b/gdb/testsuite/gdb.tui/empty.exp index 89f49d6..50c8be4 100644 --- a/gdb/testsuite/gdb.tui/empty.exp +++ b/gdb/testsuite/gdb.tui/empty.exp @@ -23,6 +23,7 @@ Term::clean_restart 24 80 if {![Term::enter_tui]} { unsupported "TUI not supported" + return } # Each entry describes a layout. It has these items: diff --git a/gdb/testsuite/gdb.tui/list-before.exp b/gdb/testsuite/gdb.tui/list-before.exp index 9c5eb56..fce745d 100644 --- a/gdb/testsuite/gdb.tui/list-before.exp +++ b/gdb/testsuite/gdb.tui/list-before.exp @@ -29,6 +29,7 @@ gdb_test "list main" if {![Term::enter_tui]} { unsupported "TUI not supported" + return } Term::check_contents "initial source listing" "21 *return 0" diff --git a/gdb/testsuite/gdb.tui/list.exp b/gdb/testsuite/gdb.tui/list.exp index b1e5949..77dbd69 100644 --- a/gdb/testsuite/gdb.tui/list.exp +++ b/gdb/testsuite/gdb.tui/list.exp @@ -26,6 +26,7 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} { Term::clean_restart 24 80 $testfile if {![Term::enter_tui]} { unsupported "TUI not supported" + return } Term::check_contents "initial source listing" "21 *return 0" diff --git a/gdb/testsuite/gdb.tui/main.exp b/gdb/testsuite/gdb.tui/main.exp index fd3c2cd..38e2e5b 100644 --- a/gdb/testsuite/gdb.tui/main.exp +++ b/gdb/testsuite/gdb.tui/main.exp @@ -31,6 +31,7 @@ gdb_test_no_output "set interactive-mode off" if {![Term::enter_tui]} { unsupported "TUI not supported" + return } Term::command "file [standard_output_file $testfile]" diff --git a/gdb/testsuite/gdb.tui/new-layout.exp b/gdb/testsuite/gdb.tui/new-layout.exp index 3ea4dd4..b4fca67 100644 --- a/gdb/testsuite/gdb.tui/new-layout.exp +++ b/gdb/testsuite/gdb.tui/new-layout.exp @@ -23,6 +23,13 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} { return -1 } +# Make sure TUI is supported before continuing. +Term::clean_restart 24 80 $testfile +if {![Term::enter_tui]} { + unsupported "TUI not supported" + return +} + Term::clean_restart 24 80 $testfile gdb_test "tui new-layout" \ @@ -59,6 +66,7 @@ gdb_test "help layout h" \ if {![Term::enter_tui]} { unsupported "TUI not supported" + return } set text [Term::get_all_lines] diff --git a/gdb/testsuite/gdb.tui/regs.exp b/gdb/testsuite/gdb.tui/regs.exp index a9296a7..3d63523 100644 --- a/gdb/testsuite/gdb.tui/regs.exp +++ b/gdb/testsuite/gdb.tui/regs.exp @@ -32,6 +32,7 @@ if {![runto_main]} { if {![Term::enter_tui]} { unsupported "TUI not supported" + return } Term::check_contents "source at startup" "\\|.*21 *return 0" diff --git a/gdb/testsuite/gdb.tui/resize.exp b/gdb/testsuite/gdb.tui/resize.exp index fd1b350..bf32251 100644 --- a/gdb/testsuite/gdb.tui/resize.exp +++ b/gdb/testsuite/gdb.tui/resize.exp @@ -32,6 +32,7 @@ if {![runto_main]} { if {![Term::enter_tui]} { unsupported "TUI not supported" + return } Term::check_contents "source at startup" "\\|.*21 *return 0" diff --git a/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp b/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp index 50cb61f..1a79925 100644 --- a/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp +++ b/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp @@ -29,6 +29,7 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile} \ Term::clean_restart 24 80 $testfile if {![Term::prepare_for_tui]} { unsupported "TUI not supported" + return } # This puts us into TUI mode, and should display the ASM window. diff --git a/gdb/testsuite/gdb.tui/tui-layout-asm.exp b/gdb/testsuite/gdb.tui/tui-layout-asm.exp index 44f7a3a..96fb043 100644 --- a/gdb/testsuite/gdb.tui/tui-layout-asm.exp +++ b/gdb/testsuite/gdb.tui/tui-layout-asm.exp @@ -27,6 +27,7 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} { Term::clean_restart 24 80 $testfile if {![Term::prepare_for_tui]} { unsupported "TUI not supported" + return } # This puts us into TUI mode, and should display the ASM window. diff --git a/gdb/testsuite/gdb.tui/tui-missing-src.exp b/gdb/testsuite/gdb.tui/tui-missing-src.exp index 6b5c7fa..a8460c6 100644 --- a/gdb/testsuite/gdb.tui/tui-missing-src.exp +++ b/gdb/testsuite/gdb.tui/tui-missing-src.exp @@ -75,6 +75,7 @@ file delete $mainfile Term::clean_restart 24 80 $testfile if {![Term::enter_tui]} { unsupported "TUI not supported" + return } # There must exist a source layout with the size 80x15 and # there should be nothing in it. diff --git a/gdb/testsuite/gdb.tui/winheight.exp b/gdb/testsuite/gdb.tui/winheight.exp index 8ac55f8..bbfb7de 100644 --- a/gdb/testsuite/gdb.tui/winheight.exp +++ b/gdb/testsuite/gdb.tui/winheight.exp @@ -26,6 +26,7 @@ if {[build_executable "failed to prepare" ${testfile} ${srcfile}] == -1} { Term::clean_restart 24 80 $testfile if {![Term::enter_tui]} { unsupported "TUI not supported" + return } Term::check_box "source box" 0 0 80 15 |