unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] test: sanitize line numbers in exception reports
@ 2020-07-22 12:09 David Bremner
  2020-07-22 12:09 ` [PATCH 2/2] lib: fix exception messages for n_m_message_* David Bremner
  2020-07-23 10:11 ` [PATCH 1/2] test: sanitize line numbers in exception reports David Bremner
  0 siblings, 2 replies; 3+ messages in thread
From: David Bremner @ 2020-07-22 12:09 UTC (permalink / raw)
  To: notmuch; +Cc: David Bremner

Prevent test suite churn when reported line numbers change.
---
 test/test-lib.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/test-lib.sh b/test/test-lib.sh
index 7424881e..8c331b88 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -619,6 +619,11 @@ print(msg.as_string(False))
 ' "$@"
 }
 
+notmuch_exception_sanitize ()
+{
+    perl -pe 's/(A Xapian exception occurred at .*[.]cc?):([0-9]*)/\1:XXX/'
+}
+
 notmuch_search_sanitize ()
 {
     perl -pe 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/'
@@ -1093,7 +1098,7 @@ test_C () {
     echo "== stdout ==" > OUTPUT.stdout
     echo "== stderr ==" > OUTPUT.stderr
     ./${exec_file} "$@" 1>>OUTPUT.stdout 2>>OUTPUT.stderr
-    notmuch_dir_sanitize OUTPUT.stdout OUTPUT.stderr > OUTPUT
+    notmuch_dir_sanitize OUTPUT.stdout OUTPUT.stderr | notmuch_exception_sanitize > OUTPUT
 }
 
 make_shim () {
-- 
2.27.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-23 10:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 12:09 [PATCH 1/2] test: sanitize line numbers in exception reports David Bremner
2020-07-22 12:09 ` [PATCH 2/2] lib: fix exception messages for n_m_message_* David Bremner
2020-07-23 10:11 ` [PATCH 1/2] test: sanitize line numbers in exception reports 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).