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
71 mkdir -p $tmp/incoming
72 cat <<END >$tmp/dput.cf
75 incoming = $tmp/incoming
79 schroot=${DGIT_SCHROOT_CHROOT:-build}
80 # Pretty much any Debian sid snapshot schroot will do.
82 : ${t_archive_method:=aq}
83 : ${tagpfx:=archive/test-dummy}
84 : ${suitespecs:=sid:unstable}
87 GIT_COMMITTER_DATE="$(( ${GIT_COMMITTER_DATE%% *} + 1 )) ${GIT_COMMITTER_DATE#* }"
88 GIT_AUTHOR_DATE="$GIT_COMMITTER_DATE"
92 local mpat="$1"; shift
95 LC_MESSAGES=C "$@" 2>&1 | tee $tmp/t.output
96 local ps="${PIPESTATUS[*]}"
100 "0 0") fail "command unexpectedly succeeded (instead of: $mpat)" ;;
102 *) fail "tee failed" ;;
105 t-grep-mpat "$mpat" $tmp/t.output
116 E:*) grepper=egrep ;;
117 F:*) grepper=fgrep ;;
118 *) fail "bad mpat prefix in $mpat";;
124 $grepper -e "$mpat" "$file" ||
125 fail "message not found"
128 t-expect-push-fail () {
129 local mpat="$1"; shift
131 local triedpush; triedpush=`git rev-parse HEAD`
134 t-expect-fail "$mpat" "$@"
136 diff $tmp/show-refs.{pre,post}-push
138 t-git-objects-not-present '' $triedpush
140 eval "$t_expect_push_fail_hook"
143 t-git-objects-not-present () {
144 # t-git-objects-not-present GITDIR|'' OBJID [...]
145 # specifying '' means the repo for package $p
146 local gitdir="${1-$dgitrepo}"
148 if ! [ -e "$gitdir" ]; then return; fi
151 t-expect-fail 'unable to find' \
157 local whichoutput=$1; shift
158 local whichrepo=${1-$dgitrepo}
159 local outputfile="$tmp/show-refs.$whichoutput"
162 if test -d $whichrepo; then
170 local edittree=$1.edit
171 if test -d "$edittree"; then
172 cp -a "$edittree"/* .
180 t-untar $troot/worktrees/${p}_$1
183 t-select-package () {
185 dgitrepo=$tmp/git/$p.git
192 local gs=$troot/git-srcs/${p}_$v.git
193 (set -e; cd $tmp/git; t-untar $gs)
198 (set -e; cd $tmp/git; tar xf $troot/git-template.tar)
201 t-salsa-add-remote () {
202 local d=$tmp/salsa/$p
204 (set -e; cd $d; git init --bare)
205 git remote add ${1-origin} $d
208 t-git-merge-base () {
209 git merge-base $1 $2 || test $? = 1
213 # t-has-ancestor ANCESTOR
214 # (CHILD is implicit, HEAD)
215 local now; now=`git rev-parse HEAD`
216 local ancestor; ancestor=`git rev-parse $1^{}`
217 local mbase; mbase=`t-git-merge-base $ancestor $now`
218 if [ x$mbase != x$ancestor ]; then
219 fail "not ff $ancestor..$now, $mbase != $ancestor"
223 t-has-parent-or-is () {
224 # t-has-parent-or-is CHILD PARENT
228 parents=$(git show --pretty=format:' %P %H ' "$child")
229 parent=$(git rev-parse "$parent~0")
232 *) fail "child $child lacks parent $parent" ;;
236 t-prep-newpackage () {
243 if ! git show-ref --verify --quiet refs/heads/master; then
244 git branch -m dgit/sid master
252 t-archive-none-$t_archive_method
254 t-archive-none-aq () {
255 mkdir -p $tmp/aq/dsc_in_suite $tmp/mirror/pool/main
261 for suitespec in $suitespecs; do
262 local suite=${suitespec%%:*}
263 local sname=${suitespec#*:}
265 >$tmp/aq/package.$suite.$p
266 t-aq-archive-updated $suite $p
268 >$tmp/aq/package.new.$p
269 t-aq-archive-updated new $p
271 ln -sf $suite $tmp/aq/dsc_in_suite/$sname
273 cat <<END >>$tmp/aq/suites
276 "archive" : "ftp-master",
277 "codename" : "$suite",
290 cat <<END >>$tmp/aq/suites
296 t-aq-archive-updated () {
299 local suitedir=$tmp/aq/dsc_in_suite/$suite
301 perl <$tmp/aq/package.$suite.$p >$suitedir/$p -wne '
305 m{^(\S+) (\w+) ([^ \t/]+)/(\S+)} or die;
313 my $json = JSON->new->canonical();
314 print $json->encode(\@v) or die $!;
319 t-archive-process-incoming () {
321 mv $tmp/incoming/${p}_* $tmp/mirror/pool/main/
322 t-archive-query "$suite"
327 local dscf=main/${p}_${v}.dsc
328 t-archive-query-$t_archive_method "$suite" "$p" "$v" "$dscf"
330 t-archive-query-aq () {
335 local sha; sha=`sha256sum <$tmp/mirror/pool/$dscf`
336 echo "${v} ${sha% -} $dscf" >>$tmp/aq/package.$suite.${p}
337 t-aq-archive-updated $suite $p
343 local dscf=${p}_$2.dsc
344 rm -f $tmp/mirror/pool/main/${p}_*
345 ln $troot/pkg-srcs/${p}_${2%-*}* $tmp/mirror/pool/main/
346 t-archive-query $suite
349 (set -e; cd $tmp/extract; dpkg-source -x ../mirror/pool/main/$dscf)
352 t-git-dir-time-passes () {
353 touch -d 'last year' $dgitrepo
357 local gitdir=$dgitrepo
360 if test -e "$gitdir"; then fail "$gitdir exists"; fi
363 public) wantstat='7[75]5' ;;
364 secret) wantstat='7[70]0' ;;
365 *) fail "$1 t-git-dir-check ?" ;;
367 gotstat=`stat -c%a $gitdir`
369 *$wantstat) return ;;
370 *) fail "$gitdir has mode $gotstat, expected $wantstat" ;;
374 t-expect-fsck-fail () {
375 echo >>$tmp/fsck.expected-errors "$1"
379 local fsckerrs=$(git rev-parse --git-dir)/dgit-test-fsck.errs
382 LC_MESSAGES=C git fsck --no-dangling --strict 2>&1 \
384 ps="${PIPESTATUS[*]}"
388 if [ -f $tmp/fsck.expected-errors ]; then
389 pats=(-w -f $tmp/fsck.expected-errors)
393 pats+=(-e 'notice: HEAD points to an unborn branch')
394 pats+=(-e 'notice: No default references')
397 grep -v "${pats[@]}" $fsckerrs
401 1) ;; # no unexpected errors
402 0) fail "unexpected messages from git-fsck" ;;
403 *) fail "grep of git-fsck failed" ;;
410 for d in $tmp/*/.git $tmp/git/*.git; do
418 : '========================================'
424 t-save-artifacts () {
425 artifacts="$AUTOPKGTEST_ARTIFACTS"
426 if [ x"$artifacts" = x ]; then return; fi
427 if [ x"tmp" = x ]; then return; fi
428 GZIP=-1v tar -C "$tmp" -zc -f "$artifacts/${0##*/}.tar.gz" \
432 t-rm-dput-dropping () {
433 rm -f $tmp/${p}_${v}_*.upload
437 local dgit=${DGIT_TEST-dgit}
440 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
441 $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
442 ${dgit_config_debian_alias-"--config-lookup-explode=dgit-distro.debian.alias-canon"} \
443 ${DGIT_GITDEBREBASE_TEST+--git-debrebase=}${DGIT_GITDEBREBASE_TEST} \
444 ${distro+${distro:+-d}}${distro--dtest-dummy} \
445 $DGIT_TEST_OPTS $DGIT_TEST_DEBUG \
446 -kBCD22CD83243B79D3DFAC33EA3DBCBC039B13D8A $t_dgit_xopts "$@"
447 : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
454 (export LC_ALL=C.UTF-8
455 if [ "$DGIT_TEST_INTREE" ]; then
456 make -C $DGIT_TEST_INTREE $page.$section.view
463 diff --exclude=.git --exclude=.pc -ruN $*
466 t-files-notexist () {
475 t-cloned-fetched-good () {
476 t-diff-nogit ../extract/$p-${v%-*} .
477 t-clean-on-branch dgit/sid
480 refs/heads/dgit/sid \
481 refs/remotes/dgit/dgit/sid
482 t-refs-notexist refs/dgit/unstable refs/remotes/dgit/dgit/unstable
486 printf "%s${1:+\n}" "$1" >$tmp/t.want
489 diff $tmp/t.want $tmp/t.got
492 t-clean-on-branch () {
493 t-output "## $1" git status -b --porcelain
501 local import=IMPORT.${DGIT_TEST_TESTNAME-${0##*/}}
502 exec 4>$tmp/$import.new
505 for vn in $savevars; do
506 perl >&4 -"I$root" -MDebian::Dgit -e '
507 printf "%s=%s\n", $ARGV[0], shellquote $ARGV[1]
508 ' $vn "$(eval "printf '%s\n' \"\$$vn\"")"
511 (set -e; cd $tmp; tar cf $import.tar $savedirs)
513 printf >&4 "\n%s\n" "$importeval"
515 mv -f $tmp/$import.new $tmp/$import
523 if [ "x$tmpbase" = x ]; then
524 # ADTTMP was set on entry to tests/lib, so we
525 # are not sharing tmp area between tests
527 lock="$tmp/.dummy.lock"
529 setupsrc="$tmpbase/$setupname"
530 lock="$setupsrc.lock"
533 local simport="$setupsrc/IMPORT.$setupname"
535 if ! [ -e "$simport" ]; then
536 with-lock-ex -w "$lock" \
537 xargs -0 -a $tmp/.save-env \
540 setupname="$1"; shift
542 if [ -e "$simport" ]; then exit 0; fi
544 "tests/setup/$setupname"
545 ' x "$root" "$setupname" "$simport"
548 if [ "x$setupsrc" != "x$tmp" ]; then
549 (set -e; cd $tmp; tar xf "$simport.tar")
555 t-git-get-ref-exact () {
557 # does not dereference, unlike t-git-get-ref
560 *) fail "t-git-get-ref-exact bad $ref" ;;
562 git for-each-ref --format='%(objectname)' "[r]efs/${ref#refs/}"
569 *) fail "t-git-get-ref bad $ref" ;;
571 (git show-ref -d $1 || test $? = 1) | perl -ne '
572 $x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#;
573 END { print "$x\n" if length $x; }
577 t-ref-same-exact () {
579 local val; val=`t-git-get-ref-exact $name`
580 t-ref-same-val "$name" $val
585 local val; val=`t-git-get-ref $name`
586 t-ref-same-val "$name" $val
590 local val; val=`git rev-parse HEAD`
591 t-ref-same-val HEAD $val
597 case "${t_ref_val-unset}" in
600 *) fail "ref varies: ($name)\
601 ${val:-nothing} != ${t_ref_val:-nothing} (${t_ref_names[*]})" ;;
604 t_ref_names+=("$name")
607 t-refs-same-start () {
622 val=`t-git-get-ref $g`
623 if [ "x$val" != x ]; then
624 fail "ref $g unexpectedly exists ($val)"
630 echo refs/tags/$tagpfx/${v//\~/_}
634 git log -n1 --pretty=format:"$1" "$2"
637 t-sametree-parent () {
640 local ctree; ctree=$(t-format-ref '%T' "$ref")
643 for parent in $(t-format-ref '%P' "$ref"); do
644 local ptree; ptree=$(t-format-ref '%T' "$parent")
645 if [ "x$ptree" = "x$ctree" ]; then
649 case "$psame" in ""|" * *") break ;; esac
655 t-check-pushed-master () {
656 local master; master=`t-git-get-ref refs/heads/master`
657 if [ x$master = x$t_ref_val ]; then return; fi
658 if [ x$master = x ]; then fail "failed to push master"; fi
659 # didn't update master, it must be not FF
660 local mbase; mbase=`t-git-merge-base $master $t_ref_val`
661 if [ x$mbase = x$master ]; then fail "failed to ff master"; fi
664 t-push-was-source-only () {
666 t-files-notexist $tmp/incoming/${p}_${v}_*.deb \
667 $tmp/incoming/${p}_${v}_*.udeb
668 # we permit _source.buildinfo files; see test_changes_source_only()
669 for f in $tmp/incoming/${p}_${v}_*.buildinfo; do
672 *_source.buildinfo) ;;
673 *) fail "non-source-only file $f exists!" ;;
681 stat $tmp/incoming/$f
687 local suite=${2:-sid}
693 t-pushed-good-core () {
697 refs/remotes/dgit/dgit/$suite
699 refs/heads/dgit/unstable \
700 refs/remotes/dgit/dgit/unstable
701 (set -e; cd $dgitrepo
705 ${t_check_pushed_master:- : NOT-DRS-NO-CHECK-PUSHED-MASTER}
709 git verify-tag `t-v-tag`
712 t-pushed-good-check-changes () {
713 changes_filename="$tmp/incoming/${p}_${v}_*.changes"
714 grep -E "^Distribution: $suite" $changes_filename
715 grep -E "^Version: $v" $changes_filename
718 t-splitbrain-pushed-good--unpack () {
723 ln -s $tmp/mirror/pool/main/*.orig*.tar* .
724 ln -s $tmp/incoming/*.orig*.tar* . ||:
725 ln -s $incoming_dsc .
726 ln -s ${incoming_dsc/.dsc/.debian.tar}* .
727 dpkg-source "$@" -x *.dsc
730 git fetch ../../$p "refs/tags/*:refs/tags/*"
733 t-splitbrain-pushed-good--checkprep () {
735 git rm --cached -r --ignore-unmatch .pc
738 t-splitbrain-pushed-good--checkdiff () {
740 t-splitbrain-pushed-good--checkprep
741 t-output "" git diff --stat --cached $tag
744 t-splitbrain-pushed-good-start () {
745 dep14tag=refs/tags/test-dummy/${v//\~/_}
747 t-output "" git status --porcelain
749 t-refs-same $dep14tag
750 (set -e; cd $dgitrepo; t-refs-same $dep14tag)
751 git merge-base --is-ancestor $dep14tag $dgittag
754 t-ref-same refs/heads/split.p
755 case "$(t-git-get-ref refs/heads/split.b)" in
757 "$(git rev-parse refs/heads/split.p^0)") ;;
758 "$(git rev-parse refs/heads/split.p^1)") ;;
765 t-splitbrain-pushed-good--unpack
766 t-splitbrain-pushed-good--checkdiff $dgittag
768 t-splitbrain-pushed-good-end-made-dep14 () {
769 t-splitbrain-pushed-good--checkdiff $dep14tag
773 t-splitbrain-rm-gitignore-patch () {
775 next unless $_ eq "auto-gitignore\n";
778 rename "debian/patches/$_", "../t-auto-gitignore" or die $!;
780 ' debian/patches/series
783 t-gbp-pushed-good () {
784 local suite=${1:-sid}
785 t-splitbrain-pushed-good-start
787 # Right, now we want to check that the maintainer tree and
788 # the dgit tree differ in exactly the ways we expect. We
789 # achieve this by trying to reconstruct the maintainer tree
790 # from the dgit tree.
792 # So, unpack it withut the patches applied
793 t-splitbrain-pushed-good--unpack --skip-patches
795 # dgit might have added a .gitignore patch, which we need to
797 t-splitbrain-rm-gitignore-patch
799 # Now the result should differ only in non-debian/ .gitignores
800 t-splitbrain-pushed-good--checkprep
801 git diff --cached --name-only $dep14tag >../changed
803 next if !m#^debian/# && m#(^|/)\.gitignore#;
807 # If we actually apply the gitignore patch by hand, it
809 if [ -f ../t-auto-gitignore ]; then
810 patch --backup-if-mismatch -p1 -u <../t-auto-gitignore
813 t-splitbrain-pushed-good-end-made-dep14
816 t-unapplied-pushed-good () {
817 t-splitbrain-pushed-good-start
818 t-splitbrain-pushed-good--unpack --skip-patches
819 t-splitbrain-pushed-good-end-made-dep14
822 t-dpm-pushed-good () {
823 t-splitbrain-pushed-good-start
824 t-splitbrain-pushed-good--unpack
825 t-splitbrain-rm-gitignore-patch
826 t-splitbrain-pushed-good-end-made-dep14
829 t-commit-build-push-expect-log () {
835 t-dgit push --new 2>&1 |tee $tmp/push.log
836 t-grep-mpat "$mpat" $tmp/push.log
843 use Dpkg::Control::Hash;
844 my $h = new Dpkg::Control::Hash allow_pgp=>1;
845 $h->parse(\*STDIN,"'"$file"'");
846 my $val = $h->{"'$field'"},"\n";
847 die "'"$file $field"'" unless defined $val;
853 export DGIT_TEST_DISTRO=''
855 t-git-config dgit-suite.unstable.distro test-dummy
865 "") '$var'="$tstunt" ;;
866 *) '$var'="$tstunt:$'$var'" ;;
872 t-tstunt--save-real () {
883 p="${p/:"$tmp/tstunt":/:}"
895 *) fail "did not find $f on PATH $PATH" ;;
898 local varname=${f//[^_0-9a-zA-Z]/_}
899 varname=DGIT_TEST_REAL_${varname^^}
902 : \${$varname:=\$real}
908 local tstunt=$tmp/tstunt
909 t-stunt-envvar PATH $tstunt
910 t-stunt-envvar PERLLIB $tstunt
913 t-tstunt--save-real $f
915 local d="$tstunt/${f%/*}"
917 ln -sf "$troot/tstunt/$f" "$d"/.
921 t-tstunt-parsechangelog () {
922 t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm
925 t-tstunt-lintian () {
929 t-tstunt-debuild () {
934 local dsc=${p}_${v}.dsc
935 incoming_dsc=$tmp/incoming/$dsc
940 local val; val=`t-822-field $incoming_dsc Dgit`
943 die "Dgit $_ ?" unless m/^\w+\b/;
944 print $&,"\n" or die $!;
946 t-ref-same-val $incoming_dsc "$val"
953 debdiff ${p}_${v1}.dsc ${p}_${v2}.dsc || test $? = 1) \
957 t-gbp-unapplied-pq2qc () {
958 # does `gbp pq export'
959 # commits the resulting debian/patches on qc/BRANCH
960 # leaves us on qc/BRANCH (eg "qc/quilt-tip"))
961 # qc/BRANCH is not fast-forwarding
965 branch=`git symbolic-ref HEAD`
966 branch=${branch#refs/heads/}
969 */*) fail "unexpected branch $branch" ;;
972 git branch -f qc/$branch
973 git checkout qc/$branch
974 git add debian/patches
975 git commit -m 'Commit patch queue'
978 t-git-pseudo-merge () {
979 # like git merge -s ours
980 if [ ! "$git_pseuomerge_opts" ]; then
981 if git merge --help \
982 | grep -q allow-unrelated-histories; then
983 git_pseuomerge_opts='--allow-unrelated-histories'
985 git_pseuomerge_opts+=' -s ours'
987 git merge $git_pseuomerge_opts "$@"
990 t-gbp-example-prep-no-ff () {
991 t-tstunt-parsechangelog
992 t-archive example 1.0-1
1000 git checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip
1003 echo '/* some comment */' >>src.c
1005 git commit -m 'Add a comment to an upstream file'
1007 t-gbp-unapplied-pq2qc
1009 t-commit 'some updates' 1.0-2
1012 t-gbp-example-prep () {
1013 t-gbp-example-prep-no-ff
1015 t-git-pseudo-merge \
1016 -m 'Pseudo-merge to make descendant of archive' \
1017 remotes/dgit/dgit/sid
1020 t-make-badcommit () {
1022 git cat-file commit HEAD | \
1023 perl -pe 's/^committer /commiter /' | \
1024 git hash-object -w -t commit --stdin
1026 t-expect-fsck-fail $badcommit
1029 t-merge-conflicted-stripping-conflict-markers () {
1030 local otherbranch=$1
1033 t-expect-fail F:"Merge conflict in $file" \
1034 git merge $otherbranch
1036 perl -i~ -ne 'print unless m{^(?:\<\<\<|\>\>\>|===)}' "$file"
1038 git commit --no-edit
1043 v=${2:-${majorv:-1}.$revision}
1044 dch --force-distribution -v$v --distribution ${3:-unstable} "$1"
1045 git add debian/changelog
1047 revision=$(( ${revision-0} + 1 ))
1051 local cmd="$1"; shift
1052 local suite=${1-unstable}
1053 $cmd -r -D "$suite" ''
1057 t-dch-r-rune t-dch-commit "$@"
1061 faketime @"${GIT_AUTHOR_DATE% *}" dch "$@"
1062 git commit -m "dch $*" debian/changelog
1066 git config --global "$@"
1070 t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S "
1071 t-git-config dgit-distro.test-dummy.git-check true
1072 t-git-config dgit-distro.test-dummy.git-create true
1073 t-git-config dgit-distro.test-dummy.dgit-tag-format new,old,maint
1074 cp $troot/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/.
1075 cp $troot/suites $tmp/.
1076 cp $troot/suites $tmp/suites-master
1078 export t_check_pushed_master=t-check-pushed-master
1080 drs_dispatch=$tmp/distro=test-dummy
1083 if [ "x$DGIT_TEST_INTREE" != x ]; then
1084 ln -sf "$DGIT_TEST_INTREE" $drs_dispatch/dgit-live
1087 ln -sf $tmp/git $drs_dispatch/repos
1088 ln -sf $tmp/suites $tmp/suites-master $tmp/dm.txt $drs_dispatch/
1089 mkdir -p $drs_dispatch/keyrings
1090 ln -sf $tmp/dd.gpg $drs_dispatch/keyrings/debian-keyring.gpg
1091 ln -sf $tmp/dm.gpg $drs_dispatch/keyrings/debian-maintainers.gpg
1092 ln -sf /bin/true $drs_dispatch/policy-hook
1096 export tagpfx=archive/test-dummy
1097 t-git-config dgit-distro.test-dummy.dgit-tag-format new,maint
1100 export tagpfx=test-dummy
1101 t-git-config dgit-distro.test-dummy.dgit-tag-format old
1106 t-git-config dgit-distro.test-dummy.ssh "$troot/dsd-ssh"
1107 t-git-config dgit-distro.test-dummy.git-check ssh-cmd
1108 t-git-config dgit-distro.test-dummy.git-create true
1109 t-git-config dgit-distro.test-dummy.git-url \
1110 "ext::$troot/dsd-ssh X %S /dgit/test-dummy/repos"
1112 t-git-config dgit-distro.test-dummy.diverts.drs /drs
1113 t-git-config dgit-distro.test-dummy/drs.ssh "$troot/ssh"
1114 t-git-config dgit-distro.test-dummy/drs.git-url $tmp/git
1115 t-git-config dgit-distro.test-dummy/drs.git-check ssh-cmd
1116 t-git-config dgit-distro.test-dummy/drs.git-create ssh-cmd
1118 echo 'no-such-package* drs' >$drs_dispatch/diverts
1122 : '(((((((((((((((((((((((((((((((((((((((('
1123 ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
1124 : '))))))))))))))))))))))))))))))))))))))))'
1127 t-policy-nonexist () {
1128 ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
1131 t-make-hook-link () {
1132 local hook=$1 # in infra/
1134 hook=${DGIT_INFRA_PFX}$hook
1137 *) hook=`type -P $hook` ;;
1139 ln -sf "$hook" $linkpath
1144 t-make-hook-link $policyhook $drs_dispatch/policy-hook
1149 t-policy dgit-repos-policy-debian
1152 t-policy-admin create-db
1155 t-policy-periodic () {
1156 : '(((((((((((((((((((((((((((((((((((((((('
1157 ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
1158 test-dummy $drs_dispatch '' --cron
1159 : '))))))))))))))))))))))))))))))))))))))))'
1162 t-buildproductsdir-config () {
1164 t-git-config dgit.default.build-products-dir $bpd
1166 cat <<END >>$tmp/.gbp.conf
1173 local restriction=$1
1174 (cd $root; t-restriction-$restriction >&2)
1178 : "Hopefully installed: $*"
1185 export DGIT_TEST_TESTNAME="$testname"
1186 export DGIT_TEST_TMPBASE="$tmpbase"
1194 t-chain-test "${t#*-}"
1197 t-git-config dgit.default.old-dsc-distro test-dummy
1199 for import in ${autoimport-gnupg}; do
1203 t-setup-import $import