+++ /dev/null
-#!/bin/bash
-
-test_description='notmuch new'
-
-. ./perf-test-lib.sh
-
-uncache_database
-
-time_start
-
-for i in $(seq 2 6); do
- time_run "notmuch new #$i" 'notmuch new'
-done
-
-time_done
+++ /dev/null
-#!/bin/bash
-
-test_description='dump and restore'
-
-. ./perf-test-lib.sh
-
-time_start
-
-time_run 'load nmbug tags' 'notmuch restore --accumulate < corpus.tags/nmbug.sup-dump'
-time_run 'dump *' 'notmuch dump > tags.out'
-time_run 'restore *' 'notmuch restore < tags.out'
-
-time_done
+++ /dev/null
-#!/bin/bash
-
-test_description='tagging'
-
-. ./perf-test-lib.sh
-
-time_start
-
-time_run 'tag * +new_tag' "notmuch tag +new_tag '*'"
-time_run 'tag * +existing_tag' "notmuch tag +new_tag '*'"
-time_run 'tag * -existing_tag' "notmuch tag -new_tag '*'"
-time_run 'tag * -missing_tag' "notmuch tag -new_tag '*'"
-
-time_done
TEST_SCRIPT := ${dir}/notmuch-perf-test
DEFAULT_URL := http://notmuchmail.org/releases/${CORPUS_NAME}
-perf-test: setup-perf-test all
+time-test: setup-perf-test all
$(TEST_SCRIPT) $(OPTIONS)
.PHONY: download-corpus setup-perf-test
Running tests
-------------
-The easiest way to run performance tests is to say "make perf-test", (or
-simply run the notmuch-perf-test script). Either command will run all
+The easiest way to run performance tests is to say "make time-test", (or
+simply run the notmuch-time-test script). Either command will run all
available performance tests.
Alternately, you can run a specific subset of tests by simply invoking
Writing tests
-------------
-Have a look at "01-dump-restore" for an example. Sourcing
+Have a look at "T01-dump-restore" for an example. Sourcing
"perf-test-lib.sh" is mandatory. Utility functions include
- 'add_email_corpus' unpacks a set of messages and adds them to the database.
Scripts are run in the order specified in notmuch-perf-test. In the
future this order might be chosen automatically so please follow the
-convention of starting the name with two digits to specify the order.
+convention of starting the name with 'T' followed by two digits to
+specify the order.
--- /dev/null
+#!/bin/bash
+
+test_description='notmuch new'
+
+. ./perf-test-lib.sh
+
+uncache_database
+
+time_start
+
+for i in $(seq 2 6); do
+ time_run "notmuch new #$i" 'notmuch new'
+done
+
+time_done
--- /dev/null
+#!/bin/bash
+
+test_description='dump and restore'
+
+. ./perf-test-lib.sh
+
+time_start
+
+time_run 'load nmbug tags' 'notmuch restore --accumulate < corpus.tags/nmbug.sup-dump'
+time_run 'dump *' 'notmuch dump > tags.out'
+time_run 'restore *' 'notmuch restore < tags.out'
+
+time_done
--- /dev/null
+#!/bin/bash
+
+test_description='tagging'
+
+. ./perf-test-lib.sh
+
+time_start
+
+time_run 'tag * +new_tag' "notmuch tag +new_tag '*'"
+time_run 'tag * +existing_tag' "notmuch tag +new_tag '*'"
+time_run 'tag * -existing_tag' "notmuch tag -new_tag '*'"
+time_run 'tag * -missing_tag' "notmuch tag -new_tag '*'"
+
+time_done
+++ /dev/null
-#!/usr/bin/env bash
-
-# Run tests
-#
-# Copyright (c) 2005 Junio C Hamano
-#
-# Adapted from a Makefile to a shell script by Carl Worth (2010)
-
-if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
- echo "Error: The notmuch test suite requires a bash version >= 4.0"
- echo "due to use of associative arrays within the test suite."
- echo "Please try again with a newer bash (or help us fix the"
- echo "test suite to be more portable). Thanks."
- exit 1
-fi
-
-cd $(dirname "$0")
-
-TESTS="
- 00-new
- 01-dump-restore
- 02-tag
-"
-
-for test in $TESTS; do
- ./$test "$@"
-done
--- /dev/null
+#!/usr/bin/env bash
+
+# Run tests
+#
+# Copyright (c) 2005 Junio C Hamano
+#
+# Adapted from a Makefile to a shell script by Carl Worth (2010)
+
+if [ ${BASH_VERSINFO[0]} -lt 4 ]; then
+ echo "Error: The notmuch test suite requires a bash version >= 4.0"
+ echo "due to use of associative arrays within the test suite."
+ echo "Please try again with a newer bash (or help us fix the"
+ echo "test suite to be more portable). Thanks."
+ exit 1
+fi
+
+cd $(dirname "$0")
+
+TESTS="
+ T00-new
+ T01-dump-restore
+ T02-tag
+"
+
+for test in $TESTS; do
+ ./$test "$@"
+done