]> git.notmuchmail.org Git - notmuch/commitdiff
test: define GMime version dependant breakage
authorDavid Bremner <david@tethera.net>
Sat, 27 May 2017 16:51:18 +0000 (13:51 -0300)
committerDavid Bremner <david@tethera.net>
Thu, 1 Jun 2017 00:54:08 +0000 (21:54 -0300)
We have some tests where the gmime 3 behaviour seems like a bug fix,
others where it's less clear, so we allow both possibilities.

configure
test/test-lib.sh

index 91aeba512e2279c67b063dec611a748b0e63eb28..c5e2ffed9e6705a9b16f5cf52f3c57235bc40044 100755 (executable)
--- a/configure
+++ b/configure
@@ -489,11 +489,13 @@ if pkg-config --exists "gmime-3.0"; then
     have_gmime=1
     gmime_cflags=$(pkg-config --cflags gmime-3.0)
     gmime_ldflags=$(pkg-config --libs gmime-3.0)
+    gmime_major=3
 elif pkg-config --exists "gmime-2.6 >= $GMIME_MINVER"; then
     printf "Yes (2.6).\n"
     have_gmime=1
     gmime_cflags=$(pkg-config --cflags gmime-2.6)
     gmime_ldflags=$(pkg-config --libs gmime-2.6)
+    gmime_major=2
 else
     have_gmime=0
     printf "No.\n"
@@ -1212,6 +1214,9 @@ NOTMUCH_PYTHON=${python}
 # building/testing ruby bindings.
 NOTMUCH_HAVE_RUBY_DEV=${have_ruby_dev}
 
+# Major version of gmime
+NOTMUCH_GMIME_MAJOR=${gmime_major}
+
 # Platform we are run on
 PLATFORM=${platform}
 EOF
index 37f8ddfa4f94ff02cfe294392604b0c08545aa32..7ae96c6999aaed84007b99e4e2a6c8a6beb754da 100644 (file)
@@ -1202,6 +1202,22 @@ test_init_ () {
 
 . ./test-lib-common.sh || exit 1
 
+if [ "${NOTMUCH_GMIME_MAJOR}" = 3 ]; then
+    test_subtest_broken_gmime_3 () {
+       test_subtest_known_broken
+    }
+    test_subtest_broken_gmime_2 () {
+       true
+    }
+else
+    test_subtest_broken_gmime_3 () {
+       true
+    }
+    test_subtest_broken_gmime_2 () {
+       test_subtest_known_broken
+    }
+fi
+
 emacs_generate_script