From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 4E5116DE096A for ; Mon, 25 Sep 2017 13:38:49 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.06 X-Spam-Level: X-Spam-Status: No, score=-0.06 tagged_above=-999 required=5 tests=[AWL=0.151, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.211] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lra2L52MhYR6 for ; Mon, 25 Sep 2017 13:38:47 -0700 (PDT) Received: from mail-wr0-f182.google.com (mail-wr0-f182.google.com [209.85.128.182]) by arlo.cworth.org (Postfix) with ESMTPS id E4AA36DE0352 for ; Mon, 25 Sep 2017 13:38:46 -0700 (PDT) Received: by mail-wr0-f182.google.com with SMTP id v109so9976678wrc.1 for ; Mon, 25 Sep 2017 13:38:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nikula-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=/2LGp4SuXqXYMenpMEBm18ir3RNMf52iiYkDCQYrGK8=; b=hFGcxKlvoL92x1tNAqvAbZ8eDh0BzbEo3eHBJWZUiRv59VNe8AZ4WgkUWZO00Ylf+8 BZD9jDJxCqvg/2HTbmuJKM/OODzlJmTwDYwjIXOYAmuvlDnCoJAKW5O8s3TvVEK2CxLR F2HSGcd+ntxxShAzX0cugl0EDWN/qU/ZBYYh9NCi6SwAmH4aEBKjE4AdMno68S9oZnnu cK4pB8qeBxC/YEGWgDuE1R3aDmYZX29WWZuvjhGQMZcfh//9YhShdRFW89jyBminBQkP CLFXBD9xrcjCjuzyJ8aj8WJJWQFD2a0RmHGbZs1l8DhEXoV1zk8pL4eW1lR4ijD8jFIW PlBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/2LGp4SuXqXYMenpMEBm18ir3RNMf52iiYkDCQYrGK8=; b=FBX/k8XuZA8R9MrGffdf1U++h85Xno4ZUIhNT1wvezUJFpycplFkxuLmqPWywPBRH7 0b2LmQRBcGrTHUxD9rPRiwg6Tz6wwb+QpR+jOATvuk9YLLt+qM6xwEoMG5MVGWkF7diQ LTD4ioWMUvKpjwPmyAWd+gt1zWw0hYqvBXr9j6DNrhMt+kBFCiERZQXILXQ9l+VZllIA z4/TD5hsQG21PrDLELstX/j604lRgxr04Dbd11WxKpKV7MAHjDJYmmRVxCgpG3FJh5yc VgSQgn3Jcv1Z9M6neqZASWVBc6J4lvZ1u2FPoA6DGU6ROfDAOH3Al2dVLcXv6yqWQM6e Gq1g== X-Gm-Message-State: AHPjjUhN/ZgiGGiLrp3oiQZ6B76V3k+6KZ3EFi+fvV1di2L4C15GH7aO 20aAHZeny0hoRmqoXWOR0tb1vXOEcZo= X-Google-Smtp-Source: AOwi7QAGlGnk24bIH/kd3RoDy4JyNzZy29ztCGRnTIuYKR90yLfEeC9LdmuVhiC5r+DssLhp9+Szxg== X-Received: by 10.46.89.220 with SMTP id g89mr3388070ljf.12.1506371924543; Mon, 25 Sep 2017 13:38:44 -0700 (PDT) Received: from localhost (mobile-access-5d6a60-234.dhcp.inet.fi. [93.106.96.234]) by smtp.gmail.com with ESMTPSA id q190sm1118072lfe.51.2017.09.25.13.38.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Sep 2017 13:38:43 -0700 (PDT) From: Jani Nikula To: notmuch@notmuchmail.org Subject: [PATCH 00/24] test: separate source and build directories Date: Mon, 25 Sep 2017 23:38:16 +0300 Message-Id: X-Mailer: git-send-email 2.11.0 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Sep 2017 20:38:49 -0000 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