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 perl >&4 -"I$root" -MDebian::Dgit -we '
524 foreach my $vn (grep m/^DGIT_TEST_REAL_/, keys %ENV) {
525 print STDERR "saving-exporting $vn\n";
526 printf "export %s=%s\n", $vn, shellquote $ENV{$vn}
531 (set -e; cd $tmp; tar cf $import.tar $savedirs)
533 printf >&4 "\n%s\n" "$importeval"
535 mv -f $tmp/$import.new $tmp/$import
543 if [ "x$tmpbase" = x ]; then
544 # ADTTMP was set on entry to tests/lib, so we
545 # are not sharing tmp area between tests
547 lock="$tmp/.dummy.lock"
549 setupsrc="$tmpbase/$setupname"
550 lock="$setupsrc.lock"
553 local simport="$setupsrc/IMPORT.$setupname"
555 if ! [ -e "$simport" ]; then
556 with-lock-ex -w "$lock" \
557 xargs -0 -a $tmp/.save-env \
560 setupname="$1"; shift
562 if [ -e "$simport" ]; then exit 0; fi
564 "tests/setup/$setupname"
565 ' x "$root" "$setupname" "$simport"
568 if [ "x$setupsrc" != "x$tmp" ]; then
569 (set -e; cd $tmp; tar xf "$simport.tar")
575 t-git-get-ref-exact () {
577 # does not dereference, unlike t-git-get-ref
580 *) fail "t-git-get-ref-exact bad $ref" ;;
582 git for-each-ref --format='%(objectname)' "[r]efs/${ref#refs/}"
589 *) fail "t-git-get-ref bad $ref" ;;
591 (git show-ref -d $1 || test $? = 1) | perl -ne '
592 $x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#;
593 END { print "$x\n" if length $x; }
597 t-ref-same-exact () {
599 local val; val=`t-git-get-ref-exact $name`
600 t-ref-same-val "$name" $val
605 local val; val=`t-git-get-ref $name`
606 t-ref-same-val "$name" $val
610 local val; val=`git rev-parse HEAD`
611 t-ref-same-val HEAD $val
617 case "${t_ref_val-unset}" in
620 *) fail "ref varies: ($name)\
621 ${val:-nothing} != ${t_ref_val:-nothing} (${t_ref_names[*]})" ;;
624 t_ref_names+=("$name")
627 t-refs-same-start () {
642 val=`t-git-get-ref $g`
643 if [ "x$val" != x ]; then
644 fail "ref $g unexpectedly exists ($val)"
650 echo refs/tags/$tagpfx/${v//\~/_}
654 git log -n1 --pretty=format:"$1" "$2"
657 t-sametree-parent () {
660 local ctree; ctree=$(t-format-ref '%T' "$ref")
663 for parent in $(t-format-ref '%P' "$ref"); do
664 local ptree; ptree=$(t-format-ref '%T' "$parent")
665 if [ "x$ptree" = "x$ctree" ]; then
669 case "$psame" in ""|" * *") break ;; esac
675 t-check-pushed-master () {
676 local master; master=`t-git-get-ref refs/heads/master`
677 if [ x$master = x$t_ref_val ]; then return; fi
678 if [ x$master = x ]; then fail "failed to push master"; fi
679 # didn't update master, it must be not FF
680 local mbase; mbase=`t-git-merge-base $master $t_ref_val`
681 if [ x$mbase = x$master ]; then fail "failed to ff master"; fi
684 t-push-was-source-only () {
686 t-files-notexist $tmp/incoming/${p}_${v}_*.deb \
687 $tmp/incoming/${p}_${v}_*.udeb
688 # we permit _source.buildinfo files; see test_changes_source_only()
689 for f in $tmp/incoming/${p}_${v}_*.buildinfo; do
692 *_source.buildinfo) ;;
693 *) fail "non-source-only file $f exists!" ;;
701 stat $tmp/incoming/$f
707 local suite=${2:-sid}
713 t-pushed-good-core () {
717 refs/remotes/dgit/dgit/$suite
719 refs/heads/dgit/unstable \
720 refs/remotes/dgit/dgit/unstable
721 (set -e; cd $dgitrepo
725 ${t_check_pushed_master:- : NOT-DRS-NO-CHECK-PUSHED-MASTER}
729 git verify-tag `t-v-tag`
732 t-pushed-good-check-changes () {
733 changes_filename="$tmp/incoming/${p}_${v}_*.changes"
734 grep -E "^Distribution: $suite" $changes_filename
735 grep -E "^Version: $v" $changes_filename
738 t-splitbrain-pushed-good--unpack () {
743 ln -s $tmp/mirror/pool/main/*.orig*.tar* .
744 ln -s $tmp/incoming/*.orig*.tar* . ||:
745 ln -s $incoming_dsc .
746 ln -s ${incoming_dsc/.dsc/.debian.tar}* .
747 ln -s ${incoming_dsc/.dsc/.tar}* . ||:
748 dpkg-source "$@" -x *.dsc
751 git fetch ../../$p "refs/tags/*:refs/tags/*"
754 t-splitbrain-pushed-good--checkprep () {
756 git rm --cached -r --ignore-unmatch .pc
759 t-splitbrain-pushed-good--checkdiff () {
761 t-splitbrain-pushed-good--checkprep
762 t-output "" git diff --stat --cached $tag
765 t-splitbrain-pushed-good-start () {
766 dep14tag=refs/tags/test-dummy/${v//\~/_}
768 t-output "" git status --porcelain
770 t-refs-same $dep14tag
771 (set -e; cd $dgitrepo; t-refs-same $dep14tag)
772 git merge-base --is-ancestor $dep14tag $dgittag
775 t-ref-same refs/heads/split.p
776 case "$(t-git-get-ref refs/heads/split.b)" in
778 "$(git rev-parse refs/heads/split.p^0)") ;;
779 "$(git rev-parse refs/heads/split.p^1)") ;;
786 t-splitbrain-pushed-good--unpack
787 t-splitbrain-pushed-good--checkdiff $dgittag
789 t-splitbrain-pushed-good-end-made-dep14 () {
790 t-splitbrain-pushed-good--checkdiff $dep14tag
794 t-splitbrain-rm-1-patch () {
797 next unless $_ eq "'"$patchname"'\n";
800 rename "debian/patches/$_", "../t-'"$patchname"'" or die $!;
802 ' debian/patches/series
805 t-splitbrain-rm-gitignore-patch () {
806 t-splitbrain-rm-1-patch auto-gitignore
809 t-gbp-pushed-good () {
810 local suite=${1:-sid}
811 t-splitbrain-pushed-good-start
813 # Right, now we want to check that the maintainer tree and
814 # the dgit tree differ in exactly the ways we expect. We
815 # achieve this by trying to reconstruct the maintainer tree
816 # from the dgit tree.
818 # So, unpack it withut the patches applied
819 t-splitbrain-pushed-good--unpack --skip-patches
821 # dgit might have added a .gitignore patch, which we need to
823 t-splitbrain-rm-gitignore-patch
825 # Now the result should differ only in non-debian/ .gitignores
826 t-splitbrain-pushed-good--checkprep
827 git diff --cached --name-only $dep14tag >../changed
829 next if !m#^debian/# && m#(^|/)\.gitignore#;
833 # If we actually apply the gitignore patch by hand, it
835 if [ -f ../t-auto-gitignore ]; then
836 patch --backup-if-mismatch -p1 -u <../t-auto-gitignore
839 t-splitbrain-pushed-good-end-made-dep14
842 t-unapplied-pushed-good () {
843 local suite=${1:-sid}
844 t-splitbrain-pushed-good-start
845 t-splitbrain-pushed-good--unpack --skip-patches
846 t-splitbrain-pushed-good-end-made-dep14
849 t-dpm-pushed-good () {
850 local suite=${1:-sid}
851 t-splitbrain-pushed-good-start
852 t-splitbrain-pushed-good--unpack
853 t-splitbrain-rm-gitignore-patch
854 t-splitbrain-pushed-good-end-made-dep14
857 t-split-unchanged-pushed-good () {
858 local suite=${1:-sid}
859 t-splitbrain-pushed-good-start
860 t-splitbrain-pushed-good--unpack
861 t-splitbrain-pushed-good-end-made-dep14
864 t-commit-build-push-expect-log () {
870 t-dgit push --new 2>&1 |tee $tmp/push.log
871 t-grep-mpat "$mpat" $tmp/push.log
878 use Dpkg::Control::Hash;
879 my $h = new Dpkg::Control::Hash allow_pgp=>1;
880 $h->parse(\*STDIN,"'"$file"'");
881 my $val = $h->{"'$field'"},"\n";
882 die "'"$file $field"'" unless defined $val;
888 export DGIT_TEST_DISTRO=''
890 t-git-config dgit-suite.unstable.distro test-dummy
900 "") '$var'="$tstunt" ;;
901 *) '$var'="$tstunt:$'$var'" ;;
907 t-tstunt--save-real () {
918 p="${p/:"$tmp/tstunt":/:}"
930 *) fail "did not find $f on PATH $PATH" ;;
933 local varname=${f//[^_0-9a-zA-Z]/_}
934 varname=DGIT_TEST_REAL_${varname^^}
937 : \${$varname:=\$real}
943 local tstunt=$tmp/tstunt
944 t-stunt-envvar PATH $tstunt
945 t-stunt-envvar PERLLIB $tstunt
948 t-tstunt--save-real $f
950 local d="$tstunt/${f%/*}"
952 ln -sf "$troot/tstunt/$f" "$d"/.
956 t-tstunt-parsechangelog () {
957 t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm
960 t-tstunt-lintian () {
964 t-tstunt-debuild () {
969 local dsc=${p}_${v}.dsc
970 incoming_dsc=$tmp/incoming/$dsc
975 local val; val=`t-822-field $incoming_dsc Dgit`
978 die "Dgit $_ ?" unless m/^\w+\b/;
979 print $&,"\n" or die $!;
981 t-ref-same-val $incoming_dsc "$val"
988 debdiff ${p}_${v1}.dsc ${p}_${v2}.dsc || test $? = 1) \
992 t-gbp-unapplied-pq2qc () {
993 # does `gbp pq export'
994 # commits the resulting debian/patches on qc/BRANCH
995 # leaves us on qc/BRANCH (eg "qc/quilt-tip"))
996 # qc/BRANCH is not fast-forwarding
1000 branch=`git symbolic-ref HEAD`
1001 branch=${branch#refs/heads/}
1004 */*) fail "unexpected branch $branch" ;;
1007 git branch -f qc/$branch
1008 git checkout qc/$branch
1009 git add debian/patches
1010 git commit -m 'Commit patch queue'
1013 t-git-pseudo-merge () {
1014 # like git merge -s ours
1015 if [ ! "$git_pseuomerge_opts" ]; then
1016 if git merge --help \
1017 | grep -q allow-unrelated-histories; then
1018 git_pseuomerge_opts='--allow-unrelated-histories'
1020 git_pseuomerge_opts+=' -s ours'
1022 git merge $git_pseuomerge_opts "$@"
1025 t-gbp-example-prep-no-ff () {
1026 t-tstunt-parsechangelog
1027 t-archive example 1.0-1
1035 git checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip
1038 echo '/* some comment */' >>src.c
1040 git commit -m 'Add a comment to an upstream file'
1042 t-gbp-unapplied-pq2qc
1044 t-commit 'some updates' 1.0-2
1047 t-gbp-example-prep () {
1048 t-gbp-example-prep-no-ff
1050 t-git-pseudo-merge \
1051 -m 'Pseudo-merge to make descendant of archive' \
1052 remotes/dgit/dgit/sid
1055 t-make-badcommit () {
1057 git cat-file commit HEAD | \
1058 perl -pe 's/^committer /commiter /' | \
1059 git hash-object -w -t commit --stdin
1061 t-expect-fsck-fail $badcommit
1065 # leaves ust set to filename of orig tarball
1069 ust=${p}_${v}.orig.tar.gz
1070 GZIP=-1 git archive -o $bpd/$ust --prefix=${p}-${v}/ $tag
1073 t-merge-conflicted-stripping-conflict-markers () {
1074 local otherbranch=$1
1077 t-expect-fail F:"Merge conflict in $file" \
1078 git merge $otherbranch
1080 perl -i~ -ne 'print unless m{^(?:\<\<\<|\>\>\>|===)}' "$file"
1082 git commit --no-edit
1087 v=${2:-${majorv:-1}.$revision}
1088 $troot/tstunt/debchange \
1089 --force-distribution -v$v --distribution ${3:-unstable} "$1"
1090 git add debian/changelog
1092 revision=$(( ${revision-0} + 1 ))
1096 local cmd="$1"; shift
1097 local suite=${1-unstable}
1098 $cmd -r -D "$suite" ''
1102 t-dch-r-rune t-dch-commit "$@"
1106 $troot/tstunt/debchange "$@"
1107 git commit -m "dch $*" debian/changelog
1111 git config --global "$@"
1115 t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S "
1116 t-git-config dgit-distro.test-dummy.git-check true
1117 t-git-config dgit-distro.test-dummy.git-create true
1118 cp $troot/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/.
1119 cp $troot/suites $tmp/.
1120 cp $troot/suites $tmp/suites-master
1122 export t_check_pushed_master=t-check-pushed-master
1124 drs_dispatch=$tmp/distro=test-dummy
1127 if [ "x$DGIT_TEST_INTREE" != x ]; then
1128 ln -sf "$DGIT_TEST_INTREE" $drs_dispatch/dgit-live
1131 ln -sf $tmp/git $drs_dispatch/repos
1132 ln -sf $tmp/suites $tmp/suites-master $tmp/dm.txt $drs_dispatch/
1133 mkdir -p $drs_dispatch/keyrings
1134 ln -sf $tmp/dd.gpg $drs_dispatch/keyrings/debian-keyring.gpg
1135 ln -sf $tmp/dm.gpg $drs_dispatch/keyrings/debian-maintainers.gpg
1136 ln -sf /bin/true $drs_dispatch/policy-hook
1141 t-git-config dgit-distro.test-dummy.ssh "$troot/dsd-ssh"
1142 t-git-config dgit-distro.test-dummy.git-check ssh-cmd
1143 t-git-config dgit-distro.test-dummy.git-create true
1144 t-git-config dgit-distro.test-dummy.git-url \
1145 "ext::$troot/dsd-ssh X %S /dgit/test-dummy/repos"
1147 t-git-config dgit-distro.test-dummy.diverts.drs /drs
1148 t-git-config dgit-distro.test-dummy/drs.ssh "$troot/ssh"
1149 t-git-config dgit-distro.test-dummy/drs.git-url $tmp/git
1150 t-git-config dgit-distro.test-dummy/drs.git-check ssh-cmd
1151 t-git-config dgit-distro.test-dummy/drs.git-create ssh-cmd
1153 echo 'no-such-package* drs' >$drs_dispatch/diverts
1157 : '(((((((((((((((((((((((((((((((((((((((('
1158 ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
1159 : '))))))))))))))))))))))))))))))))))))))))'
1162 t-policy-nonexist () {
1163 ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
1166 t-make-hook-link () {
1167 local hook=$1 # in infra/
1169 hook=${DGIT_INFRA_PFX}$hook
1172 *) hook=`type -P $hook` ;;
1174 ln -sf "$hook" $linkpath
1179 t-make-hook-link $policyhook $drs_dispatch/policy-hook
1184 t-policy dgit-repos-policy-debian
1187 t-policy-admin create-db
1190 t-policy-periodic () {
1191 : '(((((((((((((((((((((((((((((((((((((((('
1192 ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
1193 test-dummy $drs_dispatch '' --cron
1194 : '))))))))))))))))))))))))))))))))))))))))'
1197 t-buildproductsdir-config () {
1199 t-git-config dgit.default.build-products-dir $bpd
1201 cat <<END >>$tmp/.gbp.conf
1208 local restriction=$1
1209 (cd $root; t-restriction-$restriction >&2)
1213 : "Hopefully installed: $*"
1220 export DGIT_TEST_TESTNAME="$testname"
1221 export DGIT_TEST_TMPBASE="$tmpbase"
1229 t-chain-test "${t#*-}"
1232 t-git-config dgit.default.old-dsc-distro test-dummy
1234 for import in ${autoimport-gnupg}; do
1238 t-setup-import $import