Makefile: zfs-tests lives in srcdir; zfs-tests: accept common.sh path

This fixes out-of-tree builds

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13316
This commit is contained in:
наб 2022-04-06 00:15:45 +02:00 committed by Brian Behlendorf
parent ecaccf764a
commit 5fc332ae4b
2 changed files with 3 additions and 9 deletions

View File

@ -75,8 +75,7 @@ distclean-local::
-type f -delete
all-local:
-[ -x ${top_builddir}/scripts/zfs-tests.sh ] && \
${top_builddir}/scripts/zfs-tests.sh -c
-SCRIPT_COMMON=$(top_builddir)/scripts/common.sh $(top_srcdir)/scripts/zfs-tests.sh -c
dist-hook:
$(AM_V_GEN)$(top_srcdir)/scripts/make_gitrev.sh -D $(distdir) $(GITREV)

View File

@ -26,13 +26,8 @@
# Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
#
BASE_DIR=$(dirname "$0")
SCRIPT_COMMON=common.sh
if [ -f "${BASE_DIR}/${SCRIPT_COMMON}" ]; then
. "${BASE_DIR}/${SCRIPT_COMMON}"
else
echo "Missing helper script ${SCRIPT_COMMON}" && exit 1
fi
SCRIPT_COMMON=${SCRIPT_COMMON:-${0%/*}/common.sh}
. "${SCRIPT_COMMON}" || exit
PROG=zfs-tests.sh
VERBOSE="no"