From: Jani Nikula Date: Fri, 30 May 2014 07:43:05 +0000 (+0300) Subject: test: use sh.config for configuration X-Git-Tag: 0.19_rc1~144 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=c2d8236b56e713ae2e7053c9ea3cc13f7d1283c4 test: use sh.config for configuration --- diff --git a/test/.gitignore b/test/.gitignore index 4081cee6..b3b706d8 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -1,7 +1,5 @@ arg-test corpus.mail -have-compact -have-man hex-xcode parse-time random-corpus diff --git a/test/Makefile.local b/test/Makefile.local index d622eafe..1c85b18a 100644 --- a/test/Makefile.local +++ b/test/Makefile.local @@ -35,25 +35,9 @@ $(dir)/symbol-test: $(dir)/symbol-test.o lib/$(LINKER_NAME) $(dir)/parse-time: $(dir)/parse-time.o parse-time-string/parse-time-string.o $(call quiet,CC) $^ -o $@ -$(dir)/have-compact: Makefile.config -ifeq ($(HAVE_XAPIAN_COMPACT),1) - ln -sf /bin/true $@ -else - ln -sf /bin/false $@ -endif - -$(dir)/have-man: Makefile.config -ifeq ($(HAVE_SPHINX)$(HAVE_RST2MAN),00) - ln -sf /bin/false $@ -else - ln -sf /bin/true $@ -endif - .PHONY: test check TEST_BINARIES=$(dir)/arg-test \ - $(dir)/have-compact \ - $(dir)/have-man \ $(dir)/hex-xcode \ $(dir)/random-corpus \ $(dir)/parse-time \ diff --git a/test/T010-help-test.sh b/test/T010-help-test.sh index 77410bc5..caf8bdb0 100755 --- a/test/T010-help-test.sh +++ b/test/T010-help-test.sh @@ -7,7 +7,7 @@ test_expect_success 'notmuch --help' 'notmuch --help' test_expect_success 'notmuch help' 'notmuch help' test_expect_success 'notmuch --version' 'notmuch --version' -if ${TEST_DIRECTORY}/have-man; then +if [ $NOTMUCH_HAVE_MAN -eq 1 ]; then test_expect_success 'notmuch --help tag' 'notmuch --help tag' test_expect_success 'notmuch help tag' 'notmuch help tag' else diff --git a/test/T020-compact.sh b/test/T020-compact.sh index 77bb9632..507f7698 100755 --- a/test/T020-compact.sh +++ b/test/T020-compact.sh @@ -10,7 +10,7 @@ notmuch tag +tag1 \* notmuch tag +tag2 subject:Two notmuch tag -tag1 +tag3 subject:Three -if ! ${TEST_DIRECTORY}/have-compact; then +if [ $NOTMUCH_HAVE_XAPIAN_COMPACT -eq 0 ]; then test_begin_subtest "Compact unsupported: error message" output=$(notmuch compact --quiet 2>&1) test_expect_equal "$output" "notmuch was compiled against a xapian version lacking compaction support. diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh index 892991e2..4903038d 100644 --- a/test/test-lib-common.sh +++ b/test/test-lib-common.sh @@ -38,6 +38,10 @@ find_notmuch_path () # test/ subdirectory and are run in 'trash directory' subdirectory. TEST_DIRECTORY=$(pwd) notmuch_path=`find_notmuch_path "$TEST_DIRECTORY"` + +# configure output +. $notmuch_path/sh.config + if test -n "$valgrind" then make_symlink () {