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

[CI] Allow sourcing test manager script #1964

Merged
merged 2 commits into from
Feb 19, 2025
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
14 changes: 12 additions & 2 deletions scripts/ci/run-test-local-env-manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ function main {
create_isolated_dir
copy_to_isolated
set_instance_env
k8s_auth
run_test
log INFO "Exit status is ${EXIT_STATUS}"
exit "${EXIT_STATUS}"
Expand Down Expand Up @@ -145,7 +146,7 @@ function set_instance_env {
fi;
}

function run_test {
function k8s_auth {
# RUN_IN_CONTAINER is env var that is set in the dockerfile
if [[ -v RUN_IN_CONTAINER ]]; then
if [[ -v GHA_CLUSTER_SERVER_ADDR ]]; then
Expand All @@ -158,6 +159,9 @@ function run_test {
gcloud container clusters get-credentials parity-zombienet --zone europe-west3-b --project parity-zombienet
fi;
fi
}

function run_test {
cd "${OUTPUT_DIR}"
set -x
set +e
Expand Down Expand Up @@ -203,4 +207,10 @@ function log {
fi
}

main "$@"
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
log INFO "Running main"
main "$@"
else
log WARN "Script is being sourcing"
fi

Loading