Last active
September 4, 2015 12:23
-
-
Save chriscool/94ef32392f6c2a4bd7d7 to your computer and use it in GitHub Desktop.
Alternative code to allow sharness extensions in srcdir/sharness.d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Load any extensions in $srcdir/sharness.d/*.sh | |
# | |
if test -d "${SHARNESS_TEST_SRCDIR}/sharness.d" | |
then | |
for file in "${SHARNESS_TEST_SRCDIR}"/sharness.d/*.sh | |
do | |
# Ensure glob was not an empty match | |
test -e "${file}" || break | |
if test -n "$debug" | |
then | |
echo >&5 "sharness: loading extensions from ${file}" | |
fi | |
. "${file}" | |
if test $? != 0 | |
then | |
echo >&5 "sharness: Error loading ${file}. Aborting." | |
exit 1 | |
fi | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment