chiark / gitweb /
Infra: dgit-repos-server; In NOFFCHECK but not FRESHREPO case, do not request wrong...
[dgit.git] / tests / lib
index 5adcf0b69bca032a863bcec6f4c98aea34b8780a..aec86127d227ac0c4f81af3304ba4be42aa3d470 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -199,6 +199,10 @@ t-git-dir-check () {
        esac
 }
 
+t-rm-dput-dropping () {
+       rm -f $tmp/${p}_${v}_*.upload
+}
+
 t-dgit () {
        local dgit=${DGIT_TEST-dgit}
        : '
@@ -348,6 +352,10 @@ t-tstunt () {
        done
 }
 
+t-tstunt-parsechangelog () {
+       t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm
+}
+
 t-ref-dsc-dgit () {
        local dsc=${p}_${v}.dsc
        local val=`t-822-field $tmp/incoming/$dsc Dgit`
@@ -362,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 "$@"
 }
@@ -406,16 +423,21 @@ t-policy-admin () {
        ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
 }
 
-t-debpolicy () {
+t-policy () {
+       local policyhook=$1
        t-dsd
 
-       ln -sf ${DGIT_INFRA_PFX}dgit-repos-policy-debian \
+       ln -sf ${DGIT_INFRA_PFX}$policyhook \
                $drs_dispatch/policy-hook
 
        mkdir $tmp/git
        t-policy-admin create-db
 }
 
+t-debpolicy () {
+       t-policy dgit-repos-policy-debian
+}
+
 t-policy-periodic () {
        ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
                test-dummy $drs_dispatch '' --cron