chiark / gitweb /
using-these: New script to help with ad-hoc testing
[dgit.git] / tests / tests / multisuite
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-setup-import examplegit
6 t-tstunt-parsechangelog
7
8 cd $p
9
10 rsta=$(t-git-get-ref refs/remotes/dgit/dgit/stable)
11 rsid=$(t-git-get-ref refs/remotes/dgit/dgit/sid)
12
13 multi-good () {
14         t-refs-same-start
15         t-refs-same refs/remotes/dgit/dgit/stable
16         t-ref-same-val "previous stable" $rsta
17
18         t-refs-same-start
19         t-refs-same refs/remotes/dgit/dgit/sid
20         t-ref-same-val "previous sid" $rsid
21
22         t-refs-same-start
23         t-refs-same refs/remotes/dgit/dgit/stable,sid
24         t-ref-same-val "previous combined" $rcombined
25 }
26
27 t-dgit fetch stable,unstable
28
29 rcombined=$(t-git-get-ref refs/remotes/dgit/dgit/stable,sid)
30
31 multi-good
32
33 cd ..
34
35 t-dgit clone --no-rm-on-error $p stable,unstable ./$p.clone
36
37 cd $p.clone
38
39 multi-good
40
41 t-commit bogus 3.0 stable,unstable
42 t-expect-fail "does not support multiple" \
43 t-dgit -wgf build
44
45 cd ..
46
47 t-dgit clone --no-rm-on-error $p stable ./$p.pull
48 cd $p.pull
49 git checkout -b x
50 git commit --allow-empty -m X
51 t-dgit pull stable,unstable
52
53 multi-good
54
55 t-has-parent-or-is HEAD $rcombined
56
57 t-ok