[PATCH 4/4] test: set up the outcount file for T380.1

Subject: [PATCH 4/4] test: set up the outcount file for T380.1

Date: Wed, 9 Feb 2022 12:52:36 +0100

To: notmuch@notmuchmail.org


From: Michael J Gruber

If gdb is present but for some reason `atomicity.py` fails to write to
the output file then the test fails with some ugly bash errors in the
wrong places (because the outcount variable is empty).

Therefore, set up the outcount file with `0` to get the test script to
rund and the test to fail fpr a clearer reason.

Background: We noticed this with arch armhfp emulated on x86_64 in
Fedora's COPR test build environment.

Signed-off-by: Michael J Gruber <git@grubix.eu>
 test/T380-atomicity.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh
index 49df5c38..caac28a3 100755
--- a/test/T380-atomicity.sh
+++ b/test/T380-atomicity.sh
@@ -64,6 +64,7 @@ if test_require_external_prereq gdb; then
     # -tty /dev/null works around a conflict between the 'timeout' wrapper
     # and gdb's attempt to control the TTY.
     export MAIL_DIR
+    echo -n 0 > outcount
     ${TEST_GDB} -tty /dev/null -batch -x $NOTMUCH_SRCDIR/test/atomicity.py notmuch 1>gdb.out 2>&1
     # Get the final, golden output

notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org