[PATCH] test: fix test_require_external_prereq gdb in insert test

Jani Nikula jani at nikula.org
Tue Oct 28 10:52:34 PDT 2014


You need to actually check the return value. Limit the missing deps
part to subtests requiring gdb.
---
 test/T070-insert.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/test/T070-insert.sh b/test/T070-insert.sh
index 168345c9897b..b21609833228 100755
--- a/test/T070-insert.sh
+++ b/test/T070-insert.sh
@@ -2,8 +2,6 @@
 test_description='"notmuch insert"'
 . ./test-lib.sh
 
-test_require_external_prereq gdb
-
 # Create directories and database before inserting.
 mkdir -p "$MAIL_DIR"/{cur,new,tmp}
 mkdir -p "$MAIL_DIR"/Drafts/{cur,new,tmp}
@@ -185,6 +183,8 @@ test_expect_code 1 "Invalid tags set exit code" \
 
 notmuch config set new.tags $OLDCONFIG
 
+if test_require_external_prereq gdb; then
+
 # DUPLICATE_MESSAGE_ID is not tested here, because it should actually pass.
 
 for code in OUT_OF_MEMORY XAPIAN_EXCEPTION FILE_NOT_EMAIL \
@@ -211,4 +211,6 @@ gdb --batch-silent --return-child-result -x index-file-$code.gdb \
 test_expect_equal $? 0
 done
 
+fi # gdb
+
 test_done
-- 
2.1.1



More information about the notmuch mailing list