Skip to content

Commit

Permalink
Makefile: zfs-tests lives in srcdir; zfs-tests: accept common.sh path
Browse files Browse the repository at this point in the history
This fixes out-of-tree builds

Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#13316
  • Loading branch information
nabijaczleweli authored and behlendorf committed May 10, 2022
1 parent ecaccf7 commit 5fc332a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
3 changes: 1 addition & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 2 additions & 7 deletions scripts/zfs-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5fc332a

Please sign in to comment.