chiark / gitweb /
Test suite: stunt Parse.pm: add comment about %options
[dgit.git] / tests / lib-mirror
1
2 t-mirror-setup () {
3         # p must be set already
4
5         reposmirror=$tmp/git-mirror
6         pmirror=$reposmirror/$p.git
7         queuedir=$tmp/git/_mirror-queue
8
9         mkdir $reposmirror
10
11         mirror_hook=$drs_dispatch/mirror-hook
12         t-make-hook-link dgit-mirror-rsync $mirror_hook
13
14         >$drs_dispatch/mirror-settings
15         t-mirror-set remoterepos="$reposmirror"
16
17         t-mirror-hook setup
18 }
19
20 t-mirror-set () {
21         echo >>$drs_dispatch/mirror-settings "$1"
22 }
23
24 t-mirror-hook () {
25         "$mirror_hook" "$drs_dispatch" "$@"
26 }
27
28 t-check-mirrored () {
29         t-reporefs master
30         t-reporefs mirror $pmirror
31         diff $tmp/show-refs.{master,mirror}
32         cat $queuedir/$p.log ||:
33         t-files-notexist $queuedir/$p.{n,a,lock,err}
34 }
35
36 t-check-not-mirrored () {
37         # uses previous t-reporefs-master
38         t-reporefs mirror $pmirror
39         diff $tmp/show-refs.{master,mirror}
40 }