forked from openshift-kni/performance-addon-operators
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request openshift-kni#10 from fedepaol/external_tests
Consume the performance operator tier 1 tests
- Loading branch information
Showing
3 changed files
with
82 additions
and
1 deletion.
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,40 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ "$TESTS_REPO" == "" ]; then | ||
echo "[ERROR]: No TESTS_REPO provided" | ||
exit 1 | ||
fi | ||
|
||
if [ "$TESTS_LOCATION" == "" ]; then | ||
echo "[ERROR]: No TESTS_LOCATION provided" | ||
exit 1 | ||
fi | ||
|
||
# detect latest master hash of the target repo if we're not pinned to a specific commit hash | ||
if [ -z "$TESTS_TARGET_HASH" ]; then | ||
echo "Using latest master branch commit for $TESTS_REPO" | ||
TESTS_TARGET_HASH=$(git ls-remote "$TESTS_REPO" | grep refs/heads/master | cut -f 1) | ||
fi | ||
|
||
echo "$TESTS_REPO commit hash: $TESTS_TARGET_HASH" | ||
|
||
if ! [ -d "$TESTS_LOCATION" ]; then | ||
DOWNLOAD_SRC=true | ||
elif ! [ "$(cat "$TESTS_LOCATION"/git-hash)" = "$TESTS_TARGET_HASH" ]; then | ||
rm -rf TESTS_LOCATION | ||
DOWNLOAD_SRC=true | ||
fi | ||
|
||
if [ $DOWNLOAD_SRC ]; then | ||
echo "Cloning code from $TESTS_REPO using hash $TESTS_TARGET_HASH" | ||
# shellcheck disable=SC2086 | ||
repo_name=$(basename $TESTS_REPO) | ||
curl -L "$TESTS_REPO"/archive/"$TESTS_TARGET_HASH"/"$repo_name".tar.gz | tar xz "$repo_name"-"$TESTS_TARGET_HASH" | ||
mv "$repo_name"-"$TESTS_TARGET_HASH" "$TESTS_LOCATION" | ||
else | ||
echo "Using cached $TESTS_LOCATION" | ||
fi | ||
|
||
echo "$TESTS_TARGET_HASH" > "$TESTS_LOCATION"/git-hash | ||
|
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,8 @@ | ||
#!/bin/bash | ||
|
||
export TESTS_REPO=https://github.com/openshift-kni/performance-addon-operators | ||
export TESTS_LOCATION=/tmp/performance-operators | ||
|
||
external-tests/clone_repo.sh | ||
cd $TESTS_LOCATION | ||
ROLE_WORKER_RT=worker-cnf PERF_TEST_PROFILE=performance make functests-only |
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