CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
102 lines
2.9 KiB
Plaintext
102 lines
2.9 KiB
Plaintext
# Copyright 2023-2024 Free Software Foundation, Inc.
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# Test TUI resizing using maint screen info command.
|
|
|
|
require allow_tui_tests
|
|
|
|
tuiterm_env
|
|
|
|
Term::clean_restart 24 80
|
|
set screen_dim { 0 0 80 24 }
|
|
|
|
# Use a layout with just a command window.
|
|
gdb_test "tui new-layout command-layout cmd 1"
|
|
|
|
if {![Term::prepare_for_tui]} {
|
|
unsupported "TUI not supported"
|
|
return 0
|
|
}
|
|
|
|
# Enter TUI.
|
|
Term::command_no_prompt_prefix "layout command-layout"
|
|
|
|
proc check_width { what n } {
|
|
set re "Number of characters $what thinks are in a line is $n"
|
|
Term::check_region_contents "$what width $n" {*}$::screen_dim $re
|
|
}
|
|
|
|
# Check that curses has the correct notion of screen width.
|
|
Term::command "maint info screen"
|
|
check_width curses 80
|
|
check_width gdb 80
|
|
|
|
# Resize with TUI enabled, wait for the resize message.
|
|
Term::resize 40 90
|
|
set screen_dim { 0 0 90 40 }
|
|
|
|
# Check that curses has the correct notion of screen width after resize.
|
|
Term::command "maint info screen"
|
|
check_width curses 90
|
|
check_width gdb 90
|
|
|
|
# Temporarily disable TUI.
|
|
gdb_test_multiple "tui disable" "" {
|
|
-re "$gdb_prompt $" {
|
|
pass $gdb_test_name
|
|
}
|
|
}
|
|
|
|
# Resize with TUI disabled, so don't wait for the resize message. Instead,
|
|
# do it in two steps, and wait for a prompt redisplay for each. If we do
|
|
# this in one step, it's unpredictable how may prompt redisplays we'll get.
|
|
Term::resize 24 90 0
|
|
set screen_dim { 0 0 90 24 }
|
|
|
|
gdb_test_multiple "" "prompt redisplays after first resize" {
|
|
-re "\r.*$gdb_prompt $" {
|
|
pass $gdb_test_name
|
|
}
|
|
}
|
|
|
|
Term::resize 24 80 0
|
|
set screen_dim { 0 0 80 24 }
|
|
|
|
gdb_test_multiple "" "prompt redisplays after second resize" {
|
|
-re "\r.*$gdb_prompt $" {
|
|
pass $gdb_test_name
|
|
}
|
|
}
|
|
|
|
# At this point, curses still thinks the width is 90. This doesn't look
|
|
# harmful because TUI is disabled.
|
|
gdb_test "maint info screen" \
|
|
"\r\nNumber of characters curses thinks are in a line is 90.\\r\n.*" \
|
|
"curses width after resize with TUI disabled"
|
|
|
|
# Re-enable TUI.
|
|
send_gdb "tui enable\n"
|
|
# The "tui enable" command is issued on the CLI screen, on the TUI we have the
|
|
# last command issued there: "tui disable".
|
|
Term::wait_for "tui disable"
|
|
|
|
# Check that curses has the correct notion of screen width after screen resize
|
|
# with TUI disabled.
|
|
Term::command "maint info screen"
|
|
with_test_prefix again {
|
|
check_width curses 80
|
|
check_width gdb 80
|
|
}
|