From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: Notmuch Mail <notmuch@notmuchmail.org>
Subject: [PATCH v4 1/7] test: add test-binary to print the number of ghost messages
Date: Fri, 8 Apr 2016 22:54:46 -0300 [thread overview]
Message-ID: <1460166892-29721-1-git-send-email-dkg@fifthhorseman.net> (raw)
In-Reply-To: <1459445693-3900-1-git-send-email-dkg@fifthhorseman.net>
From: David Bremner <david@tethera.net>
This one-liner seems preferable to the complications of depending on
delve, getting the binary name right and parsing the output.
---
test/Makefile.local | 4 ++++
test/ghost-report.cc | 12 ++++++++++++
2 files changed, 16 insertions(+)
create mode 100644 test/ghost-report.cc
diff --git a/test/Makefile.local b/test/Makefile.local
index 30d420e..022f2cf 100644
--- a/test/Makefile.local
+++ b/test/Makefile.local
@@ -38,6 +38,9 @@ $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o
$(dir)/make-db-version: $(dir)/make-db-version.o
$(call quiet,CXX) $^ -o $@ $(LDFLAGS) $(XAPIAN_LDFLAGS)
+$(dir)/ghost-report: $(dir)/ghost-report.o
+ $(call quiet,CXX) $^ -o $@ $(LDFLAGS) $(XAPIAN_LDFLAGS)
+
.PHONY: test check
test_main_srcs=$(dir)/arg-test.c \
@@ -47,6 +50,7 @@ test_main_srcs=$(dir)/arg-test.c \
$(dir)/smtp-dummy.c \
$(dir)/symbol-test.cc \
$(dir)/make-db-version.cc \
+ $(dir)/ghost-report.cc
test_srcs=$(test_main_srcs) $(dir)/database-test.c
diff --git a/test/ghost-report.cc b/test/ghost-report.cc
new file mode 100644
index 0000000..1739be4
--- /dev/null
+++ b/test/ghost-report.cc
@@ -0,0 +1,12 @@
+#include <iostream>
+#include <xapian.h>
+
+int main(int argc, char **argv) {
+
+ if (argc < 2) {
+ std::cerr << "usage: ghost-report xapian-dir" << std::endl;
+ }
+
+ Xapian::Database db(argv[1]);
+ std::cout << db.get_termfreq("Tghost") << std::endl;
+}
--
2.8.0.rc3
next prev parent reply other threads:[~2016-04-09 1:55 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-31 17:34 [PATCH] test thread breakage when messages are removed and re-added Daniel Kahn Gillmor
2016-04-01 22:27 ` Daniel Kahn Gillmor
2016-04-01 23:31 ` [PATCH 1/2] verify during thread-breakage that messages are removed as well Daniel Kahn Gillmor
2016-04-01 23:31 ` [PATCH 2/2] fix thread breakage via ghost-on-removal Daniel Kahn Gillmor
2016-04-02 14:15 ` [PATCH v2 1/7] test thread breakage when messages are removed and re-added Daniel Kahn Gillmor
2016-04-02 14:15 ` [PATCH v2 2/7] verify during thread-breakage that messages are removed as well Daniel Kahn Gillmor
2016-04-06 1:20 ` David Bremner
2016-04-09 1:54 ` Daniel Kahn Gillmor
2016-04-02 14:15 ` [PATCH v2 3/7] fix thread breakage via ghost-on-removal Daniel Kahn Gillmor
2016-04-05 6:53 ` Tomi Ollila
2016-04-05 20:05 ` Daniel Kahn Gillmor
2016-04-05 23:33 ` David Bremner
2016-04-06 1:39 ` David Bremner
2016-04-02 14:15 ` [PATCH v2 4/7] Add internal functions to search for alternate doc types Daniel Kahn Gillmor
2016-04-06 1:52 ` David Bremner
2016-04-02 14:15 ` [PATCH v2 5/7] Introduce _notmuch_message_has_term() Daniel Kahn Gillmor
2016-04-06 2:04 ` David Bremner
2016-04-02 14:15 ` [PATCH v2 6/7] On deletion, replace with ghost when other active messages in thread Daniel Kahn Gillmor
2016-04-02 14:15 ` [PATCH v2 7/7] complete ghost-on-removal-when-shared-thread-exists Daniel Kahn Gillmor
2016-04-02 16:19 ` [PATCH 1/2] test thread breakage when messages are removed and re-added David Bremner
2016-04-02 16:19 ` [PATCH 2/2] test: add test-binary to print the number of ghost messages David Bremner
2016-04-09 1:02 ` [PATCH v3 1/7] " Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 2/7] test thread breakage when messages are removed and re-added Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 3/7] fix thread breakage via ghost-on-removal Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 4/7] Add internal functions to search for alternate doc types Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 5/7] Introduce _notmuch_message_has_term() Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 6/7] On deletion, replace with ghost when other active messages in thread Daniel Kahn Gillmor
2016-04-09 1:02 ` [PATCH v3 7/7] complete ghost-on-removal-when-shared-thread-exists Daniel Kahn Gillmor
2016-04-09 1:54 ` Daniel Kahn Gillmor [this message]
2016-04-09 1:54 ` [PATCH v4 2/7] test thread breakage when messages are removed and re-added Daniel Kahn Gillmor
2016-04-11 13:59 ` [PATCH] remove debugging spew from T590 Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 3/7] fix thread breakage via ghost-on-removal Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 4/7] Add internal functions to search for alternate doc types Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 5/7] Introduce _notmuch_message_has_term() Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 6/7] On deletion, replace with ghost when other active messages in thread Daniel Kahn Gillmor
2016-04-09 1:54 ` [PATCH v4 7/7] complete ghost-on-removal-when-shared-thread-exists Daniel Kahn Gillmor
2016-04-09 11:31 ` David Bremner
2016-04-09 18:55 ` Daniel Kahn Gillmor
2016-04-09 19:15 ` David Bremner
2016-04-10 8:35 ` Tomi Ollila
2016-04-11 0:33 ` David Bremner
2016-04-11 19:18 ` Daniel Kahn Gillmor
2016-04-12 1:28 ` David Bremner
2016-04-15 10:29 ` David Bremner
2016-04-20 3:36 ` Austin Clements
2016-04-09 11:02 ` [PATCH v4 1/7] test: add test-binary to print the number of ghost messages David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1460166892-29721-1-git-send-email-dkg@fifthhorseman.net \
--to=dkg@fifthhorseman.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).