chiark / gitweb /
Test suite: t-expect-push-fail checks HEAD object did not arrive
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 10 Jun 2015 20:29:52 +0000 (21:29 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 10 Jun 2015 20:29:52 +0000 (21:29 +0100)
tests/lib
tests/tests/debpolicy-newreject

index 03c25ce335ac3b96334c48673de29fe558840e82..5b93d98dc86b074d71080106cf9ca35a8ec43e9c 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -74,15 +74,22 @@ t-expect-fail () {
 
 t-expect-push-fail () {
        local mpat="$1"; shift
 
 t-expect-push-fail () {
        local mpat="$1"; shift
+
+       local triedpush=`git rev-parse HEAD`
+
        t-reporefs pre-push
        t-expect-fail "$mpat"  "$@"
        t-reporefs post-push
        diff $tmp/show-refs.{pre,post}-push
 
        t-reporefs pre-push
        t-expect-fail "$mpat"  "$@"
        t-reporefs post-push
        diff $tmp/show-refs.{pre,post}-push
 
+       t-git-objects-not-present '' $triedpush
+
        eval "$t_expect_push_fail_hook"
 }
 
 t-git-objects-not-present () {
        eval "$t_expect_push_fail_hook"
 }
 
 t-git-objects-not-present () {
+       # t-git-objects-not-present GITDIR|'' OBJID [...]
+       # specifying '' means the repo for package $p
        local gitdir="${1-$tmp/git/$p.git}"
        local obj
        if ! [ -e "$gitdir" ]; then return; fi
        local gitdir="${1-$tmp/git/$p.git}"
        local obj
        if ! [ -e "$gitdir" ]; then return; fi
index 10af31fcb81f0ab59293d8be024baca7a1c6f776..40f5db5dfd0d409ec4f9cd8dd6a5a258a4fefcc1 100755 (executable)
@@ -85,4 +85,3 @@ cd $tmp/$p
 
 echo xxx up to here
 echo xxx want to test database lock retry thing on push-and-taint
 
 echo xxx up to here
 echo xxx want to test database lock retry thing on push-and-taint
-echo xxx want to t-expect-push-fail leaves HEAD object not dest repo