]> git.notmuchmail.org Git - notmuch/blobdiff - test/test-lib.sh
test: NOTMUCH_SKIP_TESTS accepts test names with or without Tddd- prefix
[notmuch] / test / test-lib.sh
index 2fcaba656cffc39c51132784ca7bac79593a3a5b..9222689d5199bf78774ca8ae80367ded6a87b520 100644 (file)
@@ -27,6 +27,7 @@ shopt -u xpg_echo
 
 this_test=${0##*/}
 this_test=${this_test%.sh}
+this_test_bare=${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.
@@ -824,6 +825,12 @@ test_skip () {
                case $this_test.$test_count in
                $skp)
                        to_skip=t
+                       break
+               esac
+               case $this_test_bare.$test_count in
+               $skp)
+                       to_skip=t
+                       break
                esac
        done
        if test -z "$to_skip" && test -n "$prereq" &&
@@ -1084,7 +1091,7 @@ test_emacs () {
        test -z "$missing_dependencies" || return
 
        if [ -z "$EMACS_SERVER" ]; then
-               emacs_tests="${this_test}.el"
+               emacs_tests="${this_test_bare}.el"
                if [ -f "$TEST_DIRECTORY/$emacs_tests" ]; then
                        load_emacs_tests="--eval '(load \"$emacs_tests\")'"
                else
@@ -1206,6 +1213,12 @@ do
                case "$this_test" in
                $skp)
                        to_skip=t
+                       break
+               esac
+               case "$this_test_bare" in
+               $skp)
+                       to_skip=t
+                       break
                esac
        done
        case "$to_skip" in