-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(integ): restructure integration test framework (#427)
refactor(integ): restructure integration test framework - run `PRE_AWS_INTERACTION_HOOK` between each stack deploy/destroy - fix output redirection for parallel tests - unify parallel and sequential code paths - clean code organization - clean log output and organize file artifacts - update README.md with updated instructions
- Loading branch information
Showing
15 changed files
with
612 additions
and
151 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
cdk.output |
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
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
49 changes: 49 additions & 0 deletions
49
integ/components/deadline/common/scripts/bash/component_e2e_driver.sh
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# Handle errors manually | ||
set +e | ||
# Fail on unset variables | ||
set -u | ||
|
||
COMPONENT_ROOT="$1" | ||
COMPONENT_NAME=$(basename "$COMPONENT_ROOT") | ||
START_TIME=$SECONDS | ||
|
||
# Before changing directories, we determine the | ||
# asbolute path of INTEG_TEMP_DIR, since it is a relative | ||
# path | ||
export INTEG_TEMP_DIR=$(readlink -fm "${INTEG_TEMP_DIR}") | ||
|
||
cd "$INTEG_ROOT/$COMPONENT_ROOT" | ||
|
||
# Ensure the component's artifact subdir exists | ||
source "../common/scripts/bash/deploy-utils.sh" | ||
ensure_component_artifact_dir "${COMPONENT_NAME}" | ||
|
||
( | ||
set +e | ||
../common/scripts/bash/component_e2e.sh "$COMPONENT_NAME" | ||
exit_code=$? | ||
echo $exit_code > "${INTEG_TEMP_DIR}/${COMPONENT_NAME}/exitcode" | ||
exit $exit_code | ||
) | ||
test_exit_code=$? | ||
|
||
FINISH_TIME=$SECONDS | ||
cat > "${INTEG_TEMP_DIR}/${COMPONENT_NAME}/timings.sh" <<EOF | ||
${COMPONENT_NAME}_START_TIME=${START_TIME} | ||
${COMPONENT_NAME}_FINISH_TIME=${FINISH_TIME} | ||
EOF | ||
|
||
# Clean-up if test failed | ||
if [[ $test_exit_code -ne 0 ]] | ||
then | ||
# A failed cleanup should propagate to the calling process | ||
set -e | ||
../common/scripts/bash/component_e2e.sh "$COMPONENT_NAME" --destroy-only | ||
fi | ||
|
||
exit 0 |
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
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
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
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
Oops, something went wrong.