Fix TUI support checks in gdb.tui tests.
authorSandra Loosemore <sandra@codesourcery.com>
Thu, 18 Jun 2020 04:57:16 +0000 (21:57 -0700)
committerSandra Loosemore <sandra@codesourcery.com>
Thu, 18 Jun 2020 04:57:16 +0000 (21:57 -0700)
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.

14 files changed:
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.tui/basic.exp
gdb/testsuite/gdb.tui/corefile-run.exp
gdb/testsuite/gdb.tui/empty.exp
gdb/testsuite/gdb.tui/list-before.exp
gdb/testsuite/gdb.tui/list.exp
gdb/testsuite/gdb.tui/main.exp
gdb/testsuite/gdb.tui/new-layout.exp
gdb/testsuite/gdb.tui/regs.exp
gdb/testsuite/gdb.tui/resize.exp
gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.exp
gdb/testsuite/gdb.tui/tui-layout-asm.exp
gdb/testsuite/gdb.tui/tui-missing-src.exp
gdb/testsuite/gdb.tui/winheight.exp

index 2cdd2ea580fd996ae10bd0a56824f4c42ced2448..0e1dc5aaf186cf9a0ace1630a5a42cb6ccb7f8fc 100644 (file)
@@ -1,3 +1,22 @@
+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.
index 3e013a95151c297cd7c4b40a5b19d766d6cf0f36..0296e542868d17fbeb858500d5375ccf5a1fd475 100644 (file)
@@ -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]
index 1878770bdcd146d050a6c49f8b1ed27096aaf5f1..94a599e897331cecb969f290c8a850d94b7f9c0c 100644 (file)
@@ -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]
index 89f49d6b7f9a35107732111f878b88d2dae5cfd4..50c8be42f5bd148056ba5b0d443f0a1f09ecbc41 100644 (file)
@@ -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:
index 9c5eb5655ea93e48ec0bdb9e9a3489036f8a2679..fce745db7e06f05860b3cd63080bf3c80452c04f 100644 (file)
@@ -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"
index b1e59499c87e13a86cde047d87cad83cd1437215..77dbd69efd85850852d22c1196294104eeb4221f 100644 (file)
@@ -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"
index fd3c2cd8157b04271998a39edc93e0c667555758..38e2e5bc726a387bf3d1bba575d48033d8de936d 100644 (file)
@@ -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]"
index 3ea4dd4069932b9c25a8b200f8c8e145c67eb1a4..b4fca674e896a9d3710ebe1e6ba9bca645c9fabd 100644 (file)
@@ -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]
index a9296a7d5faabd5bdf86fed9270bc06df73991de..3d635236e81348f80e0f0112a7ad603691bc066c 100644 (file)
@@ -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"
index fd1b35088af0ae127b63f4bd9e43953b2cbe3c36..bf32251c457251f321472878f4b3bb18b239024f 100644 (file)
@@ -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"
index 50cb61f0faa2927bc4b5e8f2aae2af7c5f108ddb..1a7992502ad22791984280c721a0a13ee17d0ff0 100644 (file)
@@ -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.
index 44f7a3a3a4f5cbbdf3d7c8ebacf15de822402b08..96fb043321fab004aa97788d42847c81e5984d54 100644 (file)
@@ -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.
index 6b5c7fad4c414cf5dbcfa5557b4a9274909c3a19..a8460c6514a2d979e86a3f0d8ac9a317d7514c7f 100644 (file)
@@ -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.
index 8ac55f847236206b631a9ca038b6d38aba7b87c6..bbfb7de3760f98812716159e84d996b379235bb6 100644 (file)
@@ -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
This page took 0.038628 seconds and 4 git commands to generate.