chiark / gitweb /
fa9b74b4a80e75be0bd8820c4ddda6ac16167d10
[dgit.git] / tests / tests / import-nonnative
1 #!/bin/bash
2 set -e
3 . tests/lib
4 . $troot/lib-import-chk
5
6 t-tstunt-parsechangelog
7
8 # 1.0 with diff
9 t-import-chk pari-extra 3-1
10
11 # 3.0 (quilt), multiple patches, multiple origs
12 t-import-chk example 1.0-1
13
14 # 3.0 (quilt), single-debian-patch, one orig
15 t-import-chk sunxi-tools 1.2-2.~~dgittest
16
17 mangle1 () {
18         rm -f ${1}_*
19         t-import-chk1 "$@"
20         cd $tmp/mirror/pool/main
21         dpkg-source -x ${p}_${v}.dsc td
22         orig=${p}_${v%-*}.orig.tar.gz
23         tar zxf $orig
24         rm $orig ${p}_${v}.*
25         cd $p
26         mkdir urk
27         echo urk >urk/urk
28         export GZIP=-1
29 }
30 mangle2 () {
31         cd ..
32         dpkg-source -b td
33         rm -rf $p td
34         cd $tmp
35         t-archive-none $p
36         t-archive-query
37         t-import-chk2
38 }
39
40 # 3.0 (quilt), multiple patches, tarbomb orig
41 mangle1 example 1.0-1
42 tar zvcf ../$orig *
43 mangle2
44
45 # 3.0 (quilt), multiple patches, tarbomb orig with dot
46 mangle1 example 1.0-1
47 tar zvcf ../$orig .
48 mangle2
49
50 # 3.0 (quilt), multiple patches, tarbomb orig with dot and .git and .pc
51 mangle1 example 1.0-1
52 git init
53 mkdir .pc
54 echo SPONG >.pc/SPONG
55 tar zvcf ../$orig .
56 mangle2
57
58 echo done.