-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add plugin support. #941
Add plugin support. #941
Changes from 2 commits
e962cd0
0eac922
1904c9a
593c6dc
49da38d
a945257
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,18 @@ else | |
|
||
mkdir -p /sytest | ||
tar -C /sytest --strip-components=1 -xf sytest.tar.gz | ||
|
||
if [ -n "$PLUGIN" ]; then | ||
mkdir /sytest/plugins | ||
echo "--- Downloading plugins for sytest" | ||
IFS=':'; for plugin in $PLUGIN; do | ||
wget -q https://github.com/$plugin/archive/master.tar.gz -O plugin.tar.gz || { | ||
valkum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "Failed to download plugin: $plugin" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we write this (to stdout rather than stderr) and then carry on with mkdir and tar anyway? seems like we should exit instead? or just let There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for finding this. Yeah we should exit there with sending the msg to stderr. |
||
} | ||
mkdir -p /sytest/plugins/$plugin | ||
tar -C /sytest/plugins/$plugin --strip-components=1 -xf plugin.tar.gz | ||
done | ||
fi | ||
fi | ||
|
||
echo "--- Preparing sytest for ${SYTEST_TARGET}" | ||
|
@@ -51,6 +63,12 @@ elif [ -x "/sytest/docker/${SYTEST_TARGET}_sytest.sh" ]; then | |
exec "/sytest/docker/${SYTEST_TARGET}_sytest.sh" "$@" | ||
|
||
else | ||
echo "sytest runner script for ${SYTEST_TARGET} not found" >&2 | ||
exit 1 | ||
PLUGIN_RUNNER=$(find /sytest/plugins/ -type f -exec test -x {} \; -name "${SYTEST_TARGET}_sytest.sh" -print) | ||
valkum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if [ -n PLUGIN_RUNNER ]; then | ||
exec ${PLUGIN_RUNNER} "$@" | ||
|
||
else | ||
valkum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
echo "sytest runner script for ${SYTEST_TARGET} not found" >&2 | ||
exit 1 | ||
fi | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably be called
PLUGINS
, if it's going to support more than one plugin?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. I thought of the PATH var while writing it not sure why that is not called PATHS, but PLUGINS makes more sense. Will change that.