From 470d9225eebb631f677ef18b7d56e6d03f1946a2 Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Thu, 13 Oct 2022 06:04:25 +0200 Subject: [PATCH] ts: skip basheu tests on bash 5.2 bash -eu test of install testsuite are skipped on new version of bash (5.2) as internal messages currently appear when using module function with -eu options on this version. A bug as been submitted to the bash developers: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00073.html --- testsuite/install.00-init/005-init_ts.exp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/testsuite/install.00-init/005-init_ts.exp b/testsuite/install.00-init/005-init_ts.exp index d680a0d2..2b53ee42 100644 --- a/testsuite/install.00-init/005-init_ts.exp +++ b/testsuite/install.00-init/005-init_ts.exp @@ -65,6 +65,14 @@ if {$sh_kind eq "dash" || ($tcl_platform(os) ne "Linux"\ } send_user "\tsh_strict is '$sh_strict'\n" +# grab bash shell version +set bashbin [find_bin bash] +if {$bashbin ne {}} { + set bash_version [exec $bashbin -c {echo $BASH_VERSION}] + set bash_version_is52 [string match 5.2.* $bash_version] + send_user "\tbash_version_is52 is '$bash_version_is52'\n" +} + # check SIP is enabled or not on OS X if {$tcl_platform(os) eq "Darwin"} { catch { @@ -101,6 +109,10 @@ array set shell_path {} array set shell_opts {} array set shell_test {} foreach shell [list sh bash basheu ksh zsh csh tcsh fish tcl perl python ruby cmake r] { + if {$shell eq {basheu} && $bash_version_is52} { + send_user "\t'basheu' shell tests ignored on Bash 5.2\n" + continue + } switch -- $shell { tcl { set shellbin $install_tclsh