chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dgit.pm: runcmd: Break out from dgit
[dgit.git]
/
tests
/
lib
diff --git
a/tests/lib
b/tests/lib
index 4f6f3078a9d15e099e86e47952670ac5f4f35637..3c04155a2ddbe398ba480030186b1ab8add23186 100644
(file)
--- a/
tests/lib
+++ b/
tests/lib
@@
-12,6
+12,7
@@
t-report-failure () {
rc=$1
cat <<END >&2
TEST FAILED
rc=$1
cat <<END >&2
TEST FAILED
+cwd: $PWD
funcs: ${FUNCNAME[*]}
lines: ${BASH_LINENO[*]}
files: ${BASH_SOURCE[*]}
funcs: ${FUNCNAME[*]}
lines: ${BASH_LINENO[*]}
files: ${BASH_SOURCE[*]}
@@
-28,6
+29,8
@@
t-set-intree
: ${DGIT_TEST_DEBUG=-D}
export DGIT_TEST_DEBUG
: ${DGIT_TEST_DEBUG=-D}
export DGIT_TEST_DEBUG
+: ${DGIT_TEST_DISTRO+ ${distro=${DGIT_TEST_DISTRO}}}
+
export GIT_COMMITTER_DATE='1440253867 +0100'
export GIT_AUTHOR_DATE='1440253867 +0100'
export GIT_COMMITTER_DATE='1440253867 +0100'
export GIT_AUTHOR_DATE='1440253867 +0100'
@@
-51,6
+54,7
@@
tmp=`pwd`
t-set-using-tmp
t-set-using-tmp
+test -f $tmp/.save-env || \
env -0 >$tmp/.save-env
ln -f $troot/ssh ssh
env -0 >$tmp/.save-env
ln -f $troot/ssh ssh
@@
-392,6
+396,7
@@
t-fscks () {
}
t-ok () {
}
t-ok () {
+ : '========================================'
t-fscks
echo ok.
}
t-fscks
echo ok.
}
@@
-406,8
+411,8
@@
t-dgit () {
: '
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
$dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
: '
{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{{'
$dgit --dgit=$dgit --dget:-u --dput:--config=$tmp/dput.cf \
-
--config-lookup-explode=dgit-distro.debian.alias-canon
\
- ${distro
--dtest-dummy} ${distro+${distro:+-d}${distro}
} \
+
${dgit_config_debian_alias-"--config-lookup-explode=dgit-distro.debian.alias-canon"}
\
+ ${distro
+${distro:+-d}}${distro--dtest-dummy
} \
$DGIT_TEST_OPTS $DGIT_TEST_DEBUG \
-k39B13D8A $t_dgit_xopts "$@"
: '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
$DGIT_TEST_OPTS $DGIT_TEST_DEBUG \
-k39B13D8A $t_dgit_xopts "$@"
: '}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}
@@
-777,6
+782,12
@@
t-822-field () {
' <$file
}
' <$file
}
+t-defdistro () {
+ export DGIT_TEST_DISTRO=''
+ distro=''
+ t-git-config dgit-suite.unstable.distro test-dummy
+}
+
t-stunt-envvar () {
local var=$1
local tstunt=$2
t-stunt-envvar () {
local var=$1
local tstunt=$2
@@
-800,7
+811,14
@@
t-tstunt--save-real () {
local rc
local real
set +e
local rc
local real
set +e
- real=$(type -p "$f")
+ real=$(
+ p=":$PATH:"
+ p="${p/:"$tmp/tstunt":/:}"
+ p="${p%:}"
+ p="${p#:}"
+ PATH="$p"
+ type -p "$f"
+ )
rc=$?
set -e
rc=$?
set -e
@@
-1008,7
+1026,9
@@
t-dsd () {
}
t-policy-admin () {
}
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 () {
}
t-policy-nonexist () {
@@
-1040,8
+1060,10
@@
t-debpolicy () {
}
t-policy-periodic () {
}
t-policy-periodic () {
+ : '(((((((((((((((((((((((((((((((((((((((('
${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
test-dummy $drs_dispatch '' --cron
${DGIT_REPOS_SERVER_TEST-dgit-repos-server} \
test-dummy $drs_dispatch '' --cron
+ : '))))))))))))))))))))))))))))))))))))))))'
}
t-restrict () {
}
t-restrict () {
@@
-1069,6
+1091,8
@@
t-alt-test () {
t-chain-test "${t#*-}"
}
t-chain-test "${t#*-}"
}
+t-git-config dgit.default.old-dsc-distro test-dummy
+
case "$0" in
*/gnupg) ;;
*) t-setup-import gnupg ;;
case "$0" in
*/gnupg) ;;
*) t-setup-import gnupg ;;