chiark / gitweb /
Test suite: Add clone-gitnosuite
[dgit.git] / tests / lib
index 30fce38e9d4f06018326c6a0eb9193f5fe669385..a3974253f733e467f5827d2a6f0af8d4aaa6c764 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -362,7 +362,7 @@ t-refs-same () {
 t-refs-notexist () {
        local val
        for g in $*; do
-               val=`t-git-get-ref $g >$tmp/t.refx`
+               val=`t-git-get-ref $g`
                if [ "x$val" != x ]; then
                        fail "ref $g unexpectedly exists ($val)"
                fi
@@ -370,7 +370,7 @@ t-refs-notexist () {
 }
 
 t-v-tag () {
-       echo refs/tags/debian/${v//\~/_}
+       echo refs/tags/test-dummy/${v//\~/_}
 }
 
 t-pushed-good () {
@@ -461,11 +461,11 @@ t-apply-diff () {
 
 t-commit () {
        local msg=$1
-       v=1.$revision
+       v=${2-1.$revision}
        dch -v$v --distribution unstable "$1"
        git add debian/changelog
        debcommit
-       revision=$(( $revision + 1 ))
+       revision=$(( ${revision-0} + 1 ))
 }
 
 t-git-config () {
@@ -516,6 +516,10 @@ t-policy-admin () {
        ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
 }
 
+t-policy-nonexist () {
+       ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
+}
+
 t-policy () {
        local policyhook=$1
        policyhook=${DGIT_INFRA_PFX}$policyhook