diff --git a/Makefile.am b/Makefile.am index acfd83becc..81b3e69eb8 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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) diff --git a/scripts/zfs-tests.sh b/scripts/zfs-tests.sh index e7d04110e3..df69325a1b 100755 --- a/scripts/zfs-tests.sh +++ b/scripts/zfs-tests.sh @@ -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"