]> git.notmuchmail.org Git - notmuch/commitdiff
test: cleanup gdb external dependency in atomicity tests
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Thu, 1 Dec 2011 22:02:46 +0000 (02:02 +0400)
committerDavid Bremner <bremner@debian.org>
Sun, 11 Dec 2011 14:13:32 +0000 (10:13 -0400)
Change atomicity tests to use the new external binary dependencies.
This simplifies the code and makes output consistent.

test/atomicity

index ad7d4a3c59e7d5ace823c46ce95e774609d4773d..6df0a00e4084281c9b03027668ff2e0ca38bf15a 100755 (executable)
@@ -7,8 +7,7 @@ test_description='atomicity'
 # final database contents should be the same regardless of when (or
 # if) it is killed and restarted.
 
 # final database contents should be the same regardless of when (or
 # if) it is killed and restarted.
 
-if which gdb 1>/dev/null 2>&1; then
-    test_set_prereq GDB
+if test_require_external_prereq gdb; then
 
 # Create a maildir structure to also stress flag synchronization
     mkdir $MAIL_DIR/cur
 
 # Create a maildir structure to also stress flag synchronization
     mkdir $MAIL_DIR/cur
@@ -91,14 +90,11 @@ if which gdb 1>/dev/null 2>&1; then
            i=$(expr $end - 1)
        fi
     done
            i=$(expr $end - 1)
        fi
     done
-else
-    say_color info "%-6s" "WARNING"
-    echo " Missing test prerequisite GDB"
-fi  
+fi
 
 test_begin_subtest '"notmuch new" is idempotent under arbitrary aborts'
 
 test_begin_subtest '"notmuch new" is idempotent under arbitrary aborts'
-test_expect_equal_file GDB searchall expectall
+test_expect_equal_file searchall expectall
 
 
-test_expect_success GDB "detected $outcount>10 abort points" "test $outcount -gt 10"
+test_expect_success "detected $outcount>10 abort points" "test $outcount -gt 10"
 
 test_done
 
 test_done