X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT380-atomicity.sh;h=0f9e6d2e2bc4169127304d75669adabf2f557e2f;hp=1c786fa2724262dad40cc9f7b883b6269586bc1d;hb=2707c06a0fc587a68096a3ec6f054ba4f0d7e7c7;hpb=957fc2e1a7d00636c7eaaf487edae65e7a63dc8f diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh index 1c786fa2..0f9e6d2e 100755 --- a/test/T380-atomicity.sh +++ b/test/T380-atomicity.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash test_description='atomicity' -. ./test-lib.sh +. $(dirname "$0")/test-lib.sh || exit 1 # This script tests the effects of killing and restarting "notmuch # new" at arbitrary points. If notmuch new is properly atomic, the @@ -64,15 +64,15 @@ 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 - gdb -tty /dev/null -batch -x $TEST_DIRECTORY/atomicity.gdb notmuch >/dev/null 2>/dev/null + ${TEST_GDB} -tty /dev/null -batch -x $NOTMUCH_SRCDIR/test/atomicity.py notmuch 1>gdb.out 2>&1 # Get the final, golden output - notmuch search '*' > expected + notmuch search '*' 2>/dev/null > expected # Check output against golden output outcount=$(cat outcount) - echo -n > searchall - echo -n > expectall + : > searchall + : > expectall for ((i = 0; i < $outcount; i++)); do if ! cmp -s search.$i expected; then # Find the range of interruptions that match this output @@ -95,6 +95,7 @@ fi test_begin_subtest '"notmuch new" is idempotent under arbitrary aborts' test_expect_equal_file searchall expectall -test_expect_success "detected $outcount>10 abort points" "test $outcount -gt 10" +test_begin_subtest "detected $outcount>10 abort points" +test_expect_success "test $outcount -gt 10" test_done