-
Notifications
You must be signed in to change notification settings - Fork 322
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add script for triggering end-to-end tests from a local machine
This change adds a script `tests/local.sh` that can be used to trigger the end to end tests from a development machine on a remote ec2 instance. Signed-off-by: Evan Lezar <[email protected]>
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 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
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,32 @@ | ||
#! /bin/bash | ||
|
||
: ${TEST_CASE:="./tests/cases/defaults.sh"} | ||
if [[ $# -ge 1 ]]; then | ||
TEST_CASE=${1} | ||
test -n "${TEST_CASE}" | ||
fi | ||
test -f ${PROJECT_DIR}/${TEST_CASE} | ||
|
||
export PROJECT="gpu-operator" | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/scripts && pwd )" | ||
source ${SCRIPT_DIR}/.definitions.sh | ||
|
||
if [[ -n "$CLEANUP" ]]; then | ||
echo "Running cleanup" | ||
${SCRIPT_DIR}/sync.sh | ||
remote ./tests/scripts/uninstall.sh | ||
exit 0 | ||
fi | ||
|
||
# Launch a remote instance | ||
${SCRIPT_DIR}/launch.sh | ||
|
||
# Sync the project folder to the remote | ||
${SCRIPT_DIR}/sync.sh | ||
|
||
# We trigger the installation of prerequisites on the remote instance | ||
remote ./tests/scripts/prerequisites.sh | ||
|
||
# We trigger the specified test case on the remote instance | ||
remote ${TEST_CASE} |