diff options
author | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-11 00:35:28 +0100 |
---|---|---|
committer | Ian Jackson <ijackson@chiark.greenend.org.uk> | 2015-07-11 00:36:16 +0100 |
commit | c17699d17f17f6ea105b7440ff95fa39eebb54a6 (patch) | |
tree | 1f5f42ce8759699b49be63662f151e9f111de66e /tests/lib | |
parent | f1acf7af0d90aca442d1caaa1dbc901ff6adcfbc (diff) |
Test suite: Replace open-coded $tmp/git/$p.git
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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` |