summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2013-11-17 15:05:35 +0000
committerIan Jackson <ijackson@chiark.greenend.org.uk>2013-11-24 17:45:27 +0000
commitaa763397e6222caf15f1f4c86e05162b8764f3dc (patch)
treed6eb0898f78fce9db8581582e9c26ac7b1f64870 /tests/lib
parent34490655252a304aff3fecc27dc81f4bc4e6d3fd (diff)
autopkgtests: break out fetch-nogit
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib16
1 files changed, 13 insertions, 3 deletions
diff --git a/tests/lib b/tests/lib
index 5ce17d6..8823b28 100644
--- a/tests/lib
+++ b/tests/lib
@@ -22,15 +22,25 @@ ln $troot/ssh ssh
mkdir $tmp/gnupg
export GNUPGHOME=$tmp/gnupg
-t-git () {
- mkdir -p $tmp/git
- cp -al $troot/git-srcs/$1 git/.
+t-worktree () {
+ rm -rf $p
+ tar xf $troot/worktrees/${p}_$1.tar
}
t-git-none () {
mkdir -p $tmp/git
}
+t-has-ancestor () {
+ local ancestor=`git rev-parse $1`
+ local now=`git rev-parse HEAD`
+ local mbase=`git merge-base $ancestor $now`
+ if [ x$mbase != x$ancestor ]; then
+ echo "not ff $ancestor..$now, $mbase != $ancestor"
+ exit 1
+ fi
+}
+
t-archive () {
p=$1
v=$2