summaryrefslogtreecommitdiff
path: root/tests/lib
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib')
-rw-r--r--tests/lib13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/lib b/tests/lib
index ebfe5a7..046d362 100644
--- a/tests/lib
+++ b/tests/lib
@@ -92,7 +92,7 @@ t-expect-push-fail () {
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 gitdir="${1-$dgitrepo}"
local obj
if ! [ -e "$gitdir" ]; then return; fi
for obj in "$@"; do
@@ -107,8 +107,8 @@ t-reporefs () {
local outputfile="$tmp/show-refs.$whichoutput"
(set -e
exec >"$outputfile"
- if test -d $tmp/git/$p.git; then
- cd $tmp/git/$p.git
+ if test -d $dgitrepo; then
+ cd $dgitrepo
git show-ref |sort
fi)
}
@@ -130,6 +130,7 @@ t-worktree () {
t-select-package () {
p=$1
+ dgitrepo=$tmp/git/$p.git
}
t-git () {
@@ -251,11 +252,11 @@ t-archive () {
}
t-git-dir-time-passes () {
- touch -d 'last year' $tmp/git/$p.git
+ touch -d 'last year' $dgitrepo
}
t-git-dir-check () {
- local gitdir=$tmp/git/$p.git
+ local gitdir=$dgitrepo
case "$1" in
enoent)
if test -e "$gitdir"; then fail "$gitdir exists"; fi
@@ -407,7 +408,7 @@ t-pushed-good () {
t-refs-notexist \
refs/heads/dgit/unstable \
refs/remotes/dgit/dgit/unstable
- (set -e; cd $tmp/git/$p.git
+ (set -e; cd $dgitrepo
t-refs-same \
refs/dgit/sid \
`t-v-tag`