From: David Bremner Date: Wed, 22 Jul 2020 11:35:42 +0000 (-0300) Subject: test: sanitize line numbers in exception reports X-Git-Tag: 0.31_rc0~115 X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;ds=sidebyside;h=1a8060b81f2fbba324d4156f4733a7f1deb14d60;p=notmuch test: sanitize line numbers in exception reports Prevent test suite churn when reported line numbers change. --- 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 () {