[gdb/testsuite] Two fixes in gdb.python/tui-window-disabled.exp
I ran test-case gdb.python/tui-window-disabled.exp on a configuration without python support, and ran into: ... PASS: $exp: cleanup_properly=True: initial restart: set pagination off UNSUPPORTED: $exp: cleanup_properly=True: couldn't restart GDB PASS: $exp: cleanup_properly=False: initial restart: set pagination off UNSUPPORTED: $exp: cleanup_properly=False: couldn't restart GDB ... After looking into the test-case, I realized that this is a consequence of !allow_python_tests. Handle this instead by requiring allow_python_tests, such that we get the usual and more clear: ... UNSUPPORTED: $exp: require failed: allow_python_tests ... Also fix a return without value in clean_restart_and_setup, which if triggered would cause: ... ERROR: expected boolean value but got "" ... Tested on x86_64-linux.
This commit is contained in:
parent
fa1c74b22a
commit
1571765654
1 changed files with 2 additions and 5 deletions
|
@ -22,7 +22,7 @@
|
|||
# though the tui should be disabled.
|
||||
|
||||
load_lib gdb-python.exp
|
||||
require allow_tui_tests
|
||||
require allow_tui_tests allow_python_tests
|
||||
tuiterm_env
|
||||
|
||||
standard_testfile
|
||||
|
@ -49,9 +49,6 @@ proc clean_restart_and_setup { prefix } {
|
|||
|
||||
Term::clean_restart 24 80 $testfile
|
||||
|
||||
# Skip all tests if Python scripting is not enabled.
|
||||
if { ![allow_python_tests] } { return 0 }
|
||||
|
||||
# Now source the python script.
|
||||
gdb_test_no_output "source ${remote_python_file}" \
|
||||
"source ${testfile}.py"
|
||||
|
@ -64,7 +61,7 @@ proc clean_restart_and_setup { prefix } {
|
|||
|
||||
if {![runto_main]} {
|
||||
perror "test suppressed"
|
||||
return
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue