[PATCH 2/2] test: renamed test scripts to format T\d\d\d-name.sh
Tomi Ollila
tomi.ollila at iki.fi
Thu Jan 9 07:18:59 PST 2014
All test scripts to be executed are now named as T\d\d\d-name.sh,
numers in increments of 10.
This eases adding new tests and developers to see which are test scripts
that are executed by test suite and in which order.
---
Renaming was done using (beware! bash syntax ;):
c=0
for f in $TESTS
do
printf -v name "T%03d-%s.sh" $c $f;
git mv $f $name
c=$((c + 10))
done
and git format-patch -M HEAD^^ was used to create this patch set.
No reordering was done to the test set. I can do that in case Someone(TM)
provides me ${TESTS} in desired order
I plan to write 'rename-tests' script which can be used to rename tests
in current order to have 10 -increments again (first testing that all
T*.sh files to be rennamed are in git and then that there is no duplicate
names (or something), but that is done after these changes are approved...
test/{basic => T000-basic.sh} | 0
test/{help-test => T010-help-test.sh} | 0
test/{compact => T020-compact.sh} | 0
test/{config => T030-config.sh} | 0
test/{setup => T040-setup.sh} | 0
test/{new => T050-new.sh} | 0
test/{count => T060-count.sh} | 0
test/{insert => T070-insert.sh} | 0
test/{search => T080-search.sh} | 0
test/{search-output => T090-search-output.sh} | 0
.../{search-by-folder => T100-search-by-folder.sh} | 0
...lap-bug => T110-search-position-overlap-bug.sh} | 0
...ng => T120-search-insufficient-from-quoting.sh} | 0
test/{search-limiting => T130-search-limiting.sh} | 0
test/{excludes => T140-excludes.sh} | 0
test/{tagging => T150-tagging.sh} | 0
test/{json => T160-json.sh} | 0
test/{sexp => T170-sexp.sh} | 0
test/{text => T180-text.sh} | 0
test/{multipart => T190-multipart.sh} | 0
test/{thread-naming => T200-thread-naming.sh} | 0
test/{raw => T210-raw.sh} | 0
test/{reply => T220-reply.sh} | 0
test/{reply-to-sender => T230-reply-to-sender.sh} | 0
test/{dump-restore => T240-dump-restore.sh} | 0
test/{uuencode => T250-uuencode.sh} | 0
test/{thread-order => T260-thread-order.sh} | 0
test/{author-order => T270-author-order.sh} | 0
test/{from-guessing => T280-from-guessing.sh} | 0
test/{long-id => T290-long-id.sh} | 0
test/{encoding => T300-encoding.sh} | 0
test/{emacs => T310-emacs.sh} | 0
...ch-buffer => T320-emacs-large-search-buffer.sh} | 0
...-filename => T330-emacs-subject-to-filename.sh} | 0
test/{maildir-sync => T340-maildir-sync.sh} | 0
test/{crypto => T350-crypto.sh} | 0
test/{symbol-hiding => T360-symbol-hiding.sh} | 0
...r-coherence => T370-search-folder-coherence.sh} | 0
test/{atomicity => T380-atomicity.sh} | 0
test/{python => T390-python.sh} | 0
test/{hooks => T400-hooks.sh} | 0
.../{argument-parsing => T410-argument-parsing.sh} | 0
...test-functions => T420-emacs-test-functions.sh} | 0
...ess-cleaning => T430-emacs-address-cleaning.sh} | 0
test/{emacs-hello => T440-emacs-hello.sh} | 0
test/{emacs-show => T450-emacs-show.sh} | 0
test/{emacs-tree => T460-emacs-tree.sh} | 0
test/{missing-headers => T470-missing-headers.sh} | 0
test/{hex-escaping => T480-hex-escaping.sh} | 0
...parse-time-string => T490-parse-time-string.sh} | 0
test/{search-date => T500-search-date.sh} | 0
test/{thread-replies => T510-thread-replies.sh} | 0
test/notmuch-test | 56 +---------------------
test/test-lib.sh | 1 +
54 files changed, 2 insertions(+), 55 deletions(-)
rename test/{basic => T000-basic.sh} (100%)
rename test/{help-test => T010-help-test.sh} (100%)
rename test/{compact => T020-compact.sh} (100%)
rename test/{config => T030-config.sh} (100%)
rename test/{setup => T040-setup.sh} (100%)
rename test/{new => T050-new.sh} (100%)
rename test/{count => T060-count.sh} (100%)
rename test/{insert => T070-insert.sh} (100%)
rename test/{search => T080-search.sh} (100%)
rename test/{search-output => T090-search-output.sh} (100%)
rename test/{search-by-folder => T100-search-by-folder.sh} (100%)
rename test/{search-position-overlap-bug => T110-search-position-overlap-bug.sh} (100%)
rename test/{search-insufficient-from-quoting => T120-search-insufficient-from-quoting.sh} (100%)
rename test/{search-limiting => T130-search-limiting.sh} (100%)
rename test/{excludes => T140-excludes.sh} (100%)
rename test/{tagging => T150-tagging.sh} (100%)
rename test/{json => T160-json.sh} (100%)
rename test/{sexp => T170-sexp.sh} (100%)
rename test/{text => T180-text.sh} (100%)
rename test/{multipart => T190-multipart.sh} (100%)
rename test/{thread-naming => T200-thread-naming.sh} (100%)
rename test/{raw => T210-raw.sh} (100%)
rename test/{reply => T220-reply.sh} (100%)
rename test/{reply-to-sender => T230-reply-to-sender.sh} (100%)
rename test/{dump-restore => T240-dump-restore.sh} (100%)
rename test/{uuencode => T250-uuencode.sh} (100%)
rename test/{thread-order => T260-thread-order.sh} (100%)
rename test/{author-order => T270-author-order.sh} (100%)
rename test/{from-guessing => T280-from-guessing.sh} (100%)
rename test/{long-id => T290-long-id.sh} (100%)
rename test/{encoding => T300-encoding.sh} (100%)
rename test/{emacs => T310-emacs.sh} (100%)
rename test/{emacs-large-search-buffer => T320-emacs-large-search-buffer.sh} (100%)
rename test/{emacs-subject-to-filename => T330-emacs-subject-to-filename.sh} (100%)
rename test/{maildir-sync => T340-maildir-sync.sh} (100%)
rename test/{crypto => T350-crypto.sh} (100%)
rename test/{symbol-hiding => T360-symbol-hiding.sh} (100%)
rename test/{search-folder-coherence => T370-search-folder-coherence.sh} (100%)
rename test/{atomicity => T380-atomicity.sh} (100%)
rename test/{python => T390-python.sh} (100%)
rename test/{hooks => T400-hooks.sh} (100%)
rename test/{argument-parsing => T410-argument-parsing.sh} (100%)
rename test/{emacs-test-functions => T420-emacs-test-functions.sh} (100%)
rename test/{emacs-address-cleaning => T430-emacs-address-cleaning.sh} (100%)
rename test/{emacs-hello => T440-emacs-hello.sh} (100%)
rename test/{emacs-show => T450-emacs-show.sh} (100%)
rename test/{emacs-tree => T460-emacs-tree.sh} (100%)
rename test/{missing-headers => T470-missing-headers.sh} (100%)
rename test/{hex-escaping => T480-hex-escaping.sh} (100%)
rename test/{parse-time-string => T490-parse-time-string.sh} (100%)
rename test/{search-date => T500-search-date.sh} (100%)
rename test/{thread-replies => T510-thread-replies.sh} (100%)
diff --git a/test/basic b/test/T000-basic.sh
similarity index 100%
rename from test/basic
rename to test/T000-basic.sh
diff --git a/test/help-test b/test/T010-help-test.sh
similarity index 100%
rename from test/help-test
rename to test/T010-help-test.sh
diff --git a/test/compact b/test/T020-compact.sh
similarity index 100%
rename from test/compact
rename to test/T020-compact.sh
diff --git a/test/config b/test/T030-config.sh
similarity index 100%
rename from test/config
rename to test/T030-config.sh
diff --git a/test/setup b/test/T040-setup.sh
similarity index 100%
rename from test/setup
rename to test/T040-setup.sh
diff --git a/test/new b/test/T050-new.sh
similarity index 100%
rename from test/new
rename to test/T050-new.sh
diff --git a/test/count b/test/T060-count.sh
similarity index 100%
rename from test/count
rename to test/T060-count.sh
diff --git a/test/insert b/test/T070-insert.sh
similarity index 100%
rename from test/insert
rename to test/T070-insert.sh
diff --git a/test/search b/test/T080-search.sh
similarity index 100%
rename from test/search
rename to test/T080-search.sh
diff --git a/test/search-output b/test/T090-search-output.sh
similarity index 100%
rename from test/search-output
rename to test/T090-search-output.sh
diff --git a/test/search-by-folder b/test/T100-search-by-folder.sh
similarity index 100%
rename from test/search-by-folder
rename to test/T100-search-by-folder.sh
diff --git a/test/search-position-overlap-bug b/test/T110-search-position-overlap-bug.sh
similarity index 100%
rename from test/search-position-overlap-bug
rename to test/T110-search-position-overlap-bug.sh
diff --git a/test/search-insufficient-from-quoting b/test/T120-search-insufficient-from-quoting.sh
similarity index 100%
rename from test/search-insufficient-from-quoting
rename to test/T120-search-insufficient-from-quoting.sh
diff --git a/test/search-limiting b/test/T130-search-limiting.sh
similarity index 100%
rename from test/search-limiting
rename to test/T130-search-limiting.sh
diff --git a/test/excludes b/test/T140-excludes.sh
similarity index 100%
rename from test/excludes
rename to test/T140-excludes.sh
diff --git a/test/tagging b/test/T150-tagging.sh
similarity index 100%
rename from test/tagging
rename to test/T150-tagging.sh
diff --git a/test/json b/test/T160-json.sh
similarity index 100%
rename from test/json
rename to test/T160-json.sh
diff --git a/test/sexp b/test/T170-sexp.sh
similarity index 100%
rename from test/sexp
rename to test/T170-sexp.sh
diff --git a/test/text b/test/T180-text.sh
similarity index 100%
rename from test/text
rename to test/T180-text.sh
diff --git a/test/multipart b/test/T190-multipart.sh
similarity index 100%
rename from test/multipart
rename to test/T190-multipart.sh
diff --git a/test/thread-naming b/test/T200-thread-naming.sh
similarity index 100%
rename from test/thread-naming
rename to test/T200-thread-naming.sh
diff --git a/test/raw b/test/T210-raw.sh
similarity index 100%
rename from test/raw
rename to test/T210-raw.sh
diff --git a/test/reply b/test/T220-reply.sh
similarity index 100%
rename from test/reply
rename to test/T220-reply.sh
diff --git a/test/reply-to-sender b/test/T230-reply-to-sender.sh
similarity index 100%
rename from test/reply-to-sender
rename to test/T230-reply-to-sender.sh
diff --git a/test/dump-restore b/test/T240-dump-restore.sh
similarity index 100%
rename from test/dump-restore
rename to test/T240-dump-restore.sh
diff --git a/test/uuencode b/test/T250-uuencode.sh
similarity index 100%
rename from test/uuencode
rename to test/T250-uuencode.sh
diff --git a/test/thread-order b/test/T260-thread-order.sh
similarity index 100%
rename from test/thread-order
rename to test/T260-thread-order.sh
diff --git a/test/author-order b/test/T270-author-order.sh
similarity index 100%
rename from test/author-order
rename to test/T270-author-order.sh
diff --git a/test/from-guessing b/test/T280-from-guessing.sh
similarity index 100%
rename from test/from-guessing
rename to test/T280-from-guessing.sh
diff --git a/test/long-id b/test/T290-long-id.sh
similarity index 100%
rename from test/long-id
rename to test/T290-long-id.sh
diff --git a/test/encoding b/test/T300-encoding.sh
similarity index 100%
rename from test/encoding
rename to test/T300-encoding.sh
diff --git a/test/emacs b/test/T310-emacs.sh
similarity index 100%
rename from test/emacs
rename to test/T310-emacs.sh
diff --git a/test/emacs-large-search-buffer b/test/T320-emacs-large-search-buffer.sh
similarity index 100%
rename from test/emacs-large-search-buffer
rename to test/T320-emacs-large-search-buffer.sh
diff --git a/test/emacs-subject-to-filename b/test/T330-emacs-subject-to-filename.sh
similarity index 100%
rename from test/emacs-subject-to-filename
rename to test/T330-emacs-subject-to-filename.sh
diff --git a/test/maildir-sync b/test/T340-maildir-sync.sh
similarity index 100%
rename from test/maildir-sync
rename to test/T340-maildir-sync.sh
diff --git a/test/crypto b/test/T350-crypto.sh
similarity index 100%
rename from test/crypto
rename to test/T350-crypto.sh
diff --git a/test/symbol-hiding b/test/T360-symbol-hiding.sh
similarity index 100%
rename from test/symbol-hiding
rename to test/T360-symbol-hiding.sh
diff --git a/test/search-folder-coherence b/test/T370-search-folder-coherence.sh
similarity index 100%
rename from test/search-folder-coherence
rename to test/T370-search-folder-coherence.sh
diff --git a/test/atomicity b/test/T380-atomicity.sh
similarity index 100%
rename from test/atomicity
rename to test/T380-atomicity.sh
diff --git a/test/python b/test/T390-python.sh
similarity index 100%
rename from test/python
rename to test/T390-python.sh
diff --git a/test/hooks b/test/T400-hooks.sh
similarity index 100%
rename from test/hooks
rename to test/T400-hooks.sh
diff --git a/test/argument-parsing b/test/T410-argument-parsing.sh
similarity index 100%
rename from test/argument-parsing
rename to test/T410-argument-parsing.sh
diff --git a/test/emacs-test-functions b/test/T420-emacs-test-functions.sh
similarity index 100%
rename from test/emacs-test-functions
rename to test/T420-emacs-test-functions.sh
diff --git a/test/emacs-address-cleaning b/test/T430-emacs-address-cleaning.sh
similarity index 100%
rename from test/emacs-address-cleaning
rename to test/T430-emacs-address-cleaning.sh
diff --git a/test/emacs-hello b/test/T440-emacs-hello.sh
similarity index 100%
rename from test/emacs-hello
rename to test/T440-emacs-hello.sh
diff --git a/test/emacs-show b/test/T450-emacs-show.sh
similarity index 100%
rename from test/emacs-show
rename to test/T450-emacs-show.sh
diff --git a/test/emacs-tree b/test/T460-emacs-tree.sh
similarity index 100%
rename from test/emacs-tree
rename to test/T460-emacs-tree.sh
diff --git a/test/missing-headers b/test/T470-missing-headers.sh
similarity index 100%
rename from test/missing-headers
rename to test/T470-missing-headers.sh
diff --git a/test/hex-escaping b/test/T480-hex-escaping.sh
similarity index 100%
rename from test/hex-escaping
rename to test/T480-hex-escaping.sh
diff --git a/test/parse-time-string b/test/T490-parse-time-string.sh
similarity index 100%
rename from test/parse-time-string
rename to test/T490-parse-time-string.sh
diff --git a/test/search-date b/test/T500-search-date.sh
similarity index 100%
rename from test/search-date
rename to test/T500-search-date.sh
diff --git a/test/thread-replies b/test/T510-thread-replies.sh
similarity index 100%
rename from test/thread-replies
rename to test/T510-thread-replies.sh
diff --git a/test/notmuch-test b/test/notmuch-test
index d6fdd3a..b843712 100755
--- a/test/notmuch-test
+++ b/test/notmuch-test
@@ -16,61 +16,7 @@ fi
cd $(dirname "$0")
-TESTS="
- basic
- help-test
- compact
- config
- setup
- new
- count
- insert
- search
- search-output
- search-by-folder
- search-position-overlap-bug
- search-insufficient-from-quoting
- search-limiting
- excludes
- tagging
- json
- sexp
- text
- multipart
- thread-naming
- raw
- reply
- reply-to-sender
- dump-restore
- uuencode
- thread-order
- author-order
- from-guessing
- long-id
- encoding
- emacs
- emacs-large-search-buffer
- emacs-subject-to-filename
- maildir-sync
- crypto
- symbol-hiding
- search-folder-coherence
- atomicity
- python
- hooks
- argument-parsing
- emacs-test-functions
- emacs-address-cleaning
- emacs-hello
- emacs-show
- emacs-tree
- missing-headers
- hex-escaping
- parse-time-string
- search-date
- thread-replies
-"
-TESTS=${NOTMUCH_TESTS:=$TESTS}
+TESTS=${NOTMUCH_TESTS:-`echo T[0-9][0-9][0-9]-*.sh`}
# Clean up any results from a previous run
rm -r test-results >/dev/null 2>/dev/null
diff --git a/test/test-lib.sh b/test/test-lib.sh
index 2fcaba6..487075e 100644
--- a/test/test-lib.sh
+++ b/test/test-lib.sh
@@ -27,6 +27,7 @@ shopt -u xpg_echo
this_test=${0##*/}
this_test=${this_test%.sh}
+this_test=${this_test#T[0-9][0-9][0-9]-}
# if --tee was passed, write the output not only to the terminal, but
# additionally to the file test-results/$BASENAME.out, too.
--
1.8.4.2
More information about the notmuch
mailing list