Skip to content

Commit

Permalink
Version 4.6.2: Tests do not write soft failures to stderr
Browse files Browse the repository at this point in the history
Writing to stderr causes autopkgtest to fail the test.
  • Loading branch information
Stephen Gildea committed Jan 14, 2022
1 parent b401d89 commit 75932cc
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ History
Where applicable, changes are attributed to the people who submitted
the ideas and, in many cases, patches and source code.

* Version 4.6.2 (14 Jan 2022)
+ Developers: Tests do not write soft failures to stderr

* Version 4.6.1 (13 Jan 2022)
+ Maildir format for local mailbox is supported by mailbox-preview.
+ mailbox-preview has other minor improvements.
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([xlbiff], [4.6.1], [[email protected]])
AC_INIT([xlbiff], [4.6.2], [[email protected]])
AM_INIT_AUTOMAKE(foreign)
AM_MAINTAINER_MODE(enable)
AC_PROG_CC
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
xlbiff (4.6.2-1) unstable; urgency=low

* Developers: Tests do not write soft failures to stderr

-- Stephen Gildea <[email protected]> Fri, 14 Jan 2022 12:01:13 -0800

xlbiff (4.6.1-1) unstable; urgency=low

* Maildir format for local mailbox is supported by mailbox-preview.
Expand Down
20 changes: 13 additions & 7 deletions tests/utilities.sh
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ util_client_has_connected() {
xwininfo -root -children 2>&1 | grep -E -q -i "$util_window_name_pattern"
}

# append to the log and to stdout.
# prepend the messages with program name and time.
util_log() {
VERBOSE=1 util_logv "$@"
}

# append to the log, and if verbose to stdout.
# prepend the messages with program name and time.
util_logv() {
Expand Down Expand Up @@ -236,7 +242,7 @@ end_test_with_status() {
echo "$0: end_test_with_status called outside a test" >&2
fi
if [[ "$pass_fail" = pass ]]; then
echo "$0: Passed: $current_test_name"
util_log "Passed: $current_test_name"
((num_tests_passed++))
else
echo "$0: FAILED: $current_test_name" >&2
Expand All @@ -260,11 +266,11 @@ loop_for() {
local -i loops_done=0
while sleep 0.1; do
if ((++loops_done > loop_count)); then
echo "$0 $(date +'%H:%M:%S.%3N') timed out" \
util_log "timed out" \
"after $loop_count tries waiting for $success_function" \
"in test $current_test_name $context_msg" >&2
xauth -v -i -n list >&2
xwininfo -root -tree >&2
"in test $current_test_name $context_msg"
util_log "$(xauth -v -i -n list)"
util_log "$(xwininfo -root -tree)"
kill_xvfb
[[ -n "$return_on_failure" ]] && return 1
exit 1
Expand All @@ -277,9 +283,9 @@ loop_for() {
break
fi
if [[ "$child_alive" = 0 ]]; then
echo "$0: child process has died on try $loops_done/$loop_count" \
util_log "child process has died on try $loops_done/$loop_count" \
"waiting for $success_function" \
"in test $current_test_name $context_msg" >&2
"in test $current_test_name $context_msg"
[[ -n "$return_on_failure" ]] && return 1
exit 1
fi
Expand Down

0 comments on commit 75932cc

Please sign in to comment.