chiark / gitweb /
test suite: sourceonlypolicy: New test
[dgit.git] / tests / tests / sourceonlypolicy
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-tstunt-parsechangelog
6
7 t-prep-newpackage example 1.0
8
9 cd $p
10 revision=1
11
12 dgit-with-policy () {
13         local policy=$1; shift
14         t-dgit -cdgit-distro.test-dummy.source-only-uploads=$policy "$@"
15 }
16
17 t-expect-fail E:'source-only.*entirely NEW' \
18 dgit-with-policy not-wholly-new push-source --new
19
20 t-expect-fail E:'source-only.*requires \.debs' \
21 dgit-with-policy never push-source --new
22
23 dgit-with-policy always push-source --new
24
25 t-archive-process-incoming sid
26
27 t-commit 'Now with binaries'
28
29 t-dgit -wgf build
30
31 t-expect-fail E:'uploading binaries.*source only' \
32 dgit-with-policy always push --new
33
34 t-commit 'Source-only not NEW'
35
36 dgit-with-policy not-wholly-new push-source --new
37
38 t-ok