aboutsummaryrefslogtreecommitdiff
path: root/test/T395-ruby.sh
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2023-04-09 11:26:26 -0300
committerDavid Bremner <david@tethera.net>2023-07-21 07:41:50 -0300
commitec26eeaeec87781dee7dbf720103a5bc9b6bba5d (patch)
tree421ad3947e7c06066663f3e53a3c41af5605057f /test/T395-ruby.sh
parent73f3081160fb80345f3953cbdeba340975375325 (diff)
test: support testing notmuch as installed
We put some effort into testing the built copy rather than some installed copy. On the other hand for people like packagers, testing the installed copy is also of interest. When NOTMUCH_TEST_INSTALLED is set to a nonempty value, tests do not require a built notmuch tree or running configure. Some of the tests marked as broken when running against installed notmuch are probably fixable.
Diffstat (limited to 'test/T395-ruby.sh')
-rwxr-xr-xtest/T395-ruby.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/T395-ruby.sh b/test/T395-ruby.sh
index c066c842..d0c6bb17 100755
--- a/test/T395-ruby.sh
+++ b/test/T395-ruby.sh
@@ -2,7 +2,7 @@
test_description="ruby bindings"
. $(dirname "$0")/test-lib.sh || exit 1
-if [ "${NOTMUCH_HAVE_RUBY_DEV}" = "0" ]; then
+if [ -z "${NOTMUCH_TEST_INSTALLED-}" -a "${NOTMUCH_HAVE_RUBY_DEV-0}" = "0" ]; then
test_subtest_missing_external_prereq_["ruby development files"]=t
fi
@@ -15,7 +15,11 @@ test_ruby() {
db = Notmuch::Database.new()
EOF
cat
- ) | $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby"> OUTPUT
+ ) | if [ -n "${NOTMUCH_TEST_INSTALLED-}" ]; then
+ ruby
+ else
+ $NOTMUCH_RUBY -I "$NOTMUCH_BUILDDIR/bindings/ruby"
+ fi> OUTPUT
test_expect_equal_file EXPECTED OUTPUT
}