From: Tom de Vries Date: Mon, 4 Aug 2025 18:49:04 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.base/style.exp on freebsd X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a53192ade999c939f495b9654a04ba4583018815;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix gdb.base/style.exp on freebsd On x86_64-freebsd, with test-case gdb.base/style.exp I run into: ... (gdb) print $_colorsupport $1 = "monochrome" (gdb) FAIL: $exp: colorsupport_8color: color support is 8 color ... Fix this by applying the same fix as for tuiterm: use TERM=ansiw instead of TERM=ansi for bsd, getting us instead: ... (gdb) print $_colorsupport $1 = "monochrome,ansi_8color" (gdb) PASS: $exp: colorsupport_8color: color support is 8 color ... Tested on x86_64-freebsd. --- diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 8d94d6b81af..0a582aac354 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -10430,7 +10430,11 @@ proc with_override { name override body } { proc with_ansi_styling_terminal { body } { save_vars { ::env(TERM) ::env(NO_COLOR) ::env(COLORTERM) } { # Set environment variables to allow styling. - setenv TERM ansi + if { [ishost *-*-*bsd*] } { + setenv TERM ansiw + } else { + setenv TERM ansi + } unset -nocomplain ::env(NO_COLOR) unset -nocomplain ::env(COLORTERM)