diff options
Diffstat (limited to 'tests/tests/import-linkorigs')
-rwxr-xr-x | tests/tests/import-linkorigs | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/tests/tests/import-linkorigs b/tests/tests/import-linkorigs new file mode 100755 index 0000000..815f960 --- /dev/null +++ b/tests/tests/import-linkorigs @@ -0,0 +1,60 @@ +#!/bin/bash +set -e +. tests/lib +. $troot/lib-import-chk + +t-tstunt-parsechangelog + +t-archive-none example +v=1.0-1 + +link_src_files () { + mkdir $1 + cp $troot/pkg-srcs/${p}_* $1 + dscfn=$1/$dscleaf +} + +combo () { + case $bpdhow in + none) bpd=.. ;; + abs) bpd=$tmp/$subdir/bpd ;; + rel) bpd=../bpd ;; + *) x-unknown-bpdhow $bpdhow ;; + esac + + mkdir -p $bpd + git config --local dgit.default.build-products-dir $bpd + + dscleaf=${p}_${v}.dsc + dscfn=$troot/pkg-srcs/$dscleaf + + case $dschow in + abs) ;; + rel) link_src_files ../copies ;; + bpd) link_src_files $bpd ;; + *) x-unknown-dschow $dschow ;; + esac + + t-dgit import-dsc $dscfn +import + git reset --hard import + + t-dch-commit -v$v.1 -m 'New version' + t-dch-commit-r + t-dgit build-source +} + +for bpdhow in none rel abs; do + for dschow in rel abs; do + + subdir=$bpdhow-$dschow + mkdir $subdir + cd $subdir + + mkdir $p + cd $p + + git init + combo + cd ../.. + done +done |