unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 00/24] test: separate source and build directories
@ 2017-09-25 20:38 Jani Nikula
  2017-09-25 20:38 ` [PATCH 01/24] test: use corpora/default not corpus in T480-hex-escaping.sh Jani Nikula
                   ` (24 more replies)
  0 siblings, 25 replies; 36+ messages in thread
From: Jani Nikula @ 2017-09-25 20:38 UTC (permalink / raw)
  To: notmuch

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

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2017-10-22 14:07 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-25 20:38 [PATCH 00/24] test: separate source and build directories Jani Nikula
2017-09-25 20:38 ` [PATCH 01/24] test: use corpora/default not corpus in T480-hex-escaping.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 02/24] build: use NOTMUCH_SRCDIR for referencing notmuch-test Jani Nikula
2017-09-25 20:38 ` [PATCH 03/24] test: use $(dirname "$0") for sourcing test-lib.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 04/24] perf-test: use $(dirname "$0") for sourcing perf-test-lib.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 05/24] test: check for notmuch binary in test-lib.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 06/24] test: add a script to figure out source and build directories Jani Nikula
2017-09-25 20:38 ` [PATCH 07/24] test: use source and build paths in test-lib.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 08/24] perf-test: use source and build paths in perf-test-lib.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 09/24] test: use source and build paths in test-lib-common.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 10/24] test: mkdir and cd to $TMP_DIRECTORY instead of $test for testing Jani Nikula
2017-09-25 20:38 ` [PATCH 11/24] test: use source and build paths in notmuch-test Jani Nikula
2017-09-25 20:38 ` [PATCH 12/24] test: use source and build paths in T000-basic.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 13/24] test: use source and build paths in T160-json.sh and T170-sexp.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 14/24] test: use source and build paths in T260-thread-order.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 15/24] test: use source and build paths in T310-emacs.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 16/24] test: use source and build paths in T350-crypto.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 17/24] test: use source and build paths in T355-smime.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 18/24] test: use source and build paths in T360-symbol-hiding.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 19/24] test: use source and build paths in T380-atomicity.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 20/24] test: use source and build paths in T4?0-emacs-*.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 21/24] test: use source and build paths in T480-hex-escaping.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 22/24] test: use source and build paths in T590-thread-breakage.sh Jani Nikula
2017-09-25 20:38 ` [PATCH 23/24] build: don't copy the test directory for out-of-tree builds Jani Nikula
2017-09-25 20:38 ` [PATCH 24/24] devel: add script to test " Jani Nikula
2017-09-26  5:28   ` Tomi Ollila
2017-09-26  5:32     ` Tomi Ollila
2017-10-21  2:33 ` [PATCH 00/24] test: separate source and build directories David Bremner
2017-10-21 11:58   ` [PATCH] test: remove --root option and fix TMP_DIRECTORY cleanup Jani Nikula
2017-10-21 12:02     ` Jani Nikula
2017-10-21 15:02     ` David Bremner
2017-10-21 19:21       ` [PATCH v2] test: use source path in add_gnupg_home Jani Nikula
2017-10-21 19:31       ` [PATCH] test: remove --root option and fix TMP_DIRECTORY cleanup Jani Nikula
2017-10-21 19:53         ` [PATCH] NEWS: test suite out-of-tree builds Jani Nikula
2017-10-22 14:07           ` David Bremner
2017-10-21 20:44         ` [PATCH] test: remove --root option and fix TMP_DIRECTORY cleanup David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).