From 44b3c03412236b9fef9b69ba782a828255b778fc Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Wed, 7 Dec 2022 15:46:46 +0100 Subject: [PATCH] ensure workdir is set on tests --- tests-ng/helpers | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests-ng/helpers b/tests-ng/helpers index f51d832..2876dfd 100644 --- a/tests-ng/helpers +++ b/tests-ng/helpers @@ -101,3 +101,12 @@ if [[ $OSTYPE == 'darwin'* ]]; then export -f readlink export -f realpath fi + +# workdir tricks +# when tests are called without using the +# top level tests.sh script which sets the workdir +if [ -z "${DOTDROP_WORKDIR}" ]; then + _workdir="/tmp/dotdrop-test-workdir" + export DOTDROP_WORKDIR="${_workdir}" + clear_on_exit "${_workdir}" +fi \ No newline at end of file