diff options
author | Jani Nikula <jani@nikula.org> | 2014-05-30 10:43:05 +0300 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2014-07-13 12:16:06 -0300 |
commit | c2d8236b56e713ae2e7053c9ea3cc13f7d1283c4 (patch) | |
tree | 9341aa5a8b67fb757c9aca34a3e377b5e5694803 | |
parent | 57540a1952460fe88817ad53dc32274543cf0514 (diff) |
test: use sh.config for configuration
-rw-r--r-- | test/.gitignore | 2 | ||||
-rw-r--r-- | test/Makefile.local | 16 | ||||
-rwxr-xr-x | test/T010-help-test.sh | 2 | ||||
-rwxr-xr-x | test/T020-compact.sh | 2 | ||||
-rw-r--r-- | test/test-lib-common.sh | 4 |
5 files changed, 6 insertions, 20 deletions
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 () { |