aboutsummaryrefslogtreecommitdiff
path: root/test/T850-git.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/T850-git.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/T850-git.sh')
-rwxr-xr-xtest/T850-git.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/T850-git.sh b/test/T850-git.sh
index be6e0cd4..831e4678 100755
--- a/test/T850-git.sh
+++ b/test/T850-git.sh
@@ -233,6 +233,7 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "invoke as nmbug sets defaults"
+test_subtest_broken_for_installed
"$NOTMUCH_BUILDDIR"/nmbug -ldebug status |& grep '^\(prefix\|repository\)' | notmuch_dir_sanitize > OUTPUT
cat <<EOF > EXPECTED
prefix = notmuch::
@@ -241,6 +242,7 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "env variable NOTMUCH_GIT_DIR works when invoked as nmbug"
+test_subtest_broken_for_installed
NOTMUCH_GIT_DIR=`pwd`/foo "$NOTMUCH_BUILDDIR"/nmbug -ldebug status |& grep '^repository' | notmuch_dir_sanitize > OUTPUT
cat <<EOF > EXPECTED
repository = CWD/foo
@@ -256,6 +258,7 @@ test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "env variable NOTMUCH_GIT_DIR overrides config when invoked as 'nmbug'"
+test_subtest_broken_for_installed
notmuch config set git.path `pwd`/bar
NOTMUCH_GIT_DIR=`pwd`/remote.git "$NOTMUCH_BUILDDIR"/nmbug -ldebug status |& grep '^repository' | notmuch_dir_sanitize > OUTPUT
notmuch config set git.path
@@ -274,6 +277,7 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "env variable NOTMUCH_GIT_PREFIX works when invoked as 'nmbug'"
+test_subtest_broken_for_installed
NOTMUCH_GIT_PREFIX=env:: "$NOTMUCH_BUILDDIR"/nmbug -ldebug status |& grep '^prefix' | notmuch_dir_sanitize > OUTPUT
cat <<EOF > EXPECTED
prefix = env::
@@ -281,6 +285,7 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "env variable NOTMUCH_GIT_PREFIX works when invoked as nmbug"
+test_subtest_broken_for_installed
NOTMUCH_GIT_PREFIX=foo:: "$NOTMUCH_BUILDDIR"/nmbug -ldebug status |& grep '^prefix' | notmuch_dir_sanitize > OUTPUT
cat <<EOF > EXPECTED
prefix = foo::
@@ -288,6 +293,7 @@ EOF
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "env variable NOTMUCH_GIT_PREFIX overrides config when invoked as 'nmbug'"
+test_subtest_broken_for_installed
notmuch config set git.tag_prefix config::
NOTMUCH_GIT_PREFIX=env:: "$NOTMUCH_BUILDDIR"/nmbug -ldebug status |& grep '^prefix' | notmuch_dir_sanitize > OUTPUT
notmuch config set git.path