summaryrefslogtreecommitdiff
path: root/tests/tests/sbuild-gitish
blob: da90b6f4967c29f8bbd3e02794b0472925d1f8de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
set -e
. tests/lib

t-dependencies sbuild man-db
t-restrict x-dgit-schroot-build

t-tstunt-parsechangelog

t-prep-newpackage example 1.1

buildrune=$(
	t-dgit-manpage 7 dgit-user | \
	perl -ne '
		next unless m/^ +Using sbuild$/ .. 0;
		next unless m/^ +\%/ .. 0;
		next if !m/\S/ .. 0;
		s/^ +\%//;
		$fixchr += s/(\s-c\s*)jessie(\s|$)/$1'"$schroot"'$2/;
		print or die $!;
		END { $fixchr == 1 or die $fixchr; }
	'
)

cd $p

build () {
	eval "$buildrune"
}

git checkout quilt-tip-1.1~0

build

git checkout gitish-only~0

cat <<'END' >clean-target-hook
#!/bin/sh
set -ex
test "$SCHROOT_SESSION_ID"
END
git add clean-target-hook
git commit -m 'insist on schroot'

build

t-ok