chiark / gitweb /
tests: Break out t-chain-test
[dgit.git] / tests / lib
index cccdc35dd5a6c1d2e09816360fabc1ae605ffd6e..7a5aa761d2d01e7b50ad1222fc8f2262f2d2c3e3 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -262,10 +262,17 @@ t-drs () {
        cp $root/tests/suites $tmp/.
 }
 
-t-drs-test () {
-       t-drs
+t-chain-test () {
+       local ct=$1
+       local d=${0%/*}
        cd $root
        export DGIT_TEST_TESTNAME="$testname"
        export ADTTMP=$tmp
-       exec "${0///drs-//}" "$@"
+       exec "$d/$ct"
+}      
+
+t-alt-test () {
+       local t=${0##*/}
+       t-${t%%-*}
+       t-chain-test "${t#*-}"
 }