]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Handle missing curses in gdb.python/py-missing-debug.exp
authorTom de Vries <tdevries@suse.de>
Sun, 8 Sep 2024 05:46:09 +0000 (07:46 +0200)
committerTom de Vries <tdevries@suse.de>
Sun, 8 Sep 2024 05:46:09 +0000 (07:46 +0200)
commit29c70787112e01cd52b53bf14bdcacb0a11e0725
treed821c7a177e6892dbb0a111cca2f6af5532ec462
parent7e4f57dc1bb29588b87fd38fcc5d9afd28eefeb0
[gdb/testsuite] Handle missing curses in gdb.python/py-missing-debug.exp

On a system with python 3.6, module gdb.missing_debug imports module curses,
so when running test-case gdb.python/py-missing-debug.exp on a system without
that module installed, we run into:
...
(gdb) source py-missing-debug.py^M
Python Exception <class 'ImportError'>: Module 'curses' is not installed.^M
Use:^M
  sudo zypper install python36-curses^M
to install it.^M
Error occurred in Python: Module 'curses' is not installed.^M
Use:^M
  sudo zypper install python36-curses^M
to install it.^M
(gdb) FAIL: gdb.python/py-missing-debug.exp: source python script
...

Fix this by issuing UNSUPPORTED instead, and bailing out.

Tested on x86_64-linux.

Approved-by: Kevin Buettner <kevinb@redhat.com>
PR testsuite/31576
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31576
gdb/testsuite/gdb.python/py-missing-debug.exp