Skip to content

Commit

Permalink
Test examples in kokoro/gcp_ubuntu/bazel/run_tests.sh
Browse files Browse the repository at this point in the history
Remove the unused test script

PiperOrigin-RevId: 585602443
Change-Id: Ic1fb002d15b7ee76dcdcb63dc83757b553918e13
  • Loading branch information
morambro authored and copybara-github committed Nov 27, 2023
1 parent 78c2bf8 commit 4acf845
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 88 deletions.
29 changes: 22 additions & 7 deletions kokoro/gcp_ubuntu/bazel/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,23 +59,38 @@ readonly GITHUB_ORG="https://github.com/tink-crypto"
"${GITHUB_ORG}/tink-cc"

./kokoro/testutils/copy_credentials.sh "testdata" "gcp"

MANUAL_TARGETS=()
if [[ "${IS_KOKORO}" == "true" ]]; then
MANUAL_TARGETS+=("//tink/integration/gcpkms:gcp_kms_aead_integration_test")
fi
readonly MANUAL_TARGETS
./kokoro/testutils/copy_credentials.sh "examples/testdata" "gcp"

cp "WORKSPACE" "WORKSPACE.bak"
./kokoro/testutils/replace_http_archive_with_local_repository.py \
-f "WORKSPACE" -t ..

cp "examples/WORKSPACE" "examples/WORKSPACE.bak"
./kokoro/testutils/replace_http_archive_with_local_repository.py \
-f "examples/WORKSPACE" -t ../..

trap cleanup EXIT

cleanup() {
# Restore the original WORKSPACE on exit (moslty useful for local testing).
mv "WORKSPACE.bak" "WORKSPACE"
mv "examples/WORKSPACE.bak" "examples/WORKSPACE"
}

MANUAL_TARGETS=()
if [[ "${IS_KOKORO}" == "true" ]]; then
MANUAL_TARGETS+=("//tink/integration/gcpkms:gcp_kms_aead_integration_test")
fi
readonly MANUAL_TARGETS

./kokoro/testutils/run_command.sh "${RUN_COMMAND_ARGS[@]}" \
./kokoro/testutils/run_bazel_tests.sh . "${MANUAL_TARGETS[@]}"

# Test examples.
EXAMPLES_MANUAL_TARGETS=()
if [[ "${IS_KOKORO}" == "true" ]]; then
EXAMPLES_MANUAL_TARGETS+=( "//envelopeaead:envelopeaead_cli_test" )
fi
readonly EXAMPLES_MANUAL_TARGETS

./kokoro/testutils/run_command.sh "${RUN_COMMAND_ARGS[@]}" \
./kokoro/testutils/run_bazel_tests.sh examples "${EXAMPLES_MANUAL_TARGETS[@]}"
81 changes: 0 additions & 81 deletions kokoro/gcp_ubuntu/examples/bazel/run_tests.sh

This file was deleted.

0 comments on commit 4acf845

Please sign in to comment.