chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Cope with new git-buildpackage which provides gbp, rather than the eponymous command...
[dgit.git]
/
tests
/
lib
diff --git
a/tests/lib
b/tests/lib
index 118c497115e9f1ac96198a6c7b392653215cc394..9308b169e9636d8440956c965b1f819203ce6279 100644
(file)
--- a/
tests/lib
+++ b/
tests/lib
@@
-5,10
+5,11
@@
set -x
set -o pipefail
. tests/lib-core
set -o pipefail
. tests/lib-core
+. tests/lib-restricts
t-set-intree
t-set-intree
-: ${DGIT_TEST_DEBUG
:
=-D}
+: ${DGIT_TEST_DEBUG=-D}
export DGIT_TEST_DEBUG
root=`pwd`
export DGIT_TEST_DEBUG
root=`pwd`
@@
-111,11
+112,12
@@
t-git-objects-not-present () {
t-reporefs () {
local whichoutput=$1; shift
t-reporefs () {
local whichoutput=$1; shift
+ local whichrepo=${1-$dgitrepo}
local outputfile="$tmp/show-refs.$whichoutput"
(set -e
exec >"$outputfile"
local outputfile="$tmp/show-refs.$whichoutput"
(set -e
exec >"$outputfile"
- if test -d $
dgit
repo; then
- cd $
dgit
repo
+ if test -d $
which
repo; then
+ cd $
which
repo
git show-ref |sort
fi)
}
git show-ref |sort
fi)
}
@@
-300,6
+302,15
@@
t-diff-nogit () {
diff --exclude=.git --exclude=.pc -ruN $*
}
diff --exclude=.git --exclude=.pc -ruN $*
}
+t-files-notexist () {
+ local f
+ for f in "$@"; do
+ if [ -e $f ]; then
+ fail "$f exists!"
+ fi
+ done
+}
+
t-cloned-fetched-good () {
t-diff-nogit ../extract/$p-${v%-*} .
t-clean-on-branch dgit/sid
t-cloned-fetched-good () {
t-diff-nogit ../extract/$p-${v%-*} .
t-clean-on-branch dgit/sid
@@
-426,6
+437,16
@@
t-pushed-good () {
git verify-tag `t-v-tag`
}
git verify-tag `t-v-tag`
}
+t-commit-build-push-expect-log () {
+ local msg=$1
+ local mpat=$2
+ t-commit "$msg"
+ t-dgit build
+ LC_MESSAGES=C \
+ t-dgit push --new 2>&1 |tee $tmp/push.log
+ t-grep-mpat "$mpat" $tmp/push.log
+}
+
t-822-field () {
local file=$1
local field=$2
t-822-field () {
local file=$1
local field=$2
@@
-547,14
+568,20
@@
t-policy-nonexist () {
ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
}
ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
}
-t-policy () {
- local policyhook=$1
- policyhook=${DGIT_INFRA_PFX}$policyhook
- case $policyhook in
+t-make-hook-link () {
+ local hook=$1 # in infra/
+ local linkpath=$2
+ hook=${DGIT_INFRA_PFX}$hook
+ case $hook in
*/*) ;;
*/*) ;;
- *)
policyhook=`type -P $policy
hook` ;;
+ *)
hook=`type -P $
hook` ;;
esac
esac
- ln -sf "$policyhook" $drs_dispatch/policy-hook
+ ln -sf "$hook" $linkpath
+}
+
+t-policy () {
+ local policyhook=$1
+ t-make-hook-link $policyhook $drs_dispatch/policy-hook
}
t-debpolicy () {
}
t-debpolicy () {
@@
-570,6
+597,15
@@
t-policy-periodic () {
test-dummy $drs_dispatch '' --cron
}
test-dummy $drs_dispatch '' --cron
}
+t-restrict () {
+ local restriction=$1
+ (cd $root; t-restriction-$restriction >&2)
+}
+
+t-dependencies () {
+ : "Hopefully installed: $*"
+}
+
t-chain-test () {
local ct=$1
local d=${0%/*}
t-chain-test () {
local ct=$1
local d=${0%/*}