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=${expect_fail_lcmessages-C} \
96 LANGUAGE=${expect_fail_lcmessages-C} \
97 "$@" 2>&1 | tee $tmp/t.output
98 local ps="${PIPESTATUS[*]}"
102 "0 0") fail "command unexpectedly succeeded (instead of: $mpat)" ;;
104 *) fail "tee failed" ;;
107 t-grep-mpat "$mpat" $tmp/t.output
118 E:*) grepper=egrep ;;
119 F:*) grepper=fgrep ;;
120 *) fail "bad mpat prefix in $mpat";;
126 $grepper -e "$mpat" "$file" ||
127 fail "message not found"
130 t-expect-push-fail () {
131 local mpat="$1"; shift
133 local triedpush; triedpush=`git rev-parse HEAD`
136 t-expect-fail "$mpat" "$@"
138 diff $tmp/show-refs.{pre,post}-push
140 t-git-objects-not-present '' $triedpush
142 eval "$t_expect_push_fail_hook"
145 t-git-objects-not-present () {
146 # t-git-objects-not-present GITDIR|'' OBJID [...]
147 # specifying '' means the repo for package $p
148 local gitdir="${1-$dgitrepo}"
150 if ! [ -e "$gitdir" ]; then return; fi
153 t-expect-fail 'unable to find' \
159 local whichoutput=$1; shift
160 local whichrepo=${1-$dgitrepo}
161 local outputfile="$tmp/show-refs.$whichoutput"
164 if test -d $whichrepo; then
172 local edittree=$1.edit
173 if test -d "$edittree"; then
174 cp -a "$edittree"/* .
182 t-untar $troot/worktrees/${p}_$1
185 t-select-package () {
187 dgitrepo=$tmp/git/$p.git
194 local gs=$troot/git-srcs/${p}_$v.git
195 (set -e; cd $tmp/git; t-untar $gs)
200 (set -e; cd $tmp/git; tar xf $troot/git-template.tar)
203 t-salsa-add-remote () {
204 local d=$tmp/salsa/$p
206 (set -e; cd $d; git init --bare)
207 git remote add ${1-origin} $d
210 t-git-merge-base () {
211 git merge-base $1 $2 || test $? = 1
215 # t-has-ancestor ANCESTOR
216 # (CHILD is implicit, HEAD)
217 local now; now=`git rev-parse HEAD`
218 local ancestor; ancestor=`git rev-parse $1^{}`
219 local mbase; mbase=`t-git-merge-base $ancestor $now`
220 if [ x$mbase != x$ancestor ]; then
221 fail "not ff $ancestor..$now, $mbase != $ancestor"
225 t-has-parent-or-is () {
226 # t-has-parent-or-is CHILD PARENT
230 parents=$(git show --pretty=format:' %P %H ' "$child")
231 parent=$(git rev-parse "$parent~0")
234 *) fail "child $child lacks parent $parent" ;;
238 t-prep-newpackage () {
245 if ! git show-ref --verify --quiet refs/heads/master; then
246 git branch -m dgit/sid master
254 t-archive-none-$t_archive_method
256 t-archive-none-aq () {
257 mkdir -p $tmp/aq/dsc_in_suite $tmp/mirror/pool/main
263 for suitespec in $suitespecs; do
264 local suite=${suitespec%%:*}
265 local sname=${suitespec#*:}
267 >$tmp/aq/package.$suite.$p
268 t-aq-archive-updated $suite $p
270 >$tmp/aq/package.new.$p
271 t-aq-archive-updated new $p
273 ln -sf $suite $tmp/aq/dsc_in_suite/$sname
275 cat <<END >>$tmp/aq/suites
278 "archive" : "ftp-master",
279 "codename" : "$suite",
292 cat <<END >>$tmp/aq/suites
298 t-aq-archive-updated () {
301 local suitedir=$tmp/aq/dsc_in_suite/$suite
303 perl <$tmp/aq/package.$suite.$p >$suitedir/$p -wne '
307 m{^(\S+) (\w+) ([^ \t/]+)/(\S+)} or die;
315 my $json = JSON->new->canonical();
316 print $json->encode(\@v) or die $!;
321 t-archive-process-incoming () {
323 mv $tmp/incoming/${p}_* $tmp/mirror/pool/main/
324 t-archive-query "$suite"
329 local dscf=main/${p}_${v}.dsc
330 t-archive-query-$t_archive_method "$suite" "$p" "$v" "$dscf"
332 t-archive-query-aq () {
337 local sha; sha=`sha256sum <$tmp/mirror/pool/$dscf`
338 echo "${v} ${sha% -} $dscf" >>$tmp/aq/package.$suite.${p}
339 t-aq-archive-updated $suite $p
345 local dscf=${p}_$2.dsc
346 rm -f $tmp/mirror/pool/main/${p}_*
347 ln -s $troot/pkg-srcs/${p}_${2%-*}* $tmp/mirror/pool/main/
348 t-archive-query $suite
351 (set -e; cd $tmp/extract; dpkg-source -x ../mirror/pool/main/$dscf)
354 t-git-dir-time-passes () {
355 touch -d 'last year' $dgitrepo
359 local gitdir=$dgitrepo
362 if test -e "$gitdir"; then fail "$gitdir exists"; fi
365 public) wantstat='7[75]5' ;;
366 secret) wantstat='7[70]0' ;;
367 *) fail "$1 t-git-dir-check ?" ;;
369 gotstat=`stat -c%a $gitdir`
371 *$wantstat) return ;;
372 *) fail "$gitdir has mode $gotstat, expected $wantstat" ;;
376 t-expect-fsck-fail () {
377 echo >>$tmp/fsck.expected-errors "$1"
381 local fsckerrs=$(git rev-parse --git-dir)/dgit-test-fsck.errs
384 LC_MESSAGES=C git fsck --no-dangling --strict 2>&1 \
386 ps="${PIPESTATUS[*]}"
390 if [ -f $tmp/fsck.expected-errors ]; then
391 pats=(-w -f $tmp/fsck.expected-errors)
395 pats+=(-e 'notice: HEAD points to an unborn branch')
396 pats+=(-e 'notice: No default references')
399 grep -v "${pats[@]}" $fsckerrs
403 1) ;; # no unexpected errors
404 0) fail "unexpected messages from git-fsck" ;;
405 *) fail "grep of git-fsck failed" ;;
409 t-check-only-bpd () {
410 if [ "$bpd" = .. ]; then return; fi
412 $tmp/*.{deb,changes,dsc,buildinfo} \
419 for d in $tmp/*/.git $tmp/git/*.git; do
427 : '========================================'
434 t-save-artifacts () {
435 artifacts="$AUTOPKGTEST_ARTIFACTS"
436 if [ x"$artifacts" = x ]; then return; fi
437 if [ x"tmp" = x ]; then return; fi
438 GZIP=-1v tar -C "$tmp" -zc -f "$artifacts/${0##*/}.tar.gz" \
442 t-rm-dput-dropping () {
443 rm -f $tmp/${p}_${v}_*.upload
447 local dgit=${DGIT_TEST-dgit}
450 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
451 $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
452 ${dgit_config_debian_alias-"--config-lookup-explode=dgit-distro.debian.alias-canon"} \
453 ${DGIT_GITDEBREBASE_TEST+--git-debrebase=}${DGIT_GITDEBREBASE_TEST} \
454 ${distro+${distro:+-d}}${distro--dtest-dummy} \
455 $DGIT_TEST_OPTS $DGIT_TEST_DEBUG \
456 -kBCD22CD83243B79D3DFAC33EA3DBCBC039B13D8A $t_dgit_xopts "$@"
457 : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
464 (export LC_ALL=C.UTF-8
465 if [ "$DGIT_TEST_INTREE" ]; then
466 make -C $DGIT_TEST_INTREE $page.$section.view
473 diff --exclude=.git --exclude=.pc -ruN $*
476 t-files-notexist () {
485 t-cloned-fetched-good () {
486 t-diff-nogit ../extract/$p-${v%-*} .
487 t-clean-on-branch dgit/sid
490 refs/heads/dgit/sid \
491 refs/remotes/dgit/dgit/sid
492 t-refs-notexist refs/dgit/unstable refs/remotes/dgit/dgit/unstable
496 printf "%s${1:+\n}" "$1" >$tmp/t.want
499 diff $tmp/t.want $tmp/t.got
502 t-clean-on-branch () {
503 t-output "## $1" git status -b --porcelain
511 local import=IMPORT.${DGIT_TEST_TESTNAME-${0##*/}}
512 exec 4>$tmp/$import.new
515 for vn in $savevars; do
516 perl >&4 -"I$root" -MDebian::Dgit -e '
517 printf "%s=%s\n", $ARGV[0], shellquote $ARGV[1]
518 ' $vn "$(eval "printf '%s\n' \"\$$vn\"")"
521 (set -e; cd $tmp; tar cf $import.tar $savedirs)
523 printf >&4 "\n%s\n" "$importeval"
525 mv -f $tmp/$import.new $tmp/$import
533 if [ "x$tmpbase" = x ]; then
534 # ADTTMP was set on entry to tests/lib, so we
535 # are not sharing tmp area between tests
537 lock="$tmp/.dummy.lock"
539 setupsrc="$tmpbase/$setupname"
540 lock="$setupsrc.lock"
543 local simport="$setupsrc/IMPORT.$setupname"
545 if ! [ -e "$simport" ]; then
546 with-lock-ex -w "$lock" \
547 xargs -0 -a $tmp/.save-env \
550 setupname="$1"; shift
552 if [ -e "$simport" ]; then exit 0; fi
554 "tests/setup/$setupname"
555 ' x "$root" "$setupname" "$simport"
558 if [ "x$setupsrc" != "x$tmp" ]; then
559 (set -e; cd $tmp; tar xf "$simport.tar")
565 t-git-get-ref-exact () {
567 # does not dereference, unlike t-git-get-ref
570 *) fail "t-git-get-ref-exact bad $ref" ;;
572 git for-each-ref --format='%(objectname)' "[r]efs/${ref#refs/}"
579 *) fail "t-git-get-ref bad $ref" ;;
581 (git show-ref -d $1 || test $? = 1) | perl -ne '
582 $x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#;
583 END { print "$x\n" if length $x; }
587 t-ref-same-exact () {
589 local val; val=`t-git-get-ref-exact $name`
590 t-ref-same-val "$name" $val
595 local val; val=`t-git-get-ref $name`
596 t-ref-same-val "$name" $val
600 local val; val=`git rev-parse HEAD`
601 t-ref-same-val HEAD $val
607 case "${t_ref_val-unset}" in
610 *) fail "ref varies: ($name)\
611 ${val:-nothing} != ${t_ref_val:-nothing} (${t_ref_names[*]})" ;;
614 t_ref_names+=("$name")
617 t-refs-same-start () {
632 val=`t-git-get-ref $g`
633 if [ "x$val" != x ]; then
634 fail "ref $g unexpectedly exists ($val)"
640 echo refs/tags/$tagpfx/${v//\~/_}
644 git log -n1 --pretty=format:"$1" "$2"
647 t-sametree-parent () {
650 local ctree; ctree=$(t-format-ref '%T' "$ref")
653 for parent in $(t-format-ref '%P' "$ref"); do
654 local ptree; ptree=$(t-format-ref '%T' "$parent")
655 if [ "x$ptree" = "x$ctree" ]; then
659 case "$psame" in ""|" * *") break ;; esac
665 t-check-pushed-master () {
666 local master; master=`t-git-get-ref refs/heads/master`
667 if [ x$master = x$t_ref_val ]; then return; fi
668 if [ x$master = x ]; then fail "failed to push master"; fi
669 # didn't update master, it must be not FF
670 local mbase; mbase=`t-git-merge-base $master $t_ref_val`
671 if [ x$mbase = x$master ]; then fail "failed to ff master"; fi
674 t-push-was-source-only () {
676 t-files-notexist $tmp/incoming/${p}_${v}_*.deb \
677 $tmp/incoming/${p}_${v}_*.udeb
678 # we permit _source.buildinfo files; see test_changes_source_only()
679 for f in $tmp/incoming/${p}_${v}_*.buildinfo; do
682 *_source.buildinfo) ;;
683 *) fail "non-source-only file $f exists!" ;;
691 stat $tmp/incoming/$f
697 local suite=${2:-sid}
703 t-pushed-good-core () {
707 refs/remotes/dgit/dgit/$suite
709 refs/heads/dgit/unstable \
710 refs/remotes/dgit/dgit/unstable
711 (set -e; cd $dgitrepo
715 ${t_check_pushed_master:- : NOT-DRS-NO-CHECK-PUSHED-MASTER}
719 git verify-tag `t-v-tag`
722 t-pushed-good-check-changes () {
723 changes_filename="$tmp/incoming/${p}_${v}_*.changes"
724 grep -E "^Distribution: $suite" $changes_filename
725 grep -E "^Version: $v" $changes_filename
728 t-splitbrain-pushed-good--unpack () {
733 ln -s $tmp/mirror/pool/main/*.orig*.tar* .
734 ln -s $tmp/incoming/*.orig*.tar* . ||:
735 ln -s $incoming_dsc .
736 ln -s ${incoming_dsc/.dsc/.debian.tar}* .
737 dpkg-source "$@" -x *.dsc
740 git fetch ../../$p "refs/tags/*:refs/tags/*"
743 t-splitbrain-pushed-good--checkprep () {
745 git rm --cached -r --ignore-unmatch .pc
748 t-splitbrain-pushed-good--checkdiff () {
750 t-splitbrain-pushed-good--checkprep
751 t-output "" git diff --stat --cached $tag
754 t-splitbrain-pushed-good-start () {
755 dep14tag=refs/tags/test-dummy/${v//\~/_}
757 t-output "" git status --porcelain
759 t-refs-same $dep14tag
760 (set -e; cd $dgitrepo; t-refs-same $dep14tag)
761 git merge-base --is-ancestor $dep14tag $dgittag
764 t-ref-same refs/heads/split.p
765 case "$(t-git-get-ref refs/heads/split.b)" in
767 "$(git rev-parse refs/heads/split.p^0)") ;;
768 "$(git rev-parse refs/heads/split.p^1)") ;;
775 t-splitbrain-pushed-good--unpack
776 t-splitbrain-pushed-good--checkdiff $dgittag
778 t-splitbrain-pushed-good-end-made-dep14 () {
779 t-splitbrain-pushed-good--checkdiff $dep14tag
783 t-splitbrain-rm-gitignore-patch () {
785 next unless $_ eq "auto-gitignore\n";
788 rename "debian/patches/$_", "../t-auto-gitignore" or die $!;
790 ' debian/patches/series
793 t-gbp-pushed-good () {
794 local suite=${1:-sid}
795 t-splitbrain-pushed-good-start
797 # Right, now we want to check that the maintainer tree and
798 # the dgit tree differ in exactly the ways we expect. We
799 # achieve this by trying to reconstruct the maintainer tree
800 # from the dgit tree.
802 # So, unpack it withut the patches applied
803 t-splitbrain-pushed-good--unpack --skip-patches
805 # dgit might have added a .gitignore patch, which we need to
807 t-splitbrain-rm-gitignore-patch
809 # Now the result should differ only in non-debian/ .gitignores
810 t-splitbrain-pushed-good--checkprep
811 git diff --cached --name-only $dep14tag >../changed
813 next if !m#^debian/# && m#(^|/)\.gitignore#;
817 # If we actually apply the gitignore patch by hand, it
819 if [ -f ../t-auto-gitignore ]; then
820 patch --backup-if-mismatch -p1 -u <../t-auto-gitignore
823 t-splitbrain-pushed-good-end-made-dep14
826 t-unapplied-pushed-good () {
827 t-splitbrain-pushed-good-start
828 t-splitbrain-pushed-good--unpack --skip-patches
829 t-splitbrain-pushed-good-end-made-dep14
832 t-dpm-pushed-good () {
833 t-splitbrain-pushed-good-start
834 t-splitbrain-pushed-good--unpack
835 t-splitbrain-rm-gitignore-patch
836 t-splitbrain-pushed-good-end-made-dep14
839 t-commit-build-push-expect-log () {
845 t-dgit push --new 2>&1 |tee $tmp/push.log
846 t-grep-mpat "$mpat" $tmp/push.log
853 use Dpkg::Control::Hash;
854 my $h = new Dpkg::Control::Hash allow_pgp=>1;
855 $h->parse(\*STDIN,"'"$file"'");
856 my $val = $h->{"'$field'"},"\n";
857 die "'"$file $field"'" unless defined $val;
863 export DGIT_TEST_DISTRO=''
865 t-git-config dgit-suite.unstable.distro test-dummy
875 "") '$var'="$tstunt" ;;
876 *) '$var'="$tstunt:$'$var'" ;;
882 t-tstunt--save-real () {
893 p="${p/:"$tmp/tstunt":/:}"
905 *) fail "did not find $f on PATH $PATH" ;;
908 local varname=${f//[^_0-9a-zA-Z]/_}
909 varname=DGIT_TEST_REAL_${varname^^}
912 : \${$varname:=\$real}
918 local tstunt=$tmp/tstunt
919 t-stunt-envvar PATH $tstunt
920 t-stunt-envvar PERLLIB $tstunt
923 t-tstunt--save-real $f
925 local d="$tstunt/${f%/*}"
927 ln -sf "$troot/tstunt/$f" "$d"/.
931 t-tstunt-parsechangelog () {
932 t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm
935 t-tstunt-lintian () {
939 t-tstunt-debuild () {
944 local dsc=${p}_${v}.dsc
945 incoming_dsc=$tmp/incoming/$dsc
950 local val; val=`t-822-field $incoming_dsc Dgit`
953 die "Dgit $_ ?" unless m/^\w+\b/;
954 print $&,"\n" or die $!;
956 t-ref-same-val $incoming_dsc "$val"
963 debdiff ${p}_${v1}.dsc ${p}_${v2}.dsc || test $? = 1) \
967 t-gbp-unapplied-pq2qc () {
968 # does `gbp pq export'
969 # commits the resulting debian/patches on qc/BRANCH
970 # leaves us on qc/BRANCH (eg "qc/quilt-tip"))
971 # qc/BRANCH is not fast-forwarding
975 branch=`git symbolic-ref HEAD`
976 branch=${branch#refs/heads/}
979 */*) fail "unexpected branch $branch" ;;
982 git branch -f qc/$branch
983 git checkout qc/$branch
984 git add debian/patches
985 git commit -m 'Commit patch queue'
988 t-git-pseudo-merge () {
989 # like git merge -s ours
990 if [ ! "$git_pseuomerge_opts" ]; then
991 if git merge --help \
992 | grep -q allow-unrelated-histories; then
993 git_pseuomerge_opts='--allow-unrelated-histories'
995 git_pseuomerge_opts+=' -s ours'
997 git merge $git_pseuomerge_opts "$@"
1000 t-gbp-example-prep-no-ff () {
1001 t-tstunt-parsechangelog
1002 t-archive example 1.0-1
1010 git checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip
1013 echo '/* some comment */' >>src.c
1015 git commit -m 'Add a comment to an upstream file'
1017 t-gbp-unapplied-pq2qc
1019 t-commit 'some updates' 1.0-2
1022 t-gbp-example-prep () {
1023 t-gbp-example-prep-no-ff
1025 t-git-pseudo-merge \
1026 -m 'Pseudo-merge to make descendant of archive' \
1027 remotes/dgit/dgit/sid
1030 t-make-badcommit () {
1032 git cat-file commit HEAD | \
1033 perl -pe 's/^committer /commiter /' | \
1034 git hash-object -w -t commit --stdin
1036 t-expect-fsck-fail $badcommit
1040 # leaves ust set to filename of orig tarball
1044 ust=${p}_${v}.orig.tar.gz
1045 GZIP=-1 git archive -o $bpd/$ust --prefix=${p}-${v}/ $tag
1048 t-merge-conflicted-stripping-conflict-markers () {
1049 local otherbranch=$1
1052 t-expect-fail F:"Merge conflict in $file" \
1053 git merge $otherbranch
1055 perl -i~ -ne 'print unless m{^(?:\<\<\<|\>\>\>|===)}' "$file"
1057 git commit --no-edit
1062 v=${2:-${majorv:-1}.$revision}
1063 $troot/tstunt/debchange \
1064 --force-distribution -v$v --distribution ${3:-unstable} "$1"
1065 git add debian/changelog
1067 revision=$(( ${revision-0} + 1 ))
1071 local cmd="$1"; shift
1072 local suite=${1-unstable}
1073 $cmd -r -D "$suite" ''
1077 t-dch-r-rune t-dch-commit "$@"
1081 $troot/tstunt/debchange "$@"
1082 git commit -m "dch $*" debian/changelog
1086 git config --global "$@"
1090 t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S "
1091 t-git-config dgit-distro.test-dummy.git-check true
1092 t-git-config dgit-distro.test-dummy.git-create true
1093 t-git-config dgit-distro.test-dummy.dgit-tag-format new,old,maint
1094 cp $troot/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/.
1095 cp $troot/suites $tmp/.
1096 cp $troot/suites $tmp/suites-master
1098 export t_check_pushed_master=t-check-pushed-master
1100 drs_dispatch=$tmp/distro=test-dummy
1103 if [ "x$DGIT_TEST_INTREE" != x ]; then
1104 ln -sf "$DGIT_TEST_INTREE" $drs_dispatch/dgit-live
1107 ln -sf $tmp/git $drs_dispatch/repos
1108 ln -sf $tmp/suites $tmp/suites-master $tmp/dm.txt $drs_dispatch/
1109 mkdir -p $drs_dispatch/keyrings
1110 ln -sf $tmp/dd.gpg $drs_dispatch/keyrings/debian-keyring.gpg
1111 ln -sf $tmp/dm.gpg $drs_dispatch/keyrings/debian-maintainers.gpg
1112 ln -sf /bin/true $drs_dispatch/policy-hook
1116 export tagpfx=archive/test-dummy
1117 t-git-config dgit-distro.test-dummy.dgit-tag-format new,maint
1120 export tagpfx=test-dummy
1121 t-git-config dgit-distro.test-dummy.dgit-tag-format old
1126 t-git-config dgit-distro.test-dummy.ssh "$troot/dsd-ssh"
1127 t-git-config dgit-distro.test-dummy.git-check ssh-cmd
1128 t-git-config dgit-distro.test-dummy.git-create true
1129 t-git-config dgit-distro.test-dummy.git-url \
1130 "ext::$troot/dsd-ssh X %S /dgit/test-dummy/repos"
1132 t-git-config dgit-distro.test-dummy.diverts.drs /drs
1133 t-git-config dgit-distro.test-dummy/drs.ssh "$troot/ssh"
1134 t-git-config dgit-distro.test-dummy/drs.git-url $tmp/git
1135 t-git-config dgit-distro.test-dummy/drs.git-check ssh-cmd
1136 t-git-config dgit-distro.test-dummy/drs.git-create ssh-cmd
1138 echo 'no-such-package* drs' >$drs_dispatch/diverts
1142 : '(((((((((((((((((((((((((((((((((((((((('
1143 ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
1144 : '))))))))))))))))))))))))))))))))))))))))'
1147 t-policy-nonexist () {
1148 ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
1151 t-make-hook-link () {
1152 local hook=$1 # in infra/
1154 hook=${DGIT_INFRA_PFX}$hook
1157 *) hook=`type -P $hook` ;;
1159 ln -sf "$hook" $linkpath
1164 t-make-hook-link $policyhook $drs_dispatch/policy-hook
1169 t-policy dgit-repos-policy-debian
1172 t-policy-admin create-db
1175 t-policy-periodic () {
1176 : '(((((((((((((((((((((((((((((((((((((((('
1177 ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
1178 test-dummy $drs_dispatch '' --cron
1179 : '))))))))))))))))))))))))))))))))))))))))'
1182 t-buildproductsdir-config () {
1184 t-git-config dgit.default.build-products-dir $bpd
1186 cat <<END >>$tmp/.gbp.conf
1193 local restriction=$1
1194 (cd $root; t-restriction-$restriction >&2)
1198 : "Hopefully installed: $*"
1205 export DGIT_TEST_TESTNAME="$testname"
1206 export DGIT_TEST_TMPBASE="$tmpbase"
1214 t-chain-test "${t#*-}"
1217 t-git-config dgit.default.old-dsc-distro test-dummy
1219 for import in ${autoimport-gnupg}; do
1223 t-setup-import $import