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='1530000000 +0100'
37 export GIT_AUTHOR_DATE='1530000000 +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 -s $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" ;;
407 t-check-only-bpd () {
408 if [ "$bpd" = .. ]; then return; fi
410 ../*.{deb,changes,dsc,buildinfo} \
417 for d in $tmp/*/.git $tmp/git/*.git; do
425 : '========================================'
432 t-save-artifacts () {
433 artifacts="$AUTOPKGTEST_ARTIFACTS"
434 if [ x"$artifacts" = x ]; then return; fi
435 if [ x"tmp" = x ]; then return; fi
436 GZIP=-1v tar -C "$tmp" -zc -f "$artifacts/${0##*/}.tar.gz" \
440 t-rm-dput-dropping () {
441 rm -f $tmp/${p}_${v}_*.upload
445 local dgit=${DGIT_TEST-dgit}
448 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
449 $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
450 ${dgit_config_debian_alias-"--config-lookup-explode=dgit-distro.debian.alias-canon"} \
451 ${DGIT_GITDEBREBASE_TEST+--git-debrebase=}${DGIT_GITDEBREBASE_TEST} \
452 ${distro+${distro:+-d}}${distro--dtest-dummy} \
453 $DGIT_TEST_OPTS $DGIT_TEST_DEBUG \
454 -kBCD22CD83243B79D3DFAC33EA3DBCBC039B13D8A $t_dgit_xopts "$@"
455 : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
462 (export LC_ALL=C.UTF-8
463 if [ "$DGIT_TEST_INTREE" ]; then
464 make -C $DGIT_TEST_INTREE $page.$section.view
471 diff --exclude=.git --exclude=.pc -ruN $*
474 t-files-notexist () {
483 t-cloned-fetched-good () {
484 t-diff-nogit ../extract/$p-${v%-*} .
485 t-clean-on-branch dgit/sid
488 refs/heads/dgit/sid \
489 refs/remotes/dgit/dgit/sid
490 t-refs-notexist refs/dgit/unstable refs/remotes/dgit/dgit/unstable
494 printf "%s${1:+\n}" "$1" >$tmp/t.want
497 diff $tmp/t.want $tmp/t.got
500 t-clean-on-branch () {
501 t-output "## $1" git status -b --porcelain
509 local import=IMPORT.${DGIT_TEST_TESTNAME-${0##*/}}
510 exec 4>$tmp/$import.new
513 for vn in $savevars; do
514 perl >&4 -"I$root" -MDebian::Dgit -e '
515 printf "%s=%s\n", $ARGV[0], shellquote $ARGV[1]
516 ' $vn "$(eval "printf '%s\n' \"\$$vn\"")"
519 (set -e; cd $tmp; tar cf $import.tar $savedirs)
521 printf >&4 "\n%s\n" "$importeval"
523 mv -f $tmp/$import.new $tmp/$import
531 if [ "x$tmpbase" = x ]; then
532 # ADTTMP was set on entry to tests/lib, so we
533 # are not sharing tmp area between tests
535 lock="$tmp/.dummy.lock"
537 setupsrc="$tmpbase/$setupname"
538 lock="$setupsrc.lock"
541 local simport="$setupsrc/IMPORT.$setupname"
543 if ! [ -e "$simport" ]; then
544 with-lock-ex -w "$lock" \
545 xargs -0 -a $tmp/.save-env \
548 setupname="$1"; shift
550 if [ -e "$simport" ]; then exit 0; fi
552 "tests/setup/$setupname"
553 ' x "$root" "$setupname" "$simport"
556 if [ "x$setupsrc" != "x$tmp" ]; then
557 (set -e; cd $tmp; tar xf "$simport.tar")
563 t-git-get-ref-exact () {
565 # does not dereference, unlike t-git-get-ref
568 *) fail "t-git-get-ref-exact bad $ref" ;;
570 git for-each-ref --format='%(objectname)' "[r]efs/${ref#refs/}"
577 *) fail "t-git-get-ref bad $ref" ;;
579 (git show-ref -d $1 || test $? = 1) | perl -ne '
580 $x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#;
581 END { print "$x\n" if length $x; }
585 t-ref-same-exact () {
587 local val; val=`t-git-get-ref-exact $name`
588 t-ref-same-val "$name" $val
593 local val; val=`t-git-get-ref $name`
594 t-ref-same-val "$name" $val
598 local val; val=`git rev-parse HEAD`
599 t-ref-same-val HEAD $val
605 case "${t_ref_val-unset}" in
608 *) fail "ref varies: ($name)\
609 ${val:-nothing} != ${t_ref_val:-nothing} (${t_ref_names[*]})" ;;
612 t_ref_names+=("$name")
615 t-refs-same-start () {
630 val=`t-git-get-ref $g`
631 if [ "x$val" != x ]; then
632 fail "ref $g unexpectedly exists ($val)"
638 echo refs/tags/$tagpfx/${v//\~/_}
642 git log -n1 --pretty=format:"$1" "$2"
645 t-sametree-parent () {
648 local ctree; ctree=$(t-format-ref '%T' "$ref")
651 for parent in $(t-format-ref '%P' "$ref"); do
652 local ptree; ptree=$(t-format-ref '%T' "$parent")
653 if [ "x$ptree" = "x$ctree" ]; then
657 case "$psame" in ""|" * *") break ;; esac
663 t-check-pushed-master () {
664 local master; master=`t-git-get-ref refs/heads/master`
665 if [ x$master = x$t_ref_val ]; then return; fi
666 if [ x$master = x ]; then fail "failed to push master"; fi
667 # didn't update master, it must be not FF
668 local mbase; mbase=`t-git-merge-base $master $t_ref_val`
669 if [ x$mbase = x$master ]; then fail "failed to ff master"; fi
672 t-push-was-source-only () {
674 t-files-notexist $tmp/incoming/${p}_${v}_*.deb \
675 $tmp/incoming/${p}_${v}_*.udeb
676 # we permit _source.buildinfo files; see test_changes_source_only()
677 for f in $tmp/incoming/${p}_${v}_*.buildinfo; do
680 *_source.buildinfo) ;;
681 *) fail "non-source-only file $f exists!" ;;
689 stat $tmp/incoming/$f
695 local suite=${2:-sid}
701 t-pushed-good-core () {
705 refs/remotes/dgit/dgit/$suite
707 refs/heads/dgit/unstable \
708 refs/remotes/dgit/dgit/unstable
709 (set -e; cd $dgitrepo
713 ${t_check_pushed_master:- : NOT-DRS-NO-CHECK-PUSHED-MASTER}
717 git verify-tag `t-v-tag`
720 t-pushed-good-check-changes () {
721 changes_filename="$tmp/incoming/${p}_${v}_*.changes"
722 grep -E "^Distribution: $suite" $changes_filename
723 grep -E "^Version: $v" $changes_filename
726 t-splitbrain-pushed-good--unpack () {
731 ln -s $tmp/mirror/pool/main/*.orig*.tar* .
732 ln -s $tmp/incoming/*.orig*.tar* . ||:
733 ln -s $incoming_dsc .
734 ln -s ${incoming_dsc/.dsc/.debian.tar}* .
735 dpkg-source "$@" -x *.dsc
738 git fetch ../../$p "refs/tags/*:refs/tags/*"
741 t-splitbrain-pushed-good--checkprep () {
743 git rm --cached -r --ignore-unmatch .pc
746 t-splitbrain-pushed-good--checkdiff () {
748 t-splitbrain-pushed-good--checkprep
749 t-output "" git diff --stat --cached $tag
752 t-splitbrain-pushed-good-start () {
753 dep14tag=refs/tags/test-dummy/${v//\~/_}
755 t-output "" git status --porcelain
757 t-refs-same $dep14tag
758 (set -e; cd $dgitrepo; t-refs-same $dep14tag)
759 git merge-base --is-ancestor $dep14tag $dgittag
762 t-ref-same refs/heads/split.p
763 case "$(t-git-get-ref refs/heads/split.b)" in
765 "$(git rev-parse refs/heads/split.p^0)") ;;
766 "$(git rev-parse refs/heads/split.p^1)") ;;
773 t-splitbrain-pushed-good--unpack
774 t-splitbrain-pushed-good--checkdiff $dgittag
776 t-splitbrain-pushed-good-end-made-dep14 () {
777 t-splitbrain-pushed-good--checkdiff $dep14tag
781 t-splitbrain-rm-gitignore-patch () {
783 next unless $_ eq "auto-gitignore\n";
786 rename "debian/patches/$_", "../t-auto-gitignore" or die $!;
788 ' debian/patches/series
791 t-gbp-pushed-good () {
792 local suite=${1:-sid}
793 t-splitbrain-pushed-good-start
795 # Right, now we want to check that the maintainer tree and
796 # the dgit tree differ in exactly the ways we expect. We
797 # achieve this by trying to reconstruct the maintainer tree
798 # from the dgit tree.
800 # So, unpack it withut the patches applied
801 t-splitbrain-pushed-good--unpack --skip-patches
803 # dgit might have added a .gitignore patch, which we need to
805 t-splitbrain-rm-gitignore-patch
807 # Now the result should differ only in non-debian/ .gitignores
808 t-splitbrain-pushed-good--checkprep
809 git diff --cached --name-only $dep14tag >../changed
811 next if !m#^debian/# && m#(^|/)\.gitignore#;
815 # If we actually apply the gitignore patch by hand, it
817 if [ -f ../t-auto-gitignore ]; then
818 patch --backup-if-mismatch -p1 -u <../t-auto-gitignore
821 t-splitbrain-pushed-good-end-made-dep14
824 t-unapplied-pushed-good () {
825 t-splitbrain-pushed-good-start
826 t-splitbrain-pushed-good--unpack --skip-patches
827 t-splitbrain-pushed-good-end-made-dep14
830 t-dpm-pushed-good () {
831 t-splitbrain-pushed-good-start
832 t-splitbrain-pushed-good--unpack
833 t-splitbrain-rm-gitignore-patch
834 t-splitbrain-pushed-good-end-made-dep14
837 t-commit-build-push-expect-log () {
843 t-dgit push --new 2>&1 |tee $tmp/push.log
844 t-grep-mpat "$mpat" $tmp/push.log
851 use Dpkg::Control::Hash;
852 my $h = new Dpkg::Control::Hash allow_pgp=>1;
853 $h->parse(\*STDIN,"'"$file"'");
854 my $val = $h->{"'$field'"},"\n";
855 die "'"$file $field"'" unless defined $val;
861 export DGIT_TEST_DISTRO=''
863 t-git-config dgit-suite.unstable.distro test-dummy
873 "") '$var'="$tstunt" ;;
874 *) '$var'="$tstunt:$'$var'" ;;
880 t-tstunt--save-real () {
891 p="${p/:"$tmp/tstunt":/:}"
903 *) fail "did not find $f on PATH $PATH" ;;
906 local varname=${f//[^_0-9a-zA-Z]/_}
907 varname=DGIT_TEST_REAL_${varname^^}
910 : \${$varname:=\$real}
916 local tstunt=$tmp/tstunt
917 t-stunt-envvar PATH $tstunt
918 t-stunt-envvar PERLLIB $tstunt
921 t-tstunt--save-real $f
923 local d="$tstunt/${f%/*}"
925 ln -sf "$troot/tstunt/$f" "$d"/.
929 t-tstunt-parsechangelog () {
930 t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm
933 t-tstunt-lintian () {
937 t-tstunt-debuild () {
942 local dsc=${p}_${v}.dsc
943 incoming_dsc=$tmp/incoming/$dsc
948 local val; val=`t-822-field $incoming_dsc Dgit`
951 die "Dgit $_ ?" unless m/^\w+\b/;
952 print $&,"\n" or die $!;
954 t-ref-same-val $incoming_dsc "$val"
961 debdiff ${p}_${v1}.dsc ${p}_${v2}.dsc || test $? = 1) \
965 t-gbp-unapplied-pq2qc () {
966 # does `gbp pq export'
967 # commits the resulting debian/patches on qc/BRANCH
968 # leaves us on qc/BRANCH (eg "qc/quilt-tip"))
969 # qc/BRANCH is not fast-forwarding
973 branch=`git symbolic-ref HEAD`
974 branch=${branch#refs/heads/}
977 */*) fail "unexpected branch $branch" ;;
980 git branch -f qc/$branch
981 git checkout qc/$branch
982 git add debian/patches
983 git commit -m 'Commit patch queue'
986 t-git-pseudo-merge () {
987 # like git merge -s ours
988 if [ ! "$git_pseuomerge_opts" ]; then
989 if git merge --help \
990 | grep -q allow-unrelated-histories; then
991 git_pseuomerge_opts='--allow-unrelated-histories'
993 git_pseuomerge_opts+=' -s ours'
995 git merge $git_pseuomerge_opts "$@"
998 t-gbp-example-prep-no-ff () {
999 t-tstunt-parsechangelog
1000 t-archive example 1.0-1
1008 git checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip
1011 echo '/* some comment */' >>src.c
1013 git commit -m 'Add a comment to an upstream file'
1015 t-gbp-unapplied-pq2qc
1017 t-commit 'some updates' 1.0-2
1020 t-gbp-example-prep () {
1021 t-gbp-example-prep-no-ff
1023 t-git-pseudo-merge \
1024 -m 'Pseudo-merge to make descendant of archive' \
1025 remotes/dgit/dgit/sid
1028 t-make-badcommit () {
1030 git cat-file commit HEAD | \
1031 perl -pe 's/^committer /commiter /' | \
1032 git hash-object -w -t commit --stdin
1034 t-expect-fsck-fail $badcommit
1038 # leaves ust set to filename of orig tarball
1042 ust=${p}_${v}.orig.tar.gz
1043 GZIP=-1 git archive -o $bpd/$ust --prefix=${p}-${v}/ $tag
1046 t-merge-conflicted-stripping-conflict-markers () {
1047 local otherbranch=$1
1050 t-expect-fail F:"Merge conflict in $file" \
1051 git merge $otherbranch
1053 perl -i~ -ne 'print unless m{^(?:\<\<\<|\>\>\>|===)}' "$file"
1055 git commit --no-edit
1060 v=${2:-${majorv:-1}.$revision}
1061 $troot/tstunt/debchange \
1062 --force-distribution -v$v --distribution ${3:-unstable} "$1"
1063 git add debian/changelog
1065 revision=$(( ${revision-0} + 1 ))
1069 local cmd="$1"; shift
1070 local suite=${1-unstable}
1071 $cmd -r -D "$suite" ''
1075 t-dch-r-rune t-dch-commit "$@"
1079 $troot/tstunt/debchange "$@"
1080 git commit -m "dch $*" debian/changelog
1084 git config --global "$@"
1088 t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S "
1089 t-git-config dgit-distro.test-dummy.git-check true
1090 t-git-config dgit-distro.test-dummy.git-create true
1091 t-git-config dgit-distro.test-dummy.dgit-tag-format new,old,maint
1092 cp $troot/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/.
1093 cp $troot/suites $tmp/.
1094 cp $troot/suites $tmp/suites-master
1096 export t_check_pushed_master=t-check-pushed-master
1098 drs_dispatch=$tmp/distro=test-dummy
1101 if [ "x$DGIT_TEST_INTREE" != x ]; then
1102 ln -sf "$DGIT_TEST_INTREE" $drs_dispatch/dgit-live
1105 ln -sf $tmp/git $drs_dispatch/repos
1106 ln -sf $tmp/suites $tmp/suites-master $tmp/dm.txt $drs_dispatch/
1107 mkdir -p $drs_dispatch/keyrings
1108 ln -sf $tmp/dd.gpg $drs_dispatch/keyrings/debian-keyring.gpg
1109 ln -sf $tmp/dm.gpg $drs_dispatch/keyrings/debian-maintainers.gpg
1110 ln -sf /bin/true $drs_dispatch/policy-hook
1114 export tagpfx=archive/test-dummy
1115 t-git-config dgit-distro.test-dummy.dgit-tag-format new,maint
1118 export tagpfx=test-dummy
1119 t-git-config dgit-distro.test-dummy.dgit-tag-format old
1124 t-git-config dgit-distro.test-dummy.ssh "$troot/dsd-ssh"
1125 t-git-config dgit-distro.test-dummy.git-check ssh-cmd
1126 t-git-config dgit-distro.test-dummy.git-create true
1127 t-git-config dgit-distro.test-dummy.git-url \
1128 "ext::$troot/dsd-ssh X %S /dgit/test-dummy/repos"
1130 t-git-config dgit-distro.test-dummy.diverts.drs /drs
1131 t-git-config dgit-distro.test-dummy/drs.ssh "$troot/ssh"
1132 t-git-config dgit-distro.test-dummy/drs.git-url $tmp/git
1133 t-git-config dgit-distro.test-dummy/drs.git-check ssh-cmd
1134 t-git-config dgit-distro.test-dummy/drs.git-create ssh-cmd
1136 echo 'no-such-package* drs' >$drs_dispatch/diverts
1140 : '(((((((((((((((((((((((((((((((((((((((('
1141 ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
1142 : '))))))))))))))))))))))))))))))))))))))))'
1145 t-policy-nonexist () {
1146 ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
1149 t-make-hook-link () {
1150 local hook=$1 # in infra/
1152 hook=${DGIT_INFRA_PFX}$hook
1155 *) hook=`type -P $hook` ;;
1157 ln -sf "$hook" $linkpath
1162 t-make-hook-link $policyhook $drs_dispatch/policy-hook
1167 t-policy dgit-repos-policy-debian
1170 t-policy-admin create-db
1173 t-policy-periodic () {
1174 : '(((((((((((((((((((((((((((((((((((((((('
1175 ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
1176 test-dummy $drs_dispatch '' --cron
1177 : '))))))))))))))))))))))))))))))))))))))))'
1180 t-buildproductsdir-config () {
1182 t-git-config dgit.default.build-products-dir $bpd
1184 cat <<END >>$tmp/.gbp.conf
1191 local restriction=$1
1192 (cd $root; t-restriction-$restriction >&2)
1196 : "Hopefully installed: $*"
1203 export DGIT_TEST_TESTNAME="$testname"
1204 export DGIT_TEST_TMPBASE="$tmpbase"
1212 t-chain-test "${t#*-}"
1215 t-git-config dgit.default.old-dsc-distro test-dummy
1217 for import in ${autoimport-gnupg}; do
1221 t-setup-import $import