chiark / gitweb /
Test suite: Fix call to t-refs-notexist to have refs/
[dgit.git] / tests / lib
index 7b176539a1899e640342cf14f210a765fc1061e1..9948c31407433ed5ea49c525e40ef490a0599656 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -225,7 +225,7 @@ t-cloned-fetched-good () {
        t-refs-same \
                refs/heads/dgit/sid \
                refs/remotes/dgit/dgit/sid
-       t-refs-notexist dgit/unstable remotes/dgit/dgit/unstable
+       t-refs-notexist refs/dgit/unstable refs/remotes/dgit/dgit/unstable
 }
 
 t-output () {
@@ -370,6 +370,15 @@ t-apply-diff () {
                | patch -p1 -u
 }
 
+t-commit () {
+       local msg=$1
+       v=1.$revision
+       dch -v$v --distribution unstable "$1"
+       git add debian/changelog
+       debcommit
+       revision=$(( $revision + 1 ))
+}
+
 t-git-config () {
        git config --global "$@"
 }
@@ -414,11 +423,15 @@ t-policy-admin () {
        ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
 }
 
+t-policy () {
+       local policyhook=$1
+       ln -sf ${DGIT_INFRA_PFX}$policyhook \
+               $drs_dispatch/policy-hook
+}
+
 t-debpolicy () {
        t-dsd
-
-       ln -sf ${DGIT_INFRA_PFX}dgit-repos-policy-debian \
-               $drs_dispatch/policy-hook
+       t-policy dgit-repos-policy-debian
 
        mkdir $tmp/git
        t-policy-admin create-db