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'
39 export LC_CTYPE=C.UTF-8
43 testname="${DGIT_TEST_TESTNAME-${0##*/}}"
44 export DGIT_TEST_TROOT=$troot
48 if [ x"$tmp" = x ]; then
49 export DGIT_TEST_BYHAND=1
52 tmp=tests/tmp/$testname
55 elif [ "x$DGIT_TEST_TMPBASE" != x ]; then
56 tmpbase="$DGIT_TEST_TMPBASE"
64 test -f $tmp/.save-env || \
65 env -0 >$tmp/.save-env
69 export DEBCHANGE_VENDOR=dpkg
73 mkdir -p $tmp/incoming
74 cat <<END >$tmp/dput.cf
77 incoming = $tmp/incoming
81 schroot=${DGIT_SCHROOT_CHROOT:-build}
82 # Pretty much any Debian sid snapshot schroot will do.
84 : ${t_archive_method:=aq}
85 : ${tagpfx:=archive/test-dummy}
86 : ${suitespecs:=sid:unstable}
89 GIT_COMMITTER_DATE="$(( ${GIT_COMMITTER_DATE%% *} + 1 )) ${GIT_COMMITTER_DATE#* }"
90 GIT_AUTHOR_DATE="$GIT_COMMITTER_DATE"
94 local mpat="$1"; shift
97 LC_MESSAGES=${expect_fail_lcmessages-C} \
98 LANGUAGE=${expect_fail_lcmessages-C} \
99 "$@" 2>&1 | tee $tmp/t.output
100 local ps="${PIPESTATUS[*]}"
104 "0 0") fail "command unexpectedly succeeded (instead of: $mpat)" ;;
106 *) fail "tee failed" ;;
109 t-grep-mpat "$mpat" $tmp/t.output
120 E:*) grepper=egrep ;;
121 F:*) grepper=fgrep ;;
122 *) fail "bad mpat prefix in $mpat";;
128 $grepper -e "$mpat" "$file" ||
129 fail "message not found"
132 t-expect-push-fail () {
133 local mpat="$1"; shift
135 local triedpush; triedpush=`git rev-parse HEAD`
138 t-expect-fail "$mpat" "$@"
140 diff $tmp/show-refs.{pre,post}-push
142 t-git-objects-not-present '' $triedpush
144 eval "$t_expect_push_fail_hook"
147 t-git-objects-not-present () {
148 # t-git-objects-not-present GITDIR|'' OBJID [...]
149 # specifying '' means the repo for package $p
150 local gitdir="${1-$dgitrepo}"
152 if ! [ -e "$gitdir" ]; then return; fi
155 t-expect-fail 'unable to find' \
161 local whichoutput=$1; shift
162 local whichrepo=${1-$dgitrepo}
163 local outputfile="$tmp/show-refs.$whichoutput"
166 if test -d $whichrepo; then
174 local edittree=$1.edit
175 if test -d "$edittree"; then
176 cp -a "$edittree"/* .
184 t-untar $troot/worktrees/${p}_$1
187 t-select-package () {
189 dgitrepo=$tmp/git/$p.git
196 local gs=$troot/git-srcs/${p}_$v.git
197 (set -e; cd $tmp/git; t-untar $gs)
202 (set -e; cd $tmp/git; tar xf $troot/git-template.tar)
205 t-salsa-add-remote () {
206 local d=$tmp/salsa/$p
208 (set -e; cd $d; git init --bare)
209 git remote add ${1-origin} $d
212 t-git-merge-base () {
213 git merge-base $1 $2 || test $? = 1
217 # t-has-ancestor ANCESTOR
218 # (CHILD is implicit, HEAD)
219 local now; now=`git rev-parse HEAD`
220 local ancestor; ancestor=`git rev-parse $1^{}`
221 local mbase; mbase=`t-git-merge-base $ancestor $now`
222 if [ x$mbase != x$ancestor ]; then
223 fail "not ff $ancestor..$now, $mbase != $ancestor"
227 t-has-parent-or-is () {
228 # t-has-parent-or-is CHILD PARENT
232 parents=$(git show --pretty=format:' %P %H ' "$child")
233 parent=$(git rev-parse "$parent~0")
236 *) fail "child $child lacks parent $parent" ;;
240 t-prep-newpackage () {
247 if ! git show-ref --verify --quiet refs/heads/master; then
248 git branch -m dgit/sid master
256 t-archive-none-$t_archive_method
258 t-archive-none-aq () {
259 mkdir -p $tmp/aq/dsc_in_suite $tmp/mirror/pool/main
265 for suitespec in $suitespecs; do
266 local suite=${suitespec%%:*}
267 local sname=${suitespec#*:}
269 >$tmp/aq/package.$suite.$p
270 t-aq-archive-updated $suite $p
272 >$tmp/aq/package.new.$p
273 t-aq-archive-updated new $p
275 ln -sf $suite $tmp/aq/dsc_in_suite/$sname
277 cat <<END >>$tmp/aq/suites
280 "archive" : "ftp-master",
281 "codename" : "$suite",
294 cat <<END >>$tmp/aq/suites
300 t-aq-archive-updated () {
303 local suitedir=$tmp/aq/dsc_in_suite/$suite
305 perl <$tmp/aq/package.$suite.$p >$suitedir/$p -wne '
309 m{^(\S+) (\w+) ([^ \t/]+)/(\S+)} or die;
317 my $json = JSON->new->canonical();
318 print $json->encode(\@v) or die $!;
323 t-archive-process-incoming () {
325 mv $tmp/incoming/${p}_* $tmp/mirror/pool/main/
326 t-archive-query "$suite"
331 local dscf=main/${p}_${v}.dsc
332 t-archive-query-$t_archive_method "$suite" "$p" "$v" "$dscf"
334 t-archive-query-aq () {
339 local sha; sha=`sha256sum <$tmp/mirror/pool/$dscf`
340 echo "${v} ${sha% -} $dscf" >>$tmp/aq/package.$suite.${p}
341 t-aq-archive-updated $suite $p
347 local dscf=${p}_$2.dsc
348 rm -f $tmp/mirror/pool/main/${p}_*
349 ln -s $troot/pkg-srcs/${p}_${2%-*}* $tmp/mirror/pool/main/
350 t-archive-query $suite
353 (set -e; cd $tmp/extract; dpkg-source -x ../mirror/pool/main/$dscf)
356 t-git-dir-time-passes () {
357 touch -d 'last year' $dgitrepo
361 local gitdir=$dgitrepo
364 if test -e "$gitdir"; then fail "$gitdir exists"; fi
367 public) wantstat='7[75]5' ;;
368 secret) wantstat='7[70]0' ;;
369 *) fail "$1 t-git-dir-check ?" ;;
371 gotstat=`stat -c%a $gitdir`
373 *$wantstat) return ;;
374 *) fail "$gitdir has mode $gotstat, expected $wantstat" ;;
378 t-expect-fsck-fail () {
379 echo >>$tmp/fsck.expected-errors "$1"
383 local fsckerrs=$(git rev-parse --git-dir)/dgit-test-fsck.errs
386 LC_MESSAGES=C git fsck --no-dangling --strict 2>&1 \
388 ps="${PIPESTATUS[*]}"
392 if [ -f $tmp/fsck.expected-errors ]; then
393 pats=(-w -f $tmp/fsck.expected-errors)
397 pats+=(-e 'notice: HEAD points to an unborn branch')
398 pats+=(-e 'notice: No default references')
401 grep -v "${pats[@]}" $fsckerrs
405 1) ;; # no unexpected errors
406 0) fail "unexpected messages from git-fsck" ;;
407 *) fail "grep of git-fsck failed" ;;
411 t-check-only-bpd () {
412 if [ "$bpd" = .. ]; then return; fi
414 $tmp/*.{deb,changes,dsc,buildinfo} \
421 for d in $tmp/*/.git $tmp/git/*.git; do
429 : '========================================'
436 t-save-artifacts () {
437 artifacts="$AUTOPKGTEST_ARTIFACTS"
438 if [ x"$artifacts" = x ]; then return; fi
439 if [ x"tmp" = x ]; then return; fi
440 GZIP=-1v tar -C "$tmp" -zc -f "$artifacts/${0##*/}.tar.gz" \
444 t-rm-dput-dropping () {
445 rm -f $tmp/${p}_${v}_*.upload
449 local dgit=${DGIT_TEST-dgit}
452 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
453 $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
454 ${dgit_config_debian_alias-"--config-lookup-explode=dgit-distro.debian.alias-canon"} \
455 ${DGIT_GITDEBREBASE_TEST+--git-debrebase=}${DGIT_GITDEBREBASE_TEST} \
456 ${distro+${distro:+-d}}${distro--dtest-dummy} \
457 $DGIT_TEST_OPTS $DGIT_TEST_DEBUG \
458 -kBCD22CD83243B79D3DFAC33EA3DBCBC039B13D8A $t_dgit_xopts "$@"
459 : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
466 (export LC_ALL=C.UTF-8
467 if [ "$DGIT_TEST_INTREE" ]; then
468 make -C $DGIT_TEST_INTREE $page.$section.view
475 diff --exclude=.git --exclude=.pc -ruN $*
478 t-files-notexist () {
487 t-cloned-fetched-good () {
488 t-diff-nogit ../extract/$p-${v%-*} .
489 t-clean-on-branch dgit/sid
492 refs/heads/dgit/sid \
493 refs/remotes/dgit/dgit/sid
494 t-refs-notexist refs/dgit/unstable refs/remotes/dgit/dgit/unstable
498 printf "%s${1:+\n}" "$1" >$tmp/t.want
501 diff $tmp/t.want $tmp/t.got
504 t-clean-on-branch () {
505 t-output "## $1" git status -b --porcelain
513 local import=IMPORT.${DGIT_TEST_TESTNAME-${0##*/}}
514 exec 4>$tmp/$import.new
517 for vn in $savevars; do
518 perl >&4 -"I$root" -MDebian::Dgit -e '
519 printf "%s=%s\n", $ARGV[0], shellquote $ARGV[1]
520 ' $vn "$(eval "printf '%s\n' \"\$$vn\"")"
523 (set -e; cd $tmp; tar cf $import.tar $savedirs)
525 printf >&4 "\n%s\n" "$importeval"
527 mv -f $tmp/$import.new $tmp/$import
535 if [ "x$tmpbase" = x ]; then
536 # ADTTMP was set on entry to tests/lib, so we
537 # are not sharing tmp area between tests
539 lock="$tmp/.dummy.lock"
541 setupsrc="$tmpbase/$setupname"
542 lock="$setupsrc.lock"
545 local simport="$setupsrc/IMPORT.$setupname"
547 if ! [ -e "$simport" ]; then
548 with-lock-ex -w "$lock" \
549 xargs -0 -a $tmp/.save-env \
552 setupname="$1"; shift
554 if [ -e "$simport" ]; then exit 0; fi
556 "tests/setup/$setupname"
557 ' x "$root" "$setupname" "$simport"
560 if [ "x$setupsrc" != "x$tmp" ]; then
561 (set -e; cd $tmp; tar xf "$simport.tar")
567 t-git-get-ref-exact () {
569 # does not dereference, unlike t-git-get-ref
572 *) fail "t-git-get-ref-exact bad $ref" ;;
574 git for-each-ref --format='%(objectname)' "[r]efs/${ref#refs/}"
581 *) fail "t-git-get-ref bad $ref" ;;
583 (git show-ref -d $1 || test $? = 1) | perl -ne '
584 $x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#;
585 END { print "$x\n" if length $x; }
589 t-ref-same-exact () {
591 local val; val=`t-git-get-ref-exact $name`
592 t-ref-same-val "$name" $val
597 local val; val=`t-git-get-ref $name`
598 t-ref-same-val "$name" $val
602 local val; val=`git rev-parse HEAD`
603 t-ref-same-val HEAD $val
609 case "${t_ref_val-unset}" in
612 *) fail "ref varies: ($name)\
613 ${val:-nothing} != ${t_ref_val:-nothing} (${t_ref_names[*]})" ;;
616 t_ref_names+=("$name")
619 t-refs-same-start () {
634 val=`t-git-get-ref $g`
635 if [ "x$val" != x ]; then
636 fail "ref $g unexpectedly exists ($val)"
642 echo refs/tags/$tagpfx/${v//\~/_}
646 git log -n1 --pretty=format:"$1" "$2"
649 t-sametree-parent () {
652 local ctree; ctree=$(t-format-ref '%T' "$ref")
655 for parent in $(t-format-ref '%P' "$ref"); do
656 local ptree; ptree=$(t-format-ref '%T' "$parent")
657 if [ "x$ptree" = "x$ctree" ]; then
661 case "$psame" in ""|" * *") break ;; esac
667 t-check-pushed-master () {
668 local master; master=`t-git-get-ref refs/heads/master`
669 if [ x$master = x$t_ref_val ]; then return; fi
670 if [ x$master = x ]; then fail "failed to push master"; fi
671 # didn't update master, it must be not FF
672 local mbase; mbase=`t-git-merge-base $master $t_ref_val`
673 if [ x$mbase = x$master ]; then fail "failed to ff master"; fi
676 t-push-was-source-only () {
678 t-files-notexist $tmp/incoming/${p}_${v}_*.deb \
679 $tmp/incoming/${p}_${v}_*.udeb
680 # we permit _source.buildinfo files; see test_changes_source_only()
681 for f in $tmp/incoming/${p}_${v}_*.buildinfo; do
684 *_source.buildinfo) ;;
685 *) fail "non-source-only file $f exists!" ;;
693 stat $tmp/incoming/$f
699 local suite=${2:-sid}
705 t-pushed-good-core () {
709 refs/remotes/dgit/dgit/$suite
711 refs/heads/dgit/unstable \
712 refs/remotes/dgit/dgit/unstable
713 (set -e; cd $dgitrepo
717 ${t_check_pushed_master:- : NOT-DRS-NO-CHECK-PUSHED-MASTER}
721 git verify-tag `t-v-tag`
724 t-pushed-good-check-changes () {
725 changes_filename="$tmp/incoming/${p}_${v}_*.changes"
726 grep -E "^Distribution: $suite" $changes_filename
727 grep -E "^Version: $v" $changes_filename
730 t-splitbrain-pushed-good--unpack () {
735 ln -s $tmp/mirror/pool/main/*.orig*.tar* .
736 ln -s $tmp/incoming/*.orig*.tar* . ||:
737 ln -s $incoming_dsc .
738 ln -s ${incoming_dsc/.dsc/.debian.tar}* .
739 dpkg-source "$@" -x *.dsc
742 git fetch ../../$p "refs/tags/*:refs/tags/*"
745 t-splitbrain-pushed-good--checkprep () {
747 git rm --cached -r --ignore-unmatch .pc
750 t-splitbrain-pushed-good--checkdiff () {
752 t-splitbrain-pushed-good--checkprep
753 t-output "" git diff --stat --cached $tag
756 t-splitbrain-pushed-good-start () {
757 dep14tag=refs/tags/test-dummy/${v//\~/_}
759 t-output "" git status --porcelain
761 t-refs-same $dep14tag
762 (set -e; cd $dgitrepo; t-refs-same $dep14tag)
763 git merge-base --is-ancestor $dep14tag $dgittag
766 t-ref-same refs/heads/split.p
767 case "$(t-git-get-ref refs/heads/split.b)" in
769 "$(git rev-parse refs/heads/split.p^0)") ;;
770 "$(git rev-parse refs/heads/split.p^1)") ;;
777 t-splitbrain-pushed-good--unpack
778 t-splitbrain-pushed-good--checkdiff $dgittag
780 t-splitbrain-pushed-good-end-made-dep14 () {
781 t-splitbrain-pushed-good--checkdiff $dep14tag
785 t-splitbrain-rm-gitignore-patch () {
787 next unless $_ eq "auto-gitignore\n";
790 rename "debian/patches/$_", "../t-auto-gitignore" or die $!;
792 ' debian/patches/series
795 t-gbp-pushed-good () {
796 local suite=${1:-sid}
797 t-splitbrain-pushed-good-start
799 # Right, now we want to check that the maintainer tree and
800 # the dgit tree differ in exactly the ways we expect. We
801 # achieve this by trying to reconstruct the maintainer tree
802 # from the dgit tree.
804 # So, unpack it withut the patches applied
805 t-splitbrain-pushed-good--unpack --skip-patches
807 # dgit might have added a .gitignore patch, which we need to
809 t-splitbrain-rm-gitignore-patch
811 # Now the result should differ only in non-debian/ .gitignores
812 t-splitbrain-pushed-good--checkprep
813 git diff --cached --name-only $dep14tag >../changed
815 next if !m#^debian/# && m#(^|/)\.gitignore#;
819 # If we actually apply the gitignore patch by hand, it
821 if [ -f ../t-auto-gitignore ]; then
822 patch --backup-if-mismatch -p1 -u <../t-auto-gitignore
825 t-splitbrain-pushed-good-end-made-dep14
828 t-unapplied-pushed-good () {
829 t-splitbrain-pushed-good-start
830 t-splitbrain-pushed-good--unpack --skip-patches
831 t-splitbrain-pushed-good-end-made-dep14
834 t-dpm-pushed-good () {
835 t-splitbrain-pushed-good-start
836 t-splitbrain-pushed-good--unpack
837 t-splitbrain-rm-gitignore-patch
838 t-splitbrain-pushed-good-end-made-dep14
841 t-commit-build-push-expect-log () {
847 t-dgit push --new 2>&1 |tee $tmp/push.log
848 t-grep-mpat "$mpat" $tmp/push.log
855 use Dpkg::Control::Hash;
856 my $h = new Dpkg::Control::Hash allow_pgp=>1;
857 $h->parse(\*STDIN,"'"$file"'");
858 my $val = $h->{"'$field'"},"\n";
859 die "'"$file $field"'" unless defined $val;
865 export DGIT_TEST_DISTRO=''
867 t-git-config dgit-suite.unstable.distro test-dummy
877 "") '$var'="$tstunt" ;;
878 *) '$var'="$tstunt:$'$var'" ;;
884 t-tstunt--save-real () {
895 p="${p/:"$tmp/tstunt":/:}"
907 *) fail "did not find $f on PATH $PATH" ;;
910 local varname=${f//[^_0-9a-zA-Z]/_}
911 varname=DGIT_TEST_REAL_${varname^^}
914 : \${$varname:=\$real}
920 local tstunt=$tmp/tstunt
921 t-stunt-envvar PATH $tstunt
922 t-stunt-envvar PERLLIB $tstunt
925 t-tstunt--save-real $f
927 local d="$tstunt/${f%/*}"
929 ln -sf "$troot/tstunt/$f" "$d"/.
933 t-tstunt-parsechangelog () {
934 t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm
937 t-tstunt-lintian () {
941 t-tstunt-debuild () {
946 local dsc=${p}_${v}.dsc
947 incoming_dsc=$tmp/incoming/$dsc
952 local val; val=`t-822-field $incoming_dsc Dgit`
955 die "Dgit $_ ?" unless m/^\w+\b/;
956 print $&,"\n" or die $!;
958 t-ref-same-val $incoming_dsc "$val"
965 debdiff ${p}_${v1}.dsc ${p}_${v2}.dsc || test $? = 1) \
969 t-gbp-unapplied-pq2qc () {
970 # does `gbp pq export'
971 # commits the resulting debian/patches on qc/BRANCH
972 # leaves us on qc/BRANCH (eg "qc/quilt-tip"))
973 # qc/BRANCH is not fast-forwarding
977 branch=`git symbolic-ref HEAD`
978 branch=${branch#refs/heads/}
981 */*) fail "unexpected branch $branch" ;;
984 git branch -f qc/$branch
985 git checkout qc/$branch
986 git add debian/patches
987 git commit -m 'Commit patch queue'
990 t-git-pseudo-merge () {
991 # like git merge -s ours
992 if [ ! "$git_pseuomerge_opts" ]; then
993 if git merge --help \
994 | grep -q allow-unrelated-histories; then
995 git_pseuomerge_opts='--allow-unrelated-histories'
997 git_pseuomerge_opts+=' -s ours'
999 git merge $git_pseuomerge_opts "$@"
1002 t-gbp-example-prep-no-ff () {
1003 t-tstunt-parsechangelog
1004 t-archive example 1.0-1
1012 git checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip
1015 echo '/* some comment */' >>src.c
1017 git commit -m 'Add a comment to an upstream file'
1019 t-gbp-unapplied-pq2qc
1021 t-commit 'some updates' 1.0-2
1024 t-gbp-example-prep () {
1025 t-gbp-example-prep-no-ff
1027 t-git-pseudo-merge \
1028 -m 'Pseudo-merge to make descendant of archive' \
1029 remotes/dgit/dgit/sid
1032 t-make-badcommit () {
1034 git cat-file commit HEAD | \
1035 perl -pe 's/^committer /commiter /' | \
1036 git hash-object -w -t commit --stdin
1038 t-expect-fsck-fail $badcommit
1042 # leaves ust set to filename of orig tarball
1046 ust=${p}_${v}.orig.tar.gz
1047 GZIP=-1 git archive -o $bpd/$ust --prefix=${p}-${v}/ $tag
1050 t-merge-conflicted-stripping-conflict-markers () {
1051 local otherbranch=$1
1054 t-expect-fail F:"Merge conflict in $file" \
1055 git merge $otherbranch
1057 perl -i~ -ne 'print unless m{^(?:\<\<\<|\>\>\>|===)}' "$file"
1059 git commit --no-edit
1064 v=${2:-${majorv:-1}.$revision}
1065 $troot/tstunt/debchange \
1066 --force-distribution -v$v --distribution ${3:-unstable} "$1"
1067 git add debian/changelog
1069 revision=$(( ${revision-0} + 1 ))
1073 local cmd="$1"; shift
1074 local suite=${1-unstable}
1075 $cmd -r -D "$suite" ''
1079 t-dch-r-rune t-dch-commit "$@"
1083 $troot/tstunt/debchange "$@"
1084 git commit -m "dch $*" debian/changelog
1088 git config --global "$@"
1092 t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S "
1093 t-git-config dgit-distro.test-dummy.git-check true
1094 t-git-config dgit-distro.test-dummy.git-create true
1095 t-git-config dgit-distro.test-dummy.dgit-tag-format new,old,maint
1096 cp $troot/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/.
1097 cp $troot/suites $tmp/.
1098 cp $troot/suites $tmp/suites-master
1100 export t_check_pushed_master=t-check-pushed-master
1102 drs_dispatch=$tmp/distro=test-dummy
1105 if [ "x$DGIT_TEST_INTREE" != x ]; then
1106 ln -sf "$DGIT_TEST_INTREE" $drs_dispatch/dgit-live
1109 ln -sf $tmp/git $drs_dispatch/repos
1110 ln -sf $tmp/suites $tmp/suites-master $tmp/dm.txt $drs_dispatch/
1111 mkdir -p $drs_dispatch/keyrings
1112 ln -sf $tmp/dd.gpg $drs_dispatch/keyrings/debian-keyring.gpg
1113 ln -sf $tmp/dm.gpg $drs_dispatch/keyrings/debian-maintainers.gpg
1114 ln -sf /bin/true $drs_dispatch/policy-hook
1118 export tagpfx=archive/test-dummy
1119 t-git-config dgit-distro.test-dummy.dgit-tag-format new,maint
1122 export tagpfx=test-dummy
1123 t-git-config dgit-distro.test-dummy.dgit-tag-format old
1128 t-git-config dgit-distro.test-dummy.ssh "$troot/dsd-ssh"
1129 t-git-config dgit-distro.test-dummy.git-check ssh-cmd
1130 t-git-config dgit-distro.test-dummy.git-create true
1131 t-git-config dgit-distro.test-dummy.git-url \
1132 "ext::$troot/dsd-ssh X %S /dgit/test-dummy/repos"
1134 t-git-config dgit-distro.test-dummy.diverts.drs /drs
1135 t-git-config dgit-distro.test-dummy/drs.ssh "$troot/ssh"
1136 t-git-config dgit-distro.test-dummy/drs.git-url $tmp/git
1137 t-git-config dgit-distro.test-dummy/drs.git-check ssh-cmd
1138 t-git-config dgit-distro.test-dummy/drs.git-create ssh-cmd
1140 echo 'no-such-package* drs' >$drs_dispatch/diverts
1144 : '(((((((((((((((((((((((((((((((((((((((('
1145 ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
1146 : '))))))))))))))))))))))))))))))))))))))))'
1149 t-policy-nonexist () {
1150 ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
1153 t-make-hook-link () {
1154 local hook=$1 # in infra/
1156 hook=${DGIT_INFRA_PFX}$hook
1159 *) hook=`type -P $hook` ;;
1161 ln -sf "$hook" $linkpath
1166 t-make-hook-link $policyhook $drs_dispatch/policy-hook
1171 t-policy dgit-repos-policy-debian
1174 t-policy-admin create-db
1177 t-policy-periodic () {
1178 : '(((((((((((((((((((((((((((((((((((((((('
1179 ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
1180 test-dummy $drs_dispatch '' --cron
1181 : '))))))))))))))))))))))))))))))))))))))))'
1184 t-buildproductsdir-config () {
1186 t-git-config dgit.default.build-products-dir $bpd
1188 cat <<END >>$tmp/.gbp.conf
1195 local restriction=$1
1196 (cd $root; t-restriction-$restriction >&2)
1200 : "Hopefully installed: $*"
1207 export DGIT_TEST_TESTNAME="$testname"
1208 export DGIT_TEST_TMPBASE="$tmpbase"
1216 t-chain-test "${t#*-}"
1219 t-git-config dgit.default.old-dsc-distro test-dummy
1221 for import in ${autoimport-gnupg}; do
1225 t-setup-import $import