* Mark test "error message from query_search_messages" (T060-count.sh) to require GDB @ 2020-04-05 8:38 Milton Vandersloot 2021-08-02 19:18 ` [PATCH 1/2] test/count: mark subtests needing gdb David Bremner 0 siblings, 1 reply; 3+ messages in thread From: Milton Vandersloot @ 2020-04-05 8:38 UTC (permalink / raw) To: notmuch@notmuchmail.org Dear notmuch Developers The test "error message from query_search_messages" in test/T060-count.sh needs GDB as external dependency but does not advocate so. Below a sed script adding the requirement. I have used ${TEST_GDB} here as this is the expression used in test/test-lib.sh at the end. However, the test code base also has occurrences of "test_require_external_prereq gdb" (use grep or similar to find those). I don't know which is the correct form but they should probably be unified. Regards Milton # Mark tests properly which need GDB sed -e "/test_begin_subtest [\"']error message from query_search_messages[\"']/ a test_require_external_prereq \\\${TEST_GDB}" \ -i test/T060-count.sh || die ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] test/count: mark subtests needing gdb. 2020-04-05 8:38 Mark test "error message from query_search_messages" (T060-count.sh) to require GDB Milton Vandersloot @ 2021-08-02 19:18 ` David Bremner 2021-08-02 19:18 ` [PATCH 2/2] test/atomicity: use ${TEST_GDB} in prereq test David Bremner 0 siblings, 1 reply; 3+ messages in thread From: David Bremner @ 2021-08-02 19:18 UTC (permalink / raw) To: Milton Vandersloot, notmuch@notmuchmail.org; +Cc: David Bremner The tests will otherwise fail if gdb is not installed. Thanks to Milton Vandersloot for pointing out the problem [1]: id:ztMWvyn1Vw0FloPT7NYTkFoY9Fm1Ez4YgMfYh99Te-Y6yXRtAXuEIfVrodhRKDSxjg-zOJa_RTQ68AtSbSO-ESla5BFLfG7sw5RTGRhEQwI=@protonmail.com --- test/T060-count.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/T060-count.sh b/test/T060-count.sh index a1ebf8ba..a1557e33 100755 --- a/test/T060-count.sh +++ b/test/T060-count.sh @@ -95,6 +95,7 @@ test_expect_equal_file EXPECTED OUTPUT backup_database test_begin_subtest "error message for database open" +test_require_external_prereq ${TEST_GDB} target=(${MAIL_DIR}/.notmuch/xapian/postlist.*) dd if=/dev/zero of="$target" count=3 notmuch count '*' 2>OUTPUT 1>/dev/null @@ -116,6 +117,7 @@ EOF backup_database test_begin_subtest "error message from query_search_messages" +test_require_external_prereq ${TEST_GDB} ${TEST_GDB} --batch-silent --return-child-result -x count-files.gdb \ --args notmuch count --output=files '*' 2>OUTPUT 1>/dev/null cat <<EOF > EXPECTED -- 2.30.2 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] test/atomicity: use ${TEST_GDB} in prereq test. 2021-08-02 19:18 ` [PATCH 1/2] test/count: mark subtests needing gdb David Bremner @ 2021-08-02 19:18 ` David Bremner 0 siblings, 0 replies; 3+ messages in thread From: David Bremner @ 2021-08-02 19:18 UTC (permalink / raw) To: Milton Vandersloot, notmuch@notmuchmail.org; +Cc: David Bremner The other occurrence of gdb was replaced in 95efe2d4, so we should be consistent. --- test/T380-atomicity.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/T380-atomicity.sh b/test/T380-atomicity.sh index afe49d93..6495381f 100755 --- a/test/T380-atomicity.sh +++ b/test/T380-atomicity.sh @@ -7,7 +7,7 @@ test_description='atomicity' # final database contents should be the same regardless of when (or # if) it is killed and restarted. -if test_require_external_prereq gdb; then +if test_require_external_prereq ${TEST_GDB}; then # Create a maildir structure to also stress flag synchronization mkdir $MAIL_DIR/cur -- 2.30.2 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-02 19:19 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-04-05 8:38 Mark test "error message from query_search_messages" (T060-count.sh) to require GDB Milton Vandersloot 2021-08-02 19:18 ` [PATCH 1/2] test/count: mark subtests needing gdb David Bremner 2021-08-02 19:18 ` [PATCH 2/2] test/atomicity: use ${TEST_GDB} in prereq test David Bremner
Code repositories for project(s) associated with this public inbox https://yhetil.org/notmuch.git/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).