unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] test: unbreak performance tests
@ 2017-12-02 13:29 David Bremner
  2017-12-03 12:56 ` Tomi Ollila
  2017-12-05  1:09 ` David Bremner
  0 siblings, 2 replies; 3+ messages in thread
From: David Bremner @ 2017-12-02 13:29 UTC (permalink / raw)
  To: notmuch

In 8e7fb88237aedea22 Jani replaced the use of $(pwd -P) to find the
TEST_DIRECTORY in order to better support out of tree
builds. Unfortunately the performance-tests need a different value for
the variable and were thus broken.

This commit splits out the setting of this variable for the two sets
of tests.  Performance tests still don't work out of tree, because
the handling of the downloaded corpus needs to be updated.
---
 performance-test/perf-test-lib.sh | 3 +++
 test/test-lib-common.sh           | 4 ----
 test/test-lib.sh                  | 3 +++
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh
index 56538abd..b70288cc 100644
--- a/performance-test/perf-test-lib.sh
+++ b/performance-test/perf-test-lib.sh
@@ -29,6 +29,9 @@ done
 # Ensure NOTMUCH_SRCDIR and NOTMUCH_BUILDDIR are set.
 . $(dirname "$0")/../test/export-dirs.sh || exit 1
 
+# Where to run the tests
+TEST_DIRECTORY=$NOTMUCH_BUILDDIR/performance-test
+
 . "$NOTMUCH_SRCDIR/test/test-lib-common.sh" || exit 1
 
 set -e
diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh
index 6c3571d4..2f7950ac 100644
--- a/test/test-lib-common.sh
+++ b/test/test-lib-common.sh
@@ -41,10 +41,6 @@ restore_database () {
     cp -pR $TMP_DIRECTORY/notmuch-dir-backup."${test_name}" ${MAIL_DIR}/.notmuch
 }
 
-# Test the binaries we have just built.  The tests are kept in
-# test/ subdirectory and are run in 'trash directory' subdirectory.
-TEST_DIRECTORY=$NOTMUCH_BUILDDIR/test
-
 # Prepend $TEST_DIRECTORY/../lib to LD_LIBRARY_PATH, to make tests work
 # on systems where ../notmuch depends on LD_LIBRARY_PATH.
 LD_LIBRARY_PATH=${TEST_DIRECTORY%/*}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 42a45f15..4c8607a1 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -1066,6 +1066,9 @@ test_init_ () {
 }
 
 
+# Where to run the tests
+TEST_DIRECTORY=$NOTMUCH_BUILDDIR/test
+
 . "$NOTMUCH_SRCDIR/test/test-lib-common.sh" || exit 1
 
 if [ "${NOTMUCH_GMIME_MAJOR}" = 3 ]; then
-- 
2.15.0

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

* Re: [PATCH] test: unbreak performance tests
  2017-12-02 13:29 [PATCH] test: unbreak performance tests David Bremner
@ 2017-12-03 12:56 ` Tomi Ollila
  2017-12-05  1:09 ` David Bremner
  1 sibling, 0 replies; 3+ messages in thread
From: Tomi Ollila @ 2017-12-03 12:56 UTC (permalink / raw)
  To: David Bremner, notmuch

On Sat, Dec 02 2017, David Bremner wrote:

> In 8e7fb88237aedea22 Jani replaced the use of $(pwd -P) to find the
> TEST_DIRECTORY in order to better support out of tree
> builds. Unfortunately the performance-tests need a different value for
> the variable and were thus broken.
>
> This commit splits out the setting of this variable for the two sets
> of tests.  Performance tests still don't work out of tree, because
> the handling of the downloaded corpus needs to be updated.

Change fine by me.

Tomi

> ---
>  performance-test/perf-test-lib.sh | 3 +++
>  test/test-lib-common.sh           | 4 ----
>  test/test-lib.sh                  | 3 +++
>  3 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh
> index 56538abd..b70288cc 100644
> --- a/performance-test/perf-test-lib.sh
> +++ b/performance-test/perf-test-lib.sh
> @@ -29,6 +29,9 @@ done
>  # Ensure NOTMUCH_SRCDIR and NOTMUCH_BUILDDIR are set.
>  . $(dirname "$0")/../test/export-dirs.sh || exit 1
>  
> +# Where to run the tests
> +TEST_DIRECTORY=$NOTMUCH_BUILDDIR/performance-test
> +
>  . "$NOTMUCH_SRCDIR/test/test-lib-common.sh" || exit 1
>  
>  set -e
> diff --git a/test/test-lib-common.sh b/test/test-lib-common.sh
> index 6c3571d4..2f7950ac 100644
> --- a/test/test-lib-common.sh
> +++ b/test/test-lib-common.sh
> @@ -41,10 +41,6 @@ restore_database () {
>      cp -pR $TMP_DIRECTORY/notmuch-dir-backup."${test_name}" ${MAIL_DIR}/.notmuch
>  }
>  
> -# Test the binaries we have just built.  The tests are kept in
> -# test/ subdirectory and are run in 'trash directory' subdirectory.
> -TEST_DIRECTORY=$NOTMUCH_BUILDDIR/test
> -
>  # Prepend $TEST_DIRECTORY/../lib to LD_LIBRARY_PATH, to make tests work
>  # on systems where ../notmuch depends on LD_LIBRARY_PATH.
>  LD_LIBRARY_PATH=${TEST_DIRECTORY%/*}/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
> diff --git a/test/test-lib.sh b/test/test-lib.sh
> index 42a45f15..4c8607a1 100644
> --- a/test/test-lib.sh
> +++ b/test/test-lib.sh
> @@ -1066,6 +1066,9 @@ test_init_ () {
>  }
>  
>  
> +# Where to run the tests
> +TEST_DIRECTORY=$NOTMUCH_BUILDDIR/test
> +
>  . "$NOTMUCH_SRCDIR/test/test-lib-common.sh" || exit 1
>  
>  if [ "${NOTMUCH_GMIME_MAJOR}" = 3 ]; then
> -- 
> 2.15.0

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

* Re: [PATCH] test: unbreak performance tests
  2017-12-02 13:29 [PATCH] test: unbreak performance tests David Bremner
  2017-12-03 12:56 ` Tomi Ollila
@ 2017-12-05  1:09 ` David Bremner
  1 sibling, 0 replies; 3+ messages in thread
From: David Bremner @ 2017-12-05  1:09 UTC (permalink / raw)
  To: notmuch

David Bremner <david@tethera.net> writes:

> In 8e7fb88237aedea22 Jani replaced the use of $(pwd -P) to find the
> TEST_DIRECTORY in order to better support out of tree
> builds. Unfortunately the performance-tests need a different value for
> the variable and were thus broken.
>
> This commit splits out the setting of this variable for the two sets
> of tests.  Performance tests still don't work out of tree, because
> the handling of the downloaded corpus needs to be updated.

pushed,

d

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

end of thread, other threads:[~2017-12-05  1:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-02 13:29 [PATCH] test: unbreak performance tests David Bremner
2017-12-03 12:56 ` Tomi Ollila
2017-12-05  1:09 ` 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).