Skip to content
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

feat(integ): add ability to use hook function before each component test #155

Merged
merged 1 commit into from
Oct 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions integ/scripts/bash/rfdk-integ-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ export INFRASTRUCTURE_DEPLOY_FINISH_TIME=$SECONDS
for COMPONENT in **/cdk.json; do
COMPONENT_ROOT="$(dirname "$COMPONENT")"
COMPONENT_NAME=$(basename "$COMPONENT_ROOT")
# Invoke hook function if it is exported and name is defined in PRE_COMPONENT_HOOK variable
if [ -n "$PRE_COMPONENT_HOOK" ] && [ "$(type -t $PRE_COMPONENT_HOOK)" == "function" ]
then
$PRE_COMPONENT_HOOK $COMPONENT_NAME
fi

# Use a pattern match to exclude the infrastructure app from the results
export ${COMPONENT_NAME}_START_TIME=$SECONDS
if [[ "$COMPONENT_NAME" != _* ]]; then
Expand Down