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: tartree-edit: gitfetchinfo: Specify commit timestamps
[dgit.git]
/
tests
/
lib
diff --git
a/tests/lib
b/tests/lib
index 1179fb093f8ed48535c60a5eaaf52fc7ae9de481..7f459aa2cf2f258fc124de9fce0ceeb342ea1ddc 100644
(file)
--- a/
tests/lib
+++ b/
tests/lib
@@
-5,12
+5,16
@@
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
export DGIT_TEST_DEBUG
+export GIT_COMMITTER_DATE='1440253867 +0100'
+export GIT_AUTHOR_DATE='1440253867 +0100'
+
root=`pwd`
troot=$root/tests
testname="${DGIT_TEST_TESTNAME-${0##*/}}"
root=`pwd`
troot=$root/tests
testname="${DGIT_TEST_TESTNAME-${0##*/}}"
@@
-44,6
+48,11
@@
incoming = $tmp/incoming
run_dinstall = 0
END
run_dinstall = 0
END
+t-git-next-date () {
+ GIT_COMMITTER_DATE="$(( ${GIT_COMMITTER_DATE%% *} + 1 )) ${GIT_COMMITTER_DATE#* }"
+ GIT_AUTHOR_DATE="$GIT_COMMITTER_DATE"
+}
+
t-expect-fail () {
local mpat="$1"; shift
t-expect-fail () {
local mpat="$1"; shift
@@
-567,14
+576,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 () {
@@
-590,6
+605,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%/*}