test: make atomicity setup conditional on gdb being present.

The setup is useless if gdb is not present, so it doesn't hurt to skip
it.  The diff here is huge, but the commit is really just moving most
of the script inside the initial if, and adding an else block to print
a warning.
This commit is contained in:
David Bremner 2011-09-24 22:45:33 -03:00
parent 0ce713ae02
commit c468f3703e

View file

@ -7,9 +7,8 @@ test_description='atomicity'
# final database contents should be the same regardless of when (or
# if) it is killed and restarted.
if test_expect_success "prereq: GDB is present" "which gdb"; then
if which gdb; then
test_set_prereq GDB
fi
# Create a maildir structure to also stress flag synchronization
mkdir $MAIL_DIR/cur
@ -92,6 +91,10 @@ for ((i = 0; i < $outcount; i++)); do
i=$(expr $end - 1)
fi
done
else
say_color info "%-6s" "WARNING"
echo " Missing test prerequisite GDB"
fi
test_begin_subtest '"notmuch new" is idempotent under arbitrary aborts'
test_expect_equal_file GDB searchall expectall