From fd36ae9f514520e85d9e43d4aa08263b3a5a8d3e Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Mon, 25 Sep 2017 23:38:20 +0300 Subject: [PATCH] perf-test: use $(dirname "$0") for sourcing perf-test-lib.sh Don't assume the tests are always run from within the source tree. --- 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 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/performance-test/M00-new.sh b/performance-test/M00-new.sh index a040a97e..aab36e69 100755 --- a/performance-test/M00-new.sh +++ b/performance-test/M00-new.sh @@ -2,7 +2,7 @@ test_description='notmuch new' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 # ensure initial 'notmuch new' is run by memory_start uncache_database diff --git a/performance-test/M01-dump-restore.sh b/performance-test/M01-dump-restore.sh index 8fea9824..32ab8dc9 100755 --- a/performance-test/M01-dump-restore.sh +++ b/performance-test/M01-dump-restore.sh @@ -2,7 +2,7 @@ test_description='dump and restore' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 memory_start diff --git a/performance-test/M02-show.sh b/performance-test/M02-show.sh index d73035ea..2e218fd3 100755 --- a/performance-test/M02-show.sh +++ b/performance-test/M02-show.sh @@ -2,7 +2,7 @@ test_description='show' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 memory_start diff --git a/performance-test/M03-search.sh b/performance-test/M03-search.sh index 8d026eee..343f5c7c 100755 --- a/performance-test/M03-search.sh +++ b/performance-test/M03-search.sh @@ -2,7 +2,7 @@ test_description='search' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 memory_start diff --git a/performance-test/M04-reply.sh b/performance-test/M04-reply.sh index 0e1ce087..3c1205db 100755 --- a/performance-test/M04-reply.sh +++ b/performance-test/M04-reply.sh @@ -2,7 +2,7 @@ test_description='search' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 memory_start diff --git a/performance-test/M05-reindex.sh b/performance-test/M05-reindex.sh index d36e061b..17e2c824 100755 --- a/performance-test/M05-reindex.sh +++ b/performance-test/M05-reindex.sh @@ -2,7 +2,7 @@ test_description='reindex' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 memory_start diff --git a/performance-test/M06-insert.sh b/performance-test/M06-insert.sh index 9fcc2a0c..5ae0656a 100755 --- a/performance-test/M06-insert.sh +++ b/performance-test/M06-insert.sh @@ -2,7 +2,7 @@ test_description='search' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 memory_start diff --git a/performance-test/T00-new.sh b/performance-test/T00-new.sh index b9f21158..68750129 100755 --- a/performance-test/T00-new.sh +++ b/performance-test/T00-new.sh @@ -2,7 +2,7 @@ test_description='notmuch new' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 uncache_database diff --git a/performance-test/T01-dump-restore.sh b/performance-test/T01-dump-restore.sh index 9cfd5cd6..12f12e66 100755 --- a/performance-test/T01-dump-restore.sh +++ b/performance-test/T01-dump-restore.sh @@ -2,7 +2,7 @@ test_description='dump and restore' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 time_start diff --git a/performance-test/T02-tag.sh b/performance-test/T02-tag.sh index dacb50b8..8c5dfd68 100755 --- a/performance-test/T02-tag.sh +++ b/performance-test/T02-tag.sh @@ -2,7 +2,7 @@ test_description='tagging' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 time_start diff --git a/performance-test/T03-reindex.sh b/performance-test/T03-reindex.sh index 7af2d22d..d6d5c3c3 100755 --- a/performance-test/T03-reindex.sh +++ b/performance-test/T03-reindex.sh @@ -2,7 +2,7 @@ test_description='tagging' -. ./perf-test-lib.sh || exit 1 +. $(dirname "$0")/perf-test-lib.sh || exit 1 time_start