17 lines: ${BASH_LINENO[*]}
18 files: ${BASH_SOURCE[*]}
25 trap 'test $? = 0 || t-report-failure' EXIT
27 t-filter-out-git-hyphen-dir
31 : ${DGIT_TEST_DEBUG=-D}
32 export DGIT_TEST_DEBUG
34 : ${DGIT_TEST_DISTRO+ ${distro=${DGIT_TEST_DISTRO}}}
36 export GIT_COMMITTER_DATE='1515000000 +0100'
37 export GIT_AUTHOR_DATE='1515000000 +0100'
41 testname="${DGIT_TEST_TESTNAME-${0##*/}}"
42 export DGIT_TEST_TROOT=$troot
46 if [ x"$tmp" = x ]; then
47 export DGIT_TEST_BYHAND=1
50 tmp=tests/tmp/$testname
53 elif [ "x$DGIT_TEST_TMPBASE" != x ]; then
54 tmpbase="$DGIT_TEST_TMPBASE"
62 test -f $tmp/.save-env || \
63 env -0 >$tmp/.save-env
67 export DEBCHANGE_VENDOR=dpkg
70 mkdir -p $tmp/incoming
71 cat <<END >$tmp/dput.cf
74 incoming = $tmp/incoming
78 schroot=${DGIT_SCHROOT_CHROOT:-build}
79 # Pretty much any Debian sid snapshot schroot will do.
81 : ${t_archive_method:=aq}
82 : ${tagpfx:=archive/test-dummy}
83 : ${suitespecs:=sid:unstable}
86 GIT_COMMITTER_DATE="$(( ${GIT_COMMITTER_DATE%% *} + 1 )) ${GIT_COMMITTER_DATE#* }"
87 GIT_AUTHOR_DATE="$GIT_COMMITTER_DATE"
91 local mpat="$1"; shift
94 LC_MESSAGES=C "$@" 2>&1 | tee $tmp/t.output
95 local ps="${PIPESTATUS[*]}"
99 "0 0") fail "command unexpectedly succeeded (instead of: $mpat)" ;;
101 *) fail "tee failed" ;;
104 t-grep-mpat "$mpat" $tmp/t.output
115 E:*) grepper=egrep ;;
116 F:*) grepper=fgrep ;;
117 *) fail "bad mpat prefix in $mpat";;
123 $grepper -e "$mpat" "$file" ||
124 fail "message not found"
127 t-expect-push-fail () {
128 local mpat="$1"; shift
130 local triedpush; triedpush=`git rev-parse HEAD`
133 t-expect-fail "$mpat" "$@"
135 diff $tmp/show-refs.{pre,post}-push
137 t-git-objects-not-present '' $triedpush
139 eval "$t_expect_push_fail_hook"
142 t-git-objects-not-present () {
143 # t-git-objects-not-present GITDIR|'' OBJID [...]
144 # specifying '' means the repo for package $p
145 local gitdir="${1-$dgitrepo}"
147 if ! [ -e "$gitdir" ]; then return; fi
150 t-expect-fail 'unable to find' \
156 local whichoutput=$1; shift
157 local whichrepo=${1-$dgitrepo}
158 local outputfile="$tmp/show-refs.$whichoutput"
161 if test -d $whichrepo; then
169 local edittree=$1.edit
170 if test -d "$edittree"; then
171 cp -a "$edittree"/* .
179 t-untar $troot/worktrees/${p}_$1
182 t-select-package () {
184 dgitrepo=$tmp/git/$p.git
191 local gs=$troot/git-srcs/${p}_$v.git
192 (set -e; cd $tmp/git; t-untar $gs)
197 (set -e; cd $tmp/git; tar xf $troot/git-template.tar)
200 t-salsa-add-remote () {
201 local d=$tmp/salsa/$p
203 (set -e; cd $d; git init --bare)
204 git remote add ${1-origin} $d
207 t-git-merge-base () {
208 git merge-base $1 $2 || test $? = 1
212 # t-has-ancestor ANCESTOR
213 # (CHILD is implicit, HEAD)
214 local now; now=`git rev-parse HEAD`
215 local ancestor; ancestor=`git rev-parse $1^{}`
216 local mbase; mbase=`t-git-merge-base $ancestor $now`
217 if [ x$mbase != x$ancestor ]; then
218 fail "not ff $ancestor..$now, $mbase != $ancestor"
222 t-has-parent-or-is () {
223 # t-has-parent-or-is CHILD PARENT
227 parents=$(git show --pretty=format:' %P %H ' "$child")
228 parent=$(git rev-parse "$parent~0")
231 *) fail "child $child lacks parent $parent" ;;
235 t-prep-newpackage () {
242 if ! git show-ref --verify --quiet refs/heads/master; then
243 git branch -m dgit/sid master
251 t-archive-none-$t_archive_method
253 t-archive-none-aq () {
254 mkdir -p $tmp/aq/dsc_in_suite $tmp/mirror/pool/main
260 for suitespec in $suitespecs; do
261 local suite=${suitespec%%:*}
262 local sname=${suitespec#*:}
264 >$tmp/aq/package.$suite.$p
265 t-aq-archive-updated $suite $p
267 >$tmp/aq/package.new.$p
268 t-aq-archive-updated new $p
270 ln -sf $suite $tmp/aq/dsc_in_suite/$sname
272 cat <<END >>$tmp/aq/suites
275 "archive" : "ftp-master",
276 "codename" : "$suite",
289 cat <<END >>$tmp/aq/suites
295 t-aq-archive-updated () {
298 local suitedir=$tmp/aq/dsc_in_suite/$suite
300 perl <$tmp/aq/package.$suite.$p >$suitedir/$p -wne '
304 m{^(\S+) (\w+) ([^ \t/]+)/(\S+)} or die;
312 my $json = JSON->new->canonical();
313 print $json->encode(\@v) or die $!;
318 t-archive-process-incoming () {
320 mv $tmp/incoming/${p}_* $tmp/mirror/pool/main/
321 t-archive-query "$suite"
326 local dscf=main/${p}_${v}.dsc
327 t-archive-query-$t_archive_method "$suite" "$p" "$v" "$dscf"
329 t-archive-query-aq () {
334 local sha; sha=`sha256sum <$tmp/mirror/pool/$dscf`
335 echo "${v} ${sha% -} $dscf" >>$tmp/aq/package.$suite.${p}
336 t-aq-archive-updated $suite $p
342 local dscf=${p}_$2.dsc
343 rm -f $tmp/mirror/pool/main/${p}_*
344 ln $troot/pkg-srcs/${p}_${2%-*}* $tmp/mirror/pool/main/
345 t-archive-query $suite
348 (set -e; cd $tmp/extract; dpkg-source -x ../mirror/pool/main/$dscf)
351 t-git-dir-time-passes () {
352 touch -d 'last year' $dgitrepo
356 local gitdir=$dgitrepo
359 if test -e "$gitdir"; then fail "$gitdir exists"; fi
362 public) wantstat='7[75]5' ;;
363 secret) wantstat='7[70]0' ;;
364 *) fail "$1 t-git-dir-check ?" ;;
366 gotstat=`stat -c%a $gitdir`
368 *$wantstat) return ;;
369 *) fail "$gitdir has mode $gotstat, expected $wantstat" ;;
373 t-expect-fsck-fail () {
374 echo >>$tmp/fsck.expected-errors "$1"
378 local fsckerrs=$(git rev-parse --git-dir)/dgit-test-fsck.errs
381 LC_MESSAGES=C git fsck --no-dangling --strict 2>&1 \
383 ps="${PIPESTATUS[*]}"
387 if [ -f $tmp/fsck.expected-errors ]; then
388 pats=(-w -f $tmp/fsck.expected-errors)
392 pats+=(-e 'notice: HEAD points to an unborn branch')
393 pats+=(-e 'notice: No default references')
396 grep -v "${pats[@]}" $fsckerrs
400 1) ;; # no unexpected errors
401 0) fail "unexpected messages from git-fsck" ;;
402 *) fail "grep of git-fsck failed" ;;
409 for d in $tmp/*/.git $tmp/git/*.git; do
417 : '========================================'
423 t-save-artifacts () {
424 artifacts="$AUTOPKGTEST_ARTIFACTS"
425 if [ x"$artifacts" = x ]; then return; fi
426 if [ x"tmp" = x ]; then return; fi
427 GZIP=-1v tar -C "$tmp" -zc -f "$artifacts/${0##*/}.tar.gz" \
431 t-rm-dput-dropping () {
432 rm -f $tmp/${p}_${v}_*.upload
436 local dgit=${DGIT_TEST-dgit}
439 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
440 $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
441 ${dgit_config_debian_alias-"--config-lookup-explode=dgit-distro.debian.alias-canon"} \
442 ${DGIT_GITDEBREBASE_TEST+--git-debrebase=}${DGIT_GITDEBREBASE_TEST} \
443 ${distro+${distro:+-d}}${distro--dtest-dummy} \
444 $DGIT_TEST_OPTS $DGIT_TEST_DEBUG \
445 -kBCD22CD83243B79D3DFAC33EA3DBCBC039B13D8A $t_dgit_xopts "$@"
446 : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
453 (export LC_ALL=C.UTF-8
454 if [ "$DGIT_TEST_INTREE" ]; then
455 make -C $DGIT_TEST_INTREE $page.$section.view
462 diff --exclude=.git --exclude=.pc -ruN $*
465 t-files-notexist () {
474 t-cloned-fetched-good () {
475 t-diff-nogit ../extract/$p-${v%-*} .
476 t-clean-on-branch dgit/sid
479 refs/heads/dgit/sid \
480 refs/remotes/dgit/dgit/sid
481 t-refs-notexist refs/dgit/unstable refs/remotes/dgit/dgit/unstable
485 printf "%s${1:+\n}" "$1" >$tmp/t.want
488 diff $tmp/t.want $tmp/t.got
491 t-clean-on-branch () {
492 t-output "## $1" git status -b --porcelain
500 local import=IMPORT.${DGIT_TEST_TESTNAME-${0##*/}}
501 exec 4>$tmp/$import.new
504 for vn in $savevars; do
505 perl >&4 -"I$root" -MDebian::Dgit -e '
506 printf "%s=%s\n", $ARGV[0], shellquote $ARGV[1]
507 ' $vn "$(eval "printf '%s\n' \"\$$vn\"")"
510 (set -e; cd $tmp; tar cf $import.tar $savedirs)
512 printf >&4 "\n%s\n" "$importeval"
514 mv -f $tmp/$import.new $tmp/$import
522 if [ "x$tmpbase" = x ]; then
523 # ADTTMP was set on entry to tests/lib, so we
524 # are not sharing tmp area between tests
526 lock="$tmp/.dummy.lock"
528 setupsrc="$tmpbase/$setupname"
529 lock="$setupsrc.lock"
532 local simport="$setupsrc/IMPORT.$setupname"
534 if ! [ -e "$simport" ]; then
535 with-lock-ex -w "$lock" \
536 xargs -0 -a $tmp/.save-env \
539 setupname="$1"; shift
541 if [ -e "$simport" ]; then exit 0; fi
543 "tests/setup/$setupname"
544 ' x "$root" "$setupname" "$simport"
547 if [ "x$setupsrc" != "x$tmp" ]; then
548 (set -e; cd $tmp; tar xf "$simport.tar")
554 t-git-get-ref-exact () {
556 # does not dereference, unlike t-git-get-ref
559 *) fail "t-git-get-ref-exact bad $ref" ;;
561 git for-each-ref --format='%(objectname)' "[r]efs/${ref#refs/}"
568 *) fail "t-git-get-ref bad $ref" ;;
570 (git show-ref -d $1 || test $? = 1) | perl -ne '
571 $x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#;
572 END { print "$x\n" if length $x; }
576 t-ref-same-exact () {
578 local val; val=`t-git-get-ref-exact $name`
579 t-ref-same-val "$name" $val
584 local val; val=`t-git-get-ref $name`
585 t-ref-same-val "$name" $val
589 local val; val=`git rev-parse HEAD`
590 t-ref-same-val HEAD $val
596 case "${t_ref_val-unset}" in
599 *) fail "ref varies: ($name)\
600 ${val:-nothing} != ${t_ref_val:-nothing} (${t_ref_names[*]})" ;;
603 t_ref_names+=("$name")
606 t-refs-same-start () {
621 val=`t-git-get-ref $g`
622 if [ "x$val" != x ]; then
623 fail "ref $g unexpectedly exists ($val)"
629 echo refs/tags/$tagpfx/${v//\~/_}
633 git log -n1 --pretty=format:"$1" "$2"
636 t-sametree-parent () {
639 local ctree; ctree=$(t-format-ref '%T' "$ref")
642 for parent in $(t-format-ref '%P' "$ref"); do
643 local ptree; ptree=$(t-format-ref '%T' "$parent")
644 if [ "x$ptree" = "x$ctree" ]; then
648 case "$psame" in ""|" * *") break ;; esac
654 t-check-pushed-master () {
655 local master; master=`t-git-get-ref refs/heads/master`
656 if [ x$master = x$t_ref_val ]; then return; fi
657 if [ x$master = x ]; then fail "failed to push master"; fi
658 # didn't update master, it must be not FF
659 local mbase; mbase=`t-git-merge-base $master $t_ref_val`
660 if [ x$mbase = x$master ]; then fail "failed to ff master"; fi
663 t-push-was-source-only () {
665 t-files-notexist $tmp/incoming/${p}_${v}_*.deb \
666 $tmp/incoming/${p}_${v}_*.udeb
667 # we permit _source.buildinfo files; see test_changes_source_only()
668 for f in $tmp/incoming/${p}_${v}_*.buildinfo; do
671 *_source.buildinfo) ;;
672 *) fail "non-source-only file $f exists!" ;;
680 stat $tmp/incoming/$f
686 local suite=${2:-sid}
692 t-pushed-good-core () {
696 refs/remotes/dgit/dgit/$suite
698 refs/heads/dgit/unstable \
699 refs/remotes/dgit/dgit/unstable
700 (set -e; cd $dgitrepo
704 ${t_check_pushed_master:- : NOT-DRS-NO-CHECK-PUSHED-MASTER}
708 git verify-tag `t-v-tag`
711 t-pushed-good-check-changes () {
712 changes_filename="$tmp/incoming/${p}_${v}_*.changes"
713 grep -E "^Distribution: $suite" $changes_filename
714 grep -E "^Version: $v" $changes_filename
717 t-splitbrain-pushed-good--unpack () {
722 ln -s $tmp/mirror/pool/main/*.orig*.tar* .
723 ln -s $tmp/incoming/*.orig*.tar* . ||:
724 ln -s $incoming_dsc .
725 ln -s ${incoming_dsc/.dsc/.debian.tar}* .
726 dpkg-source "$@" -x *.dsc
729 git fetch ../../$p "refs/tags/*:refs/tags/*"
732 t-splitbrain-pushed-good--checkprep () {
734 git rm --cached -r --ignore-unmatch .pc
737 t-splitbrain-pushed-good--checkdiff () {
739 t-splitbrain-pushed-good--checkprep
740 t-output "" git diff --stat --cached $tag
743 t-splitbrain-pushed-good-start () {
744 dep14tag=refs/tags/test-dummy/${v//\~/_}
746 t-output "" git status --porcelain
748 t-refs-same $dep14tag
749 (set -e; cd $dgitrepo; t-refs-same $dep14tag)
750 git merge-base --is-ancestor $dep14tag $dgittag
753 t-ref-same refs/heads/split.p
754 case "$(t-git-get-ref refs/heads/split.b)" in
756 "$(git rev-parse refs/heads/split.p^0)") ;;
757 "$(git rev-parse refs/heads/split.p^1)") ;;
764 t-splitbrain-pushed-good--unpack
765 t-splitbrain-pushed-good--checkdiff $dgittag
767 t-splitbrain-pushed-good-end-made-dep14 () {
768 t-splitbrain-pushed-good--checkdiff $dep14tag
772 t-splitbrain-rm-gitignore-patch () {
774 next unless $_ eq "auto-gitignore\n";
777 rename "debian/patches/$_", "../t-auto-gitignore" or die $!;
779 ' debian/patches/series
782 t-gbp-pushed-good () {
783 local suite=${1:-sid}
784 t-splitbrain-pushed-good-start
786 # Right, now we want to check that the maintainer tree and
787 # the dgit tree differ in exactly the ways we expect. We
788 # achieve this by trying to reconstruct the maintainer tree
789 # from the dgit tree.
791 # So, unpack it withut the patches applied
792 t-splitbrain-pushed-good--unpack --skip-patches
794 # dgit might have added a .gitignore patch, which we need to
796 t-splitbrain-rm-gitignore-patch
798 # Now the result should differ only in non-debian/ .gitignores
799 t-splitbrain-pushed-good--checkprep
800 git diff --cached --name-only $dep14tag >../changed
802 next if !m#^debian/# && m#(^|/)\.gitignore#;
806 # If we actually apply the gitignore patch by hand, it
808 if [ -f ../t-auto-gitignore ]; then
809 patch --backup-if-mismatch -p1 -u <../t-auto-gitignore
812 t-splitbrain-pushed-good-end-made-dep14
815 t-unapplied-pushed-good () {
816 t-splitbrain-pushed-good-start
817 t-splitbrain-pushed-good--unpack --skip-patches
818 t-splitbrain-pushed-good-end-made-dep14
821 t-dpm-pushed-good () {
822 t-splitbrain-pushed-good-start
823 t-splitbrain-pushed-good--unpack
824 t-splitbrain-rm-gitignore-patch
825 t-splitbrain-pushed-good-end-made-dep14
828 t-commit-build-push-expect-log () {
834 t-dgit push --new 2>&1 |tee $tmp/push.log
835 t-grep-mpat "$mpat" $tmp/push.log
842 use Dpkg::Control::Hash;
843 my $h = new Dpkg::Control::Hash allow_pgp=>1;
844 $h->parse(\*STDIN,"'"$file"'");
845 my $val = $h->{"'$field'"},"\n";
846 die "'"$file $field"'" unless defined $val;
852 export DGIT_TEST_DISTRO=''
854 t-git-config dgit-suite.unstable.distro test-dummy
864 "") '$var'="$tstunt" ;;
865 *) '$var'="$tstunt:$'$var'" ;;
871 t-tstunt--save-real () {
882 p="${p/:"$tmp/tstunt":/:}"
894 *) fail "did not find $f on PATH $PATH" ;;
897 local varname=${f//[^_0-9a-zA-Z]/_}
898 varname=DGIT_TEST_REAL_${varname^^}
901 : \${$varname:=\$real}
907 local tstunt=$tmp/tstunt
908 t-stunt-envvar PATH $tstunt
909 t-stunt-envvar PERLLIB $tstunt
912 t-tstunt--save-real $f
914 local d="$tstunt/${f%/*}"
916 ln -sf "$troot/tstunt/$f" "$d"/.
920 t-tstunt-parsechangelog () {
921 t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm
924 t-tstunt-lintian () {
928 t-tstunt-debuild () {
933 local dsc=${p}_${v}.dsc
934 incoming_dsc=$tmp/incoming/$dsc
939 local val; val=`t-822-field $incoming_dsc Dgit`
942 die "Dgit $_ ?" unless m/^\w+\b/;
943 print $&,"\n" or die $!;
945 t-ref-same-val $incoming_dsc "$val"
952 debdiff ${p}_${v1}.dsc ${p}_${v2}.dsc || test $? = 1) \
956 t-gbp-unapplied-pq2qc () {
957 # does `gbp pq export'
958 # commits the resulting debian/patches on qc/BRANCH
959 # leaves us on qc/BRANCH (eg "qc/quilt-tip"))
960 # qc/BRANCH is not fast-forwarding
964 branch=`git symbolic-ref HEAD`
965 branch=${branch#refs/heads/}
968 */*) fail "unexpected branch $branch" ;;
971 git branch -f qc/$branch
972 git checkout qc/$branch
973 git add debian/patches
974 git commit -m 'Commit patch queue'
977 t-git-pseudo-merge () {
978 # like git merge -s ours
979 if [ ! "$git_pseuomerge_opts" ]; then
980 if git merge --help \
981 | grep -q allow-unrelated-histories; then
982 git_pseuomerge_opts='--allow-unrelated-histories'
984 git_pseuomerge_opts+=' -s ours'
986 git merge $git_pseuomerge_opts "$@"
989 t-gbp-example-prep-no-ff () {
990 t-tstunt-parsechangelog
991 t-archive example 1.0-1
999 git checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip
1002 echo '/* some comment */' >>src.c
1004 git commit -m 'Add a comment to an upstream file'
1006 t-gbp-unapplied-pq2qc
1008 t-commit 'some updates' 1.0-2
1011 t-gbp-example-prep () {
1012 t-gbp-example-prep-no-ff
1014 t-git-pseudo-merge \
1015 -m 'Pseudo-merge to make descendant of archive' \
1016 remotes/dgit/dgit/sid
1019 t-make-badcommit () {
1021 git cat-file commit HEAD | \
1022 perl -pe 's/^committer /commiter /' | \
1023 git hash-object -w -t commit --stdin
1025 t-expect-fsck-fail $badcommit
1028 t-merge-conflicted-stripping-conflict-markers () {
1029 local otherbranch=$1
1032 t-expect-fail F:"Merge conflict in $file" \
1033 git merge $otherbranch
1035 perl -i~ -ne 'print unless m{^(?:\<\<\<|\>\>\>|===)}' "$file"
1037 git commit --no-edit
1042 v=${2:-${majorv:-1}.$revision}
1043 dch --force-distribution -v$v --distribution ${3:-unstable} "$1"
1044 git add debian/changelog
1046 revision=$(( ${revision-0} + 1 ))
1050 local cmd="$1"; shift
1051 local suite=${1-unstable}
1052 $cmd -r -D "$suite" ''
1056 t-dch-r-rune t-dch-commit "$@"
1060 faketime @"${GIT_AUTHOR_DATE% *}" dch "$@"
1061 git commit -m "dch $*" debian/changelog
1065 git config --global "$@"
1069 t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S "
1070 t-git-config dgit-distro.test-dummy.git-check true
1071 t-git-config dgit-distro.test-dummy.git-create true
1072 t-git-config dgit-distro.test-dummy.dgit-tag-format new,old,maint
1073 cp $troot/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/.
1074 cp $troot/suites $tmp/.
1075 cp $troot/suites $tmp/suites-master
1077 export t_check_pushed_master=t-check-pushed-master
1079 drs_dispatch=$tmp/distro=test-dummy
1082 if [ "x$DGIT_TEST_INTREE" != x ]; then
1083 ln -sf "$DGIT_TEST_INTREE" $drs_dispatch/dgit-live
1086 ln -sf $tmp/git $drs_dispatch/repos
1087 ln -sf $tmp/suites $tmp/suites-master $tmp/dm.txt $drs_dispatch/
1088 mkdir -p $drs_dispatch/keyrings
1089 ln -sf $tmp/dd.gpg $drs_dispatch/keyrings/debian-keyring.gpg
1090 ln -sf $tmp/dm.gpg $drs_dispatch/keyrings/debian-maintainers.gpg
1091 ln -sf /bin/true $drs_dispatch/policy-hook
1095 export tagpfx=archive/test-dummy
1096 t-git-config dgit-distro.test-dummy.dgit-tag-format new,maint
1099 export tagpfx=test-dummy
1100 t-git-config dgit-distro.test-dummy.dgit-tag-format old
1105 t-git-config dgit-distro.test-dummy.ssh "$troot/dsd-ssh"
1106 t-git-config dgit-distro.test-dummy.git-check ssh-cmd
1107 t-git-config dgit-distro.test-dummy.git-create true
1108 t-git-config dgit-distro.test-dummy.git-url \
1109 "ext::$troot/dsd-ssh X %S /dgit/test-dummy/repos"
1111 t-git-config dgit-distro.test-dummy.diverts.drs /drs
1112 t-git-config dgit-distro.test-dummy/drs.ssh "$troot/ssh"
1113 t-git-config dgit-distro.test-dummy/drs.git-url $tmp/git
1114 t-git-config dgit-distro.test-dummy/drs.git-check ssh-cmd
1115 t-git-config dgit-distro.test-dummy/drs.git-create ssh-cmd
1117 echo 'no-such-package* drs' >$drs_dispatch/diverts
1121 : '(((((((((((((((((((((((((((((((((((((((('
1122 ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
1123 : '))))))))))))))))))))))))))))))))))))))))'
1126 t-policy-nonexist () {
1127 ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
1130 t-make-hook-link () {
1131 local hook=$1 # in infra/
1133 hook=${DGIT_INFRA_PFX}$hook
1136 *) hook=`type -P $hook` ;;
1138 ln -sf "$hook" $linkpath
1143 t-make-hook-link $policyhook $drs_dispatch/policy-hook
1148 t-policy dgit-repos-policy-debian
1151 t-policy-admin create-db
1154 t-policy-periodic () {
1155 : '(((((((((((((((((((((((((((((((((((((((('
1156 ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
1157 test-dummy $drs_dispatch '' --cron
1158 : '))))))))))))))))))))))))))))))))))))))))'
1161 t-buildproductsdir-config () {
1163 t-git-config dgit.default.build-products-dir $bpd
1165 cat <<END >>$tmp/.gbp.conf
1172 local restriction=$1
1173 (cd $root; t-restriction-$restriction >&2)
1177 : "Hopefully installed: $*"
1184 export DGIT_TEST_TESTNAME="$testname"
1185 export DGIT_TEST_TMPBASE="$tmpbase"
1193 t-chain-test "${t#*-}"
1196 t-git-config dgit.default.old-dsc-distro test-dummy
1198 for import in ${autoimport-gnupg}; do
1202 t-setup-import $import