[PATCH 00/24] test: separate source and build directories
Jani Nikula
jani at nikula.org
Mon Sep 25 13:38:16 PDT 2017
This lengthy but mostly mechanical series separates all source and build
directory references in the test framework to be able to properly build
and run out-of-tree tests. At the end, the 'cp -a' of the test directory
from source to build can be dropped.
The general idea is that you have current working directory anywhere
within the build directory hierarchy when you run tests, and you
reference the notmuch-test or individual test scripts within the source
directory hierarchy using relative or absolute paths. Or just run 'make
test' in the build directory as usual.
Patch 6 adds a script that figures out the directories, exports them as
environment variables NOTMUCH_SRCDIR and NOTMUCH_BUILDDIR, and those are
used througout the series. The existing TEST_DIRECTORY variable now
specifically means $NOTMUCH_BUILDDIR/test.
Some of the patches toward the end could have been squashed together,
but I thought it's faster and easier to review this way.
BR,
Jani.
Jani Nikula (24):
test: use corpora/default not corpus in T480-hex-escaping.sh
build: use NOTMUCH_SRCDIR for referencing notmuch-test
test: use $(dirname "$0") for sourcing test-lib.sh
perf-test: use $(dirname "$0") for sourcing perf-test-lib.sh
test: check for notmuch binary in test-lib.sh
test: add a script to figure out source and build directories
test: use source and build paths in test-lib.sh
perf-test: use source and build paths in perf-test-lib.sh
test: use source and build paths in test-lib-common.sh
test: mkdir and cd to $TMP_DIRECTORY instead of $test for testing
test: use source and build paths in notmuch-test
test: use source and build paths in T000-basic.sh
test: use source and build paths in T160-json.sh and T170-sexp.sh
test: use source and build paths in T260-thread-order.sh
test: use source and build paths in T310-emacs.sh
test: use source and build paths in T350-crypto.sh
test: use source and build paths in T355-smime.sh
test: use source and build paths in T360-symbol-hiding.sh
test: use source and build paths in T380-atomicity.sh
test: use source and build paths in T4?0-emacs-*.sh
test: use source and build paths in T480-hex-escaping.sh
test: use source and build paths in T590-thread-breakage.sh
build: don't copy the test directory for out-of-tree builds
devel: add script to test out-of-tree builds
configure | 4 ---
devel/out-of-tree-build-check.sh | 16 ++++++++++
performance-test/M00-new.sh | 2 +-
performance-test/M01-dump-restore.sh | 2 +-
performance-test/M02-show.sh | 2 +-
performance-test/M03-search.sh | 2 +-
performance-test/M04-reply.sh | 2 +-
performance-test/M05-reindex.sh | 2 +-
performance-test/M06-insert.sh | 2 +-
performance-test/T00-new.sh | 2 +-
performance-test/T01-dump-restore.sh | 2 +-
performance-test/T02-tag.sh | 2 +-
performance-test/T03-reindex.sh | 2 +-
performance-test/perf-test-lib.sh | 12 +++++---
test/Makefile.local | 6 ++--
test/T000-basic.sh | 18 +++--------
test/T010-help-test.sh | 2 +-
test/T020-compact.sh | 2 +-
test/T030-config.sh | 2 +-
test/T040-setup.sh | 2 +-
test/T050-new.sh | 2 +-
test/T060-count.sh | 2 +-
test/T070-insert.sh | 2 +-
test/T080-search.sh | 2 +-
test/T090-search-output.sh | 2 +-
test/T095-address.sh | 2 +-
test/T100-search-by-folder.sh | 2 +-
test/T110-search-position-overlap-bug.sh | 2 +-
test/T120-search-insufficient-from-quoting.sh | 2 +-
test/T130-search-limiting.sh | 2 +-
test/T140-excludes.sh | 2 +-
test/T150-tagging.sh | 2 +-
test/T160-json.sh | 6 ++--
test/T170-sexp.sh | 6 ++--
test/T180-text.sh | 2 +-
test/T190-multipart.sh | 2 +-
test/T200-thread-naming.sh | 2 +-
test/T205-author-naming.sh | 2 +-
test/T210-raw.sh | 2 +-
test/T220-reply.sh | 2 +-
test/T230-reply-to-sender.sh | 2 +-
test/T240-dump-restore.sh | 2 +-
test/T250-uuencode.sh | 2 +-
test/T260-thread-order.sh | 4 +--
test/T270-author-order.sh | 2 +-
test/T280-from-guessing.sh | 2 +-
test/T290-long-id.sh | 2 +-
test/T300-encoding.sh | 2 +-
test/T310-emacs.sh | 6 ++--
test/T320-emacs-large-search-buffer.sh | 2 +-
test/T330-emacs-subject-to-filename.sh | 2 +-
test/T340-maildir-sync.sh | 2 +-
test/T350-crypto.sh | 4 +--
test/T355-smime.sh | 10 +++---
test/T360-symbol-hiding.sh | 6 ++--
test/T370-search-folder-coherence.sh | 2 +-
test/T380-atomicity.sh | 4 +--
test/T390-python.sh | 2 +-
test/T395-ruby.sh | 2 +-
test/T400-hooks.sh | 2 +-
test/T410-argument-parsing.sh | 2 +-
test/T420-emacs-test-functions.sh | 2 +-
test/T430-emacs-address-cleaning.sh | 2 +-
test/T440-emacs-hello.sh | 4 +--
test/T450-emacs-show.sh | 4 +--
test/T455-emacs-charsets.sh | 2 +-
test/T460-emacs-tree.sh | 4 +--
test/T470-missing-headers.sh | 2 +-
test/T480-hex-escaping.sh | 6 ++--
test/T490-parse-time-string.sh | 2 +-
test/T500-search-date.sh | 2 +-
test/T510-thread-replies.sh | 2 +-
test/T520-show.sh | 2 +-
test/T530-upgrade.sh | 2 +-
test/T550-db-features.sh | 2 +-
test/T560-lib-error.sh | 2 +-
test/T570-revision-tracking.sh | 2 +-
test/T580-thread-search.sh | 2 +-
test/T590-libconfig.sh | 2 +-
test/T590-thread-breakage.sh | 6 ++--
test/T600-named-queries.sh | 2 +-
test/T610-message-property.sh | 2 +-
test/T620-lock.sh | 2 +-
test/T630-emacs-draft.sh | 2 +-
test/T640-database-modified.sh | 2 +-
test/T650-regexp-query.sh | 2 +-
test/T660-bad-date.sh | 2 +-
test/T670-duplicate-mid.sh | 2 +-
test/T680-html-indexing.sh | 2 +-
test/T690-command-line-args.sh | 2 +-
test/T700-reindex.sh | 2 +-
test/export-dirs.sh | 32 +++++++++++++++++++
test/notmuch-test | 23 +++++++++-----
test/test-lib-common.sh | 44 +++++++++------------------
test/test-lib.sh | 27 ++++++++++------
test/test-verbose | 2 +-
96 files changed, 221 insertions(+), 179 deletions(-)
create mode 100755 devel/out-of-tree-build-check.sh
create mode 100644 test/export-dirs.sh
--
2.11.0
More information about the notmuch
mailing list