Skip to content

Commit bda6e45

Browse files
committed
test: Bump expect's match_max to 20000 by default
Some of our tests result in quite a bit of output (more than the expect default of 2000 bytes), and we may not have no good, generally applicable way to reduce it in all cases.
1 parent d45f902 commit bda6e45

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

test/lib/library.exp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,10 +1043,11 @@ proc start_interactive_test {} {
10431043
init_bash_xtrace
10441044
}
10451045
global OPT_BUFFER_SIZE
1046-
if {[info exists OPT_BUFFER_SIZE]} {
1047-
verbose "Changing default expect match buffer size to $OPT_BUFFER_SIZE"
1048-
match_max $OPT_BUFFER_SIZE
1046+
if {![info exists OPT_BUFFER_SIZE]} {
1047+
set OPT_BUFFER_SIZE 20000
10491048
}
1049+
verbose "Changing default expect match buffer size to $OPT_BUFFER_SIZE"
1050+
match_max $OPT_BUFFER_SIZE
10501051
global OPT_TIMEOUT
10511052
if {[info exists OPT_TIMEOUT]} {
10521053
global timeout

test/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ usage() {
1010
echo
1111
echo "Interesting options:"
1212
echo " --tool_exec= Test against a different bash executable."
13-
echo " --buffer_size Change expect match buffer size from the default of 2000 bytes."
13+
echo " --buffer_size Change expect match buffer size from our default of 20000 bytes."
1414
echo " --debug Create a dbg.log in the test directory with detailed expect match information."
1515
echo " --timeout Change expect timeout from the default of 10 seconds."
1616
echo " --debug-xtrace Create an xtrace.log in the test directory with set -x output."

0 commit comments

Comments
 (0)