chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test suite: Provide t-ref-same-exact
[dgit.git]
/
tests
/
lib
diff --git
a/tests/lib
b/tests/lib
index 897fd6d6f86334b70de796d6ce075ffd72902115..77c15d4e7e8ababab621b481a17133482a3f1be8 100644
(file)
--- a/
tests/lib
+++ b/
tests/lib
@@
-157,7
+157,7
@@
t-prep-newpackage () {
t-git-none
t-worktree $v
cd $p
t-git-none
t-worktree $v
cd $p
- if ! git
-
show-ref --verify --quiet refs/heads/master; then
+ if ! git
show-ref --verify --quiet refs/heads/master; then
git branch -m dgit/sid master
git remote rm dgit
fi
git branch -m dgit/sid master
git remote rm dgit
fi
@@
-270,6
+270,7
@@
t-rm-dput-dropping () {
t-dgit () {
local dgit=${DGIT_TEST-dgit}
t-dgit () {
local dgit=${DGIT_TEST-dgit}
+ pwd
: '
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
$dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
: '
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
$dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
@@
-326,6
+327,12
@@
t-git-get-ref () {
'
}
'
}
+t-ref-same-exact () {
+ local name="$1"
+ local val=`t-git-get-ref-exact $name`
+ t-ref-same-val "$name" $val
+}
+
t-ref-same () {
local name="$1"
local val=`t-git-get-ref $name`
t-ref-same () {
local name="$1"
local val=`t-git-get-ref $name`
@@
-362,7
+369,7
@@
t-refs-same () {
t-refs-notexist () {
local val
for g in $*; do
t-refs-notexist () {
local val
for g in $*; do
- val=`t-git-get-ref $g
>$tmp/t.refx
`
+ val=`t-git-get-ref $g`
if [ "x$val" != x ]; then
fail "ref $g unexpectedly exists ($val)"
fi
if [ "x$val" != x ]; then
fail "ref $g unexpectedly exists ($val)"
fi
@@
-370,7
+377,7
@@
t-refs-notexist () {
}
t-v-tag () {
}
t-v-tag () {
- echo refs/tags/
debian
/${v//\~/_}
+ echo refs/tags/
test-dummy
/${v//\~/_}
}
t-pushed-good () {
}
t-pushed-good () {
@@
-461,11
+468,11
@@
t-apply-diff () {
t-commit () {
local msg=$1
t-commit () {
local msg=$1
- v=
1.$revision
+ v=
${2-1.$revision}
dch -v$v --distribution unstable "$1"
git add debian/changelog
debcommit
dch -v$v --distribution unstable "$1"
git add debian/changelog
debcommit
- revision=$(( $
revision
+ 1 ))
+ revision=$(( $
{revision-0}
+ 1 ))
}
t-git-config () {
}
t-git-config () {
@@
-516,10
+523,18
@@
t-policy-admin () {
${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
}
${DGIT_INFRA_PFX}dgit-repos-admin-debian --repos $tmp/git "$@"
}
+t-policy-nonexist () {
+ ln -sf no-such-file-or-directory $drs_dispatch/policy-hook
+}
+
t-policy () {
local policyhook=$1
t-policy () {
local policyhook=$1
- ln -sf ${DGIT_INFRA_PFX}$policyhook \
- $drs_dispatch/policy-hook
+ policyhook=${DGIT_INFRA_PFX}$policyhook
+ case $policyhook in
+ */*) ;;
+ *) policyhook=`type -P $policyhook` ;;
+ esac
+ ln -sf "$policyhook" $drs_dispatch/policy-hook
}
t-debpolicy () {
}
t-debpolicy () {