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
45 if [ x"$tmp" = x ]; then
46 export DGIT_TEST_BYHAND=1
49 tmp=tests/tmp/$testname
52 elif [ "x$DGIT_TEST_TMPBASE" != x ]; then
53 tmpbase="$DGIT_TEST_TMPBASE"
61 test -f $tmp/.save-env || \
62 env -0 >$tmp/.save-env
66 export DEBCHANGE_VENDOR=dpkg
68 mkdir -p $tmp/incoming
69 cat <<END >$tmp/dput.cf
72 incoming = $tmp/incoming
76 : ${t_archive_method:=aq}
77 : ${tagpfx:=archive/test-dummy}
78 : ${suitespecs:=sid:unstable}
81 GIT_COMMITTER_DATE="$(( ${GIT_COMMITTER_DATE%% *} + 1 )) ${GIT_COMMITTER_DATE#* }"
82 GIT_AUTHOR_DATE="$GIT_COMMITTER_DATE"
86 local mpat="$1"; shift
89 LC_MESSAGES=C "$@" 2>&1 | tee $tmp/t.output
90 local ps="${PIPESTATUS[*]}"
94 "0 0") fail "command unexpectedly succeeded (instead of: $mpat)" ;;
96 *) fail "tee failed" ;;
99 t-grep-mpat "$mpat" $tmp/t.output
110 E:*) grepper=egrep ;;
111 F:*) grepper=fgrep ;;
112 *) fail "bad mpat prefix in $mpat";;
118 $grepper -e "$mpat" "$file" ||
119 fail "message not found"
122 t-expect-push-fail () {
123 local mpat="$1"; shift
125 local triedpush; triedpush=`git rev-parse HEAD`
128 t-expect-fail "$mpat" "$@"
130 diff $tmp/show-refs.{pre,post}-push
132 t-git-objects-not-present '' $triedpush
134 eval "$t_expect_push_fail_hook"
137 t-git-objects-not-present () {
138 # t-git-objects-not-present GITDIR|'' OBJID [...]
139 # specifying '' means the repo for package $p
140 local gitdir="${1-$dgitrepo}"
142 if ! [ -e "$gitdir" ]; then return; fi
145 t-expect-fail 'unable to find' \
151 local whichoutput=$1; shift
152 local whichrepo=${1-$dgitrepo}
153 local outputfile="$tmp/show-refs.$whichoutput"
156 if test -d $whichrepo; then
164 local edittree=$1.edit
165 if test -d "$edittree"; then
166 cp -a "$edittree"/* .
174 t-untar $troot/worktrees/${p}_$1
177 t-select-package () {
179 dgitrepo=$tmp/git/$p.git
186 local gs=$troot/git-srcs/${p}_$v.git
187 (set -e; cd $tmp/git; t-untar $gs)
192 (set -e; cd $tmp/git; tar xf $troot/git-template.tar)
195 t-salsa-add-remote () {
196 local d=$tmp/salsa/$p
198 (set -e; cd $d; git init --bare)
199 git remote add ${1-origin} $d
202 t-git-merge-base () {
203 git merge-base $1 $2 || test $? = 1
207 # t-has-ancestor ANCESTOR
208 # (CHILD is implicit, HEAD)
209 local now; now=`git rev-parse HEAD`
210 local ancestor; ancestor=`git rev-parse $1^{}`
211 local mbase; mbase=`t-git-merge-base $ancestor $now`
212 if [ x$mbase != x$ancestor ]; then
213 fail "not ff $ancestor..$now, $mbase != $ancestor"
217 t-has-parent-or-is () {
218 # t-has-parent-or-is CHILD PARENT
222 parents=$(git show --pretty=format:' %P %H ' "$child")
223 parent=$(git rev-parse "$parent~0")
226 *) fail "child $child lacks parent $parent" ;;
230 t-prep-newpackage () {
237 if ! git show-ref --verify --quiet refs/heads/master; then
238 git branch -m dgit/sid master
246 t-archive-none-$t_archive_method
248 t-archive-none-aq () {
249 mkdir -p $tmp/aq/dsc_in_suite $tmp/mirror/pool/main
255 for suitespec in $suitespecs; do
256 local suite=${suitespec%%:*}
257 local sname=${suitespec#*:}
259 >$tmp/aq/package.$suite.$p
260 t-aq-archive-updated $suite $p
262 >$tmp/aq/package.new.$p
263 t-aq-archive-updated new $p
265 ln -sf $suite $tmp/aq/dsc_in_suite/$sname
267 cat <<END >>$tmp/aq/suites
270 "archive" : "ftp-master",
271 "codename" : "$suite",
284 cat <<END >>$tmp/aq/suites
290 t-aq-archive-updated () {
293 local suitedir=$tmp/aq/dsc_in_suite/$suite
295 perl <$tmp/aq/package.$suite.$p >$suitedir/$p -wne '
299 m{^(\S+) (\w+) ([^ \t/]+)/(\S+)} or die;
307 my $json = JSON->new->canonical();
308 print $json->encode(\@v) or die $!;
313 t-archive-process-incoming () {
315 mv $tmp/incoming/${p}_* $tmp/mirror/pool/main/
316 t-archive-query "$suite"
321 local dscf=main/${p}_${v}.dsc
322 t-archive-query-$t_archive_method "$suite" "$p" "$v" "$dscf"
324 t-archive-query-aq () {
329 local sha; sha=`sha256sum <$tmp/mirror/pool/$dscf`
330 echo "${v} ${sha% -} $dscf" >>$tmp/aq/package.$suite.${p}
331 t-aq-archive-updated $suite $p
337 local dscf=${p}_$2.dsc
338 rm -f $tmp/mirror/pool/main/${p}_*
339 ln $troot/pkg-srcs/${p}_${2%-*}* $tmp/mirror/pool/main/
340 t-archive-query $suite
343 (set -e; cd $tmp/extract; dpkg-source -x ../mirror/pool/main/$dscf)
346 t-git-dir-time-passes () {
347 touch -d 'last year' $dgitrepo
351 local gitdir=$dgitrepo
354 if test -e "$gitdir"; then fail "$gitdir exists"; fi
357 public) wantstat='7[75]5' ;;
358 secret) wantstat='7[70]0' ;;
359 *) fail "$1 t-git-dir-check ?" ;;
361 gotstat=`stat -c%a $gitdir`
363 *$wantstat) return ;;
364 *) fail "$gitdir has mode $gotstat, expected $wantstat" ;;
368 t-expect-fsck-fail () {
369 echo >>$tmp/fsck.expected-errors "$1"
373 local fsckerrs=$(git rev-parse --git-dir)/dgit-test-fsck.errs
376 LC_MESSAGES=C git fsck --no-dangling --strict 2>&1 \
378 ps="${PIPESTATUS[*]}"
382 if [ -f $tmp/fsck.expected-errors ]; then
383 pats=(-w -f $tmp/fsck.expected-errors)
387 pats+=(-e 'notice: HEAD points to an unborn branch')
388 pats+=(-e 'notice: No default references')
391 grep -v "${pats[@]}" $fsckerrs
395 1) ;; # no unexpected errors
396 0) fail "unexpected messages from git-fsck" ;;
397 *) fail "grep of git-fsck failed" ;;
404 for d in $tmp/*/.git $tmp/git/*.git; do
412 : '========================================'
418 t-save-artifacts () {
419 artifacts="$AUTOPKGTEST_ARTIFACTS"
420 if [ x"$artifacts" = x ]; then return; fi
421 if [ x"tmp" = x ]; then return; fi
422 : '(((((((((( t-save-artifacts ))))))))))'
423 cp -dR --preserve=links,timestamps "$tmp"/. "$artifacts"/.
425 find . \( -name \*.tar -o -name \*.sample \) -print0 | \
427 find . \( -name .git \
428 -o -path ./salsa/\* \
429 -o -path ./git/\*.git \
431 \! -path '*/.git/*/.git' -exec sh -xec '
433 "$2"/playtree-save-refs
436 : ')))))))))) t-save-artifacts ))))))))))'
439 t-rm-dput-dropping () {
440 rm -f $tmp/${p}_${v}_*.upload
444 local dgit=${DGIT_TEST-dgit}
447 {{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
448 $dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
449 ${dgit_config_debian_alias-"--config-lookup-explode=dgit-distro.debian.alias-canon"} \
450 ${DGIT_GITDEBREBASE_TEST+--git-debrebase=}${DGIT_GITDEBREBASE_TEST} \
451 ${distro+${distro:+-d}}${distro--dtest-dummy} \
452 $DGIT_TEST_OPTS $DGIT_TEST_DEBUG \
453 -kBCD22CD83243B79D3DFAC33EA3DBCBC039B13D8A $t_dgit_xopts "$@"
454 : '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
461 (export LC_ALL=C.UTF-8
462 if [ "$DGIT_TEST_INTREE" ]; then
463 make -C $DGIT_TEST_INTREE $page.$section.view
470 diff --exclude=.git --exclude=.pc -ruN $*
473 t-files-notexist () {
482 t-cloned-fetched-good () {
483 t-diff-nogit ../extract/$p-${v%-*} .
484 t-clean-on-branch dgit/sid
487 refs/heads/dgit/sid \
488 refs/remotes/dgit/dgit/sid
489 t-refs-notexist refs/dgit/unstable refs/remotes/dgit/dgit/unstable
493 printf "%s${1:+\n}" "$1" >$tmp/t.want
496 diff $tmp/t.want $tmp/t.got
499 t-clean-on-branch () {
500 t-output "## $1" git status -b --porcelain
508 local import=IMPORT.${DGIT_TEST_TESTNAME-${0##*/}}
509 exec 4>$tmp/$import.new
512 for vn in $savevars; do
513 perl >&4 -"I$root" -MDebian::Dgit -e '
514 printf "%s=%s\n", $ARGV[0], shellquote $ARGV[1]
515 ' $vn "$(eval "printf '%s\n' \"\$$vn\"")"
518 (set -e; cd $tmp; tar cf $import.tar $savedirs)
520 printf >&4 "\n%s\n" "$importeval"
522 mv -f $tmp/$import.new $tmp/$import
530 if [ "x$tmpbase" = x ]; then
531 # ADTTMP was set on entry to tests/lib, so we
532 # are not sharing tmp area between tests
534 lock="$tmp/.dummy.lock"
536 setupsrc="$tmpbase/$setupname"
537 lock="$setupsrc.lock"
540 local simport="$setupsrc/IMPORT.$setupname"
542 if ! [ -e "$simport" ]; then
543 with-lock-ex -w "$lock" \
544 xargs -0 -a $tmp/.save-env \
547 setupname="$1"; shift
549 if [ -e "$simport" ]; then exit 0; fi
551 "tests/setup/$setupname"
552 ' x "$root" "$setupname" "$simport"
555 if [ "x$setupsrc" != "x$tmp" ]; then
556 (set -e; cd $tmp; tar xf "$simport.tar")
562 t-git-get-ref-exact () {
564 # does not dereference, unlike t-git-get-ref
567 *) fail "t-git-get-ref-exact bad $ref" ;;
569 git for-each-ref --format='%(objectname)' "[r]efs/${ref#refs/}"
576 *) fail "t-git-get-ref bad $ref" ;;
578 (git show-ref -d $1 || test $? = 1) | perl -ne '
579 $x = $1 if m#^(\w+) \Q'$1'\E(?:\^\{\})?$#;
580 END { print "$x\n" if length $x; }
584 t-ref-same-exact () {
586 local val; val=`t-git-get-ref-exact $name`
587 t-ref-same-val "$name" $val
592 local val; val=`t-git-get-ref $name`
593 t-ref-same-val "$name" $val
597 local val; val=`git rev-parse HEAD`
598 t-ref-same-val HEAD $val
604 case "${t_ref_val-unset}" in
607 *) fail "ref varies: ($name)\
608 ${val:-nothing} != ${t_ref_val:-nothing} (${t_ref_names[*]})" ;;
611 t_ref_names+=("$name")
614 t-refs-same-start () {
629 val=`t-git-get-ref $g`
630 if [ "x$val" != x ]; then
631 fail "ref $g unexpectedly exists ($val)"
637 echo refs/tags/$tagpfx/${v//\~/_}
641 git log -n1 --pretty=format:"$1" "$2"
644 t-sametree-parent () {
647 local ctree; ctree=$(t-format-ref '%T' "$ref")
650 for parent in $(t-format-ref '%P' "$ref"); do
651 local ptree; ptree=$(t-format-ref '%T' "$parent")
652 if [ "x$ptree" = "x$ctree" ]; then
656 case "$psame" in ""|" * *") break ;; esac
662 t-check-pushed-master () {
663 local master; master=`t-git-get-ref refs/heads/master`
664 if [ x$master = x$t_ref_val ]; then return; fi
665 if [ x$master = x ]; then fail "failed to push master"; fi
666 # didn't update master, it must be not FF
667 local mbase; mbase=`t-git-merge-base $master $t_ref_val`
668 if [ x$mbase = x$master ]; then fail "failed to ff master"; fi
671 t-push-was-source-only () {
673 t-files-notexist $tmp/incoming/${p}_${v}_*.deb \
674 $tmp/incoming/${p}_${v}_*.udeb
675 # we permit _source.buildinfo files; see test_changes_source_only()
676 for f in $tmp/incoming/${p}_${v}_*.buildinfo; do
679 *_source.buildinfo) ;;
680 *) fail "non-source-only file $f exists!" ;;
688 local suite=${2:-sid}
694 t-pushed-good-core () {
698 refs/remotes/dgit/dgit/$suite
700 refs/heads/dgit/unstable \
701 refs/remotes/dgit/dgit/unstable
702 (set -e; cd $dgitrepo
706 ${t_check_pushed_master:- : NOT-DRS-NO-CHECK-PUSHED-MASTER}
710 git verify-tag `t-v-tag`
713 t-splitbrain-pushed-good--unpack () {
718 ln -s $tmp/mirror/pool/main/*.orig*.tar* .
719 ln -s $tmp/incoming/*.orig*.tar* . ||:
720 ln -s $incoming_dsc .
721 ln -s ${incoming_dsc/.dsc/.debian.tar}* .
722 dpkg-source "$@" -x *.dsc
725 git fetch ../../$p "refs/tags/*:refs/tags/*"
728 t-splitbrain-pushed-good--checkprep () {
730 git rm --cached -r --ignore-unmatch .pc
733 t-splitbrain-pushed-good--checkdiff () {
735 t-splitbrain-pushed-good--checkprep
736 t-output "" git diff --stat --cached $tag
739 t-splitbrain-pushed-good-start () {
740 dep14tag=refs/tags/test-dummy/${v//\~/_}
742 t-output "" git status --porcelain
744 t-refs-same $dep14tag
745 (set -e; cd $dgitrepo; t-refs-same $dep14tag)
746 git merge-base --is-ancestor $dep14tag $dgittag
749 t-ref-same refs/heads/split.p
750 case "$(t-git-get-ref refs/heads/split.b)" in
752 "$(git rev-parse refs/heads/split.p^0)") ;;
753 "$(git rev-parse refs/heads/split.p^1)") ;;
760 t-splitbrain-pushed-good--unpack
761 t-splitbrain-pushed-good--checkdiff $dgittag
763 t-splitbrain-pushed-good-end-made-dep14 () {
764 t-splitbrain-pushed-good--checkdiff $dep14tag
768 t-splitbrain-rm-gitignore-patch () {
770 next unless $_ eq "auto-gitignore\n";
773 rename "debian/patches/$_", "../t-auto-gitignore" or die $!;
775 ' debian/patches/series
778 t-gbp-pushed-good () {
779 local suite=${1:-sid}
780 t-splitbrain-pushed-good-start
782 # Right, now we want to check that the maintainer tree and
783 # the dgit tree differ in exactly the ways we expect. We
784 # achieve this by trying to reconstruct the maintainer tree
785 # from the dgit tree.
787 # So, unpack it withut the patches applied
788 t-splitbrain-pushed-good--unpack --skip-patches
790 # dgit might have added a .gitignore patch, which we need to
792 t-splitbrain-rm-gitignore-patch
794 # Now the result should differ only in non-debian/ .gitignores
795 t-splitbrain-pushed-good--checkprep
796 git diff --cached --name-only $dep14tag >../changed
798 next if !m#^debian/# && m#(^|/)\.gitignore#;
802 # If we actually apply the gitignore patch by hand, it
804 if [ -f ../t-auto-gitignore ]; then
805 patch --backup-if-mismatch -p1 -u <../t-auto-gitignore
808 t-splitbrain-pushed-good-end-made-dep14
811 t-unapplied-pushed-good () {
812 t-splitbrain-pushed-good-start
813 t-splitbrain-pushed-good--unpack --skip-patches
814 t-splitbrain-pushed-good-end-made-dep14
817 t-dpm-pushed-good () {
818 t-splitbrain-pushed-good-start
819 t-splitbrain-pushed-good--unpack
820 t-splitbrain-rm-gitignore-patch
821 t-splitbrain-pushed-good-end-made-dep14
824 t-commit-build-push-expect-log () {
830 t-dgit push --new 2>&1 |tee $tmp/push.log
831 t-grep-mpat "$mpat" $tmp/push.log
838 use Dpkg::Control::Hash;
839 my $h = new Dpkg::Control::Hash allow_pgp=>1;
840 $h->parse(\*STDIN,"'"$file"'");
841 my $val = $h->{"'$field'"},"\n";
842 die "'"$file $field"'" unless defined $val;
848 export DGIT_TEST_DISTRO=''
850 t-git-config dgit-suite.unstable.distro test-dummy
860 "") '$var'="$tstunt" ;;
861 *) '$var'="$tstunt:$'$var'" ;;
867 t-tstunt--save-real () {
878 p="${p/:"$tmp/tstunt":/:}"
890 *) fail "did not find $f on PATH $PATH" ;;
893 local varname=${f//[^_0-9a-zA-Z]/_}
894 varname=DGIT_TEST_REAL_${varname^^}
897 : \${$varname:=\$real}
903 local tstunt=$tmp/tstunt
904 t-stunt-envvar PATH $tstunt
905 t-stunt-envvar PERLLIB $tstunt
908 t-tstunt--save-real $f
910 local d="$tstunt/${f%/*}"
912 ln -sf "$troot/tstunt/$f" "$d"/.
916 t-tstunt-parsechangelog () {
917 t-tstunt dpkg-parsechangelog Dpkg/Changelog/Parse.pm
920 t-tstunt-lintian () {
924 t-tstunt-debuild () {
929 local dsc=${p}_${v}.dsc
930 incoming_dsc=$tmp/incoming/$dsc
935 local val; val=`t-822-field $incoming_dsc Dgit`
938 die "Dgit $_ ?" unless m/^\w+\b/;
939 print $&,"\n" or die $!;
941 t-ref-same-val $incoming_dsc "$val"
948 debdiff ${p}_${v1}.dsc ${p}_${v2}.dsc || test $? = 1) \
952 t-gbp-unapplied-pq2qc () {
953 # does `gbp pq export'
954 # commits the resulting debian/patches on qc/BRANCH
955 # leaves us on qc/BRANCH (eg "qc/quilt-tip"))
956 # qc/BRANCH is not fast-forwarding
960 branch=`git symbolic-ref HEAD`
961 branch=${branch#refs/heads/}
964 */*) fail "unexpected branch $branch" ;;
967 git branch -f qc/$branch
968 git checkout qc/$branch
969 git add debian/patches
970 git commit -m 'Commit patch queue'
973 t-git-pseudo-merge () {
974 # like git merge -s ours
975 if [ ! "$git_pseuomerge_opts" ]; then
976 if git merge --help \
977 | grep -q allow-unrelated-histories; then
978 git_pseuomerge_opts='--allow-unrelated-histories'
980 git_pseuomerge_opts+=' -s ours'
982 git merge $git_pseuomerge_opts "$@"
985 t-gbp-example-prep-no-ff () {
986 t-tstunt-parsechangelog
987 t-archive example 1.0-1
995 git checkout -b patch-queue/quilt-tip-2 patch-queue/quilt-tip
998 echo '/* some comment */' >>src.c
1000 git commit -m 'Add a comment to an upstream file'
1002 t-gbp-unapplied-pq2qc
1004 t-commit 'some updates' 1.0-2
1007 t-gbp-example-prep () {
1008 t-gbp-example-prep-no-ff
1010 t-git-pseudo-merge \
1011 -m 'Pseudo-merge to make descendant of archive' \
1012 remotes/dgit/dgit/sid
1015 t-make-badcommit () {
1017 git cat-file commit HEAD | \
1018 perl -pe 's/^committer /commiter /' | \
1019 git hash-object -w -t commit --stdin
1021 t-expect-fsck-fail $badcommit
1026 v=${2:-${majorv:-1}.$revision}
1027 dch --force-distribution -v$v --distribution ${3:-unstable} "$1"
1028 git add debian/changelog
1030 revision=$(( ${revision-0} + 1 ))
1034 local cmd="$1"; shift
1035 local suite=${1-unstable}
1036 $cmd -r -D "$suite" ''
1040 t-dch-r-rune t-dch-commit "$@"
1044 faketime @"${GIT_AUTHOR_DATE% *}" dch "$@"
1045 git commit -m "dch $*" debian/changelog
1049 git config --global "$@"
1053 t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S "
1054 t-git-config dgit-distro.test-dummy.git-check true
1055 t-git-config dgit-distro.test-dummy.git-create true
1056 t-git-config dgit-distro.test-dummy.dgit-tag-format new,old,maint
1057 cp $troot/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/.
1058 cp $troot/suites $tmp/.
1059 cp $troot/suites $tmp/suites-master
1061 export t_check_pushed_master=t-check-pushed-master
1063 drs_dispatch=$tmp/distro=test-dummy
1066 if [ "x$DGIT_TEST_INTREE" != x ]; then
1067 ln -sf "$DGIT_TEST_INTREE" $drs_dispatch/dgit-live
1070 ln -sf $tmp/git $drs_dispatch/repos
1071 ln -sf $tmp/suites $tmp/suites-master $tmp/dm.txt $drs_dispatch/
1072 mkdir -p $drs_dispatch/keyrings
1073 ln -sf $tmp/dd.gpg $drs_dispatch/keyrings/debian-keyring.gpg
1074 ln -sf $tmp/dm.gpg $drs_dispatch/keyrings/debian-maintainers.gpg
1075 ln -sf /bin/true $drs_dispatch/policy-hook
1079 export tagpfx=archive/test-dummy
1080 t-git-config dgit-distro.test-dummy.dgit-tag-format new,maint
1083 export tagpfx=test-dummy
1084 t-git-config dgit-distro.test-dummy.dgit-tag-format old
1089 t-git-config dgit-distro.test-dummy.ssh "$troot/dsd-ssh"
1090 t-git-config dgit-distro.test-dummy.git-check ssh-cmd
1091 t-git-config dgit-distro.test-dummy.git-create true
1092 t-git-config dgit-distro.test-dummy.git-url \
1093 "ext::$troot/dsd-ssh X %S /dgit/test-dummy/repos"
1095 t-git-config dgit-distro.test-dummy.diverts.drs /drs
1096 t-git-config dgit-distro.test-dummy/drs.ssh "$troot/ssh"
1097 t-git-config dgit-distro.test-dummy/drs.git-url $tmp/git
1098 t-git-config dgit-distro.test-dummy/drs.git-check ssh-cmd
1099 t-git-config dgit-distro.test-dummy/drs.git-create ssh-cmd
1101 echo 'no-such-package* drs' >$drs_dispatch/diverts
1105 : '(((((((((((((((((((((((((((((((((((((((('
1106 ${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
1107 : '))))))))))))))))))))))))))))))))))))))))'
1110 t-policy-nonexist () {
1111 ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
1114 t-make-hook-link () {
1115 local hook=$1 # in infra/
1117 hook=${DGIT_INFRA_PFX}$hook
1120 *) hook=`type -P $hook` ;;
1122 ln -sf "$hook" $linkpath
1127 t-make-hook-link $policyhook $drs_dispatch/policy-hook
1132 t-policy dgit-repos-policy-debian
1135 t-policy-admin create-db
1138 t-policy-periodic () {
1139 : '(((((((((((((((((((((((((((((((((((((((('
1140 ${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
1141 test-dummy $drs_dispatch '' --cron
1142 : '))))))))))))))))))))))))))))))))))))))))'
1146 local restriction=$1
1147 (cd $root; t-restriction-$restriction >&2)
1151 : "Hopefully installed: $*"
1158 export DGIT_TEST_TESTNAME="$testname"
1159 export DGIT_TEST_TMPBASE="$tmpbase"
1167 t-chain-test "${t#*-}"
1170 t-git-config dgit.default.old-dsc-distro test-dummy
1172 for import in ${autoimport-gnupg}; do
1176 t-setup-import $import