summaryrefslogtreecommitdiff
path: root/tests/lib-core
blob: f3881ca561c008c407ca24755cdc9facce646039 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#

fail () {
	echo >&2 "failed: $*"
	exit 1
}

t-set-intree () {
	if [ "x$DGIT_TEST_INTREE" = x ]; then return; fi
	: ${DGIT_TEST:=$DGIT_TEST_INTREE/dgit}
	: ${DGIT_REPOS_SERVER_TEST:=$DGIT_TEST_INTREE/infra/dgit-repos-server}
	: ${DGIT_SSH_DISPATCH_TEST:=$DGIT_TEST_INTREE/infra/dgit-ssh-dispatch}
	: ${DGIT_INFRA_PFX:=$DGIT_TEST_INTREE${DGIT_TEST_INTREE:+/infra/}}
	export DGIT_TEST DGIT_REPOS_SERVER_TEST DGIT_SSH_DISPATCH_TEST
	export PERLLIB="$DGIT_TEST_INTREE${PERLLIB:+:}${PERLLIB}"
}

t-set-using-tmp () {
	export HOME=$tmp
	export DGIT_TEST_DUMMY_DIR=$tmp
	export DGIT_TEST_TMP=$tmp
	export GNUPGHOME=$tmp/gnupg
}