From b9d25ca068748b6f53377900207bf292472ed3bf Mon Sep 17 00:00:00 2001 From: ckl Date: Tue, 9 Aug 2022 01:29:29 -0700 Subject: [PATCH] Tag tools KMS integration tests as manual and update Kokoro accordingly. PiperOrigin-RevId: 466282043 --- .../gcp_ubuntu_per_language/tools/run_tests.sh | 5 +++++ kokoro/macos_external/tools/run_tests.sh | 5 +++++ kokoro/run_tests.sh | 17 ++++++++++++++++- tools/testing/cc/BUILD.bazel | 12 ++++++++++-- .../com/google/crypto/tink/tinkey/BUILD.bazel | 15 +++++++++++++++ 5 files changed, 51 insertions(+), 3 deletions(-) diff --git a/kokoro/gcp_ubuntu_per_language/tools/run_tests.sh b/kokoro/gcp_ubuntu_per_language/tools/run_tests.sh index 39d97dc283..043fae74ab 100644 --- a/kokoro/gcp_ubuntu_per_language/tools/run_tests.sh +++ b/kokoro/gcp_ubuntu_per_language/tools/run_tests.sh @@ -36,8 +36,13 @@ time bazel test --test_output=errors -- ... if [[ -n "${KOKORO_ROOT}" ]]; then declare -a MANUAL_TARGETS MANUAL_TARGETS=( + "//testing/cc:aws_kms_aead_test" "//testing/cc:gcp_kms_aead_test" "//testing/cross_language:aead_envelope_test" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:AddKeyCommandTest" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:CreateKeysetCommandTest" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:CreatePublicKeysetCommandTest" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:RotateKeysetCommandTest" ) readonly MANUAL_TARGETS time bazel test --test_output=errors -- "${MANUAL_TARGETS[@]}" diff --git a/kokoro/macos_external/tools/run_tests.sh b/kokoro/macos_external/tools/run_tests.sh index ab5341358c..a9f0fab0a9 100644 --- a/kokoro/macos_external/tools/run_tests.sh +++ b/kokoro/macos_external/tools/run_tests.sh @@ -53,8 +53,13 @@ time bazel test "${TEST_FLAGS[@]}" -- ... if [[ -n "${KOKORO_ROOT}" ]]; then declare -a MANUAL_TARGETS MANUAL_TARGETS=( + "//testing/cc:aws_kms_aead_test" "//testing/cc:gcp_kms_aead_test" "//testing/cross_language:aead_envelope_test" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:AddKeyCommandTest" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:CreateKeysetCommandTest" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:CreatePublicKeysetCommandTest" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:RotateKeysetCommandTest" ) readonly MANUAL_TARGETS time bazel test "${TEST_FLAGS[@]}" -- "${MANUAL_TARGETS[@]}" diff --git a/kokoro/run_tests.sh b/kokoro/run_tests.sh index b6754815b2..96ec3dcbc4 100755 --- a/kokoro/run_tests.sh +++ b/kokoro/run_tests.sh @@ -84,7 +84,22 @@ run_all_linux_tests() { run_linux_tests "go" run_linux_tests "python" - run_linux_tests "tools" + + local -a MANUAL_TOOLS_TARGETS + if [[ -n "{KOKORO_ROOT}" ]]; then + MANUAL_TOOLS_TARGETS+=( + "//testing/cc:aws_kms_aead_test" + "//testing/cc:gcp_kms_aead_test" + "//testing/cross_language:aead_envelope_test" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:AddKeyCommandTest" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:CreateKeysetCommandTest" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:CreatePublicKeysetCommandTest" + "//tinkey/src/test/java/com/google/crypto/tink/tinkey:RotateKeysetCommandTest" + ) + fi + readonly MANUAL_TOOLS_TARGETS + run_linux_tests "tools" "${MANUAL_TOOLS_TARGETS[@]}" + run_linux_tests "apps" fi diff --git a/tools/testing/cc/BUILD.bazel b/tools/testing/cc/BUILD.bazel index becb4745a2..ec071c0297 100644 --- a/tools/testing/cc/BUILD.bazel +++ b/tools/testing/cc/BUILD.bazel @@ -74,7 +74,11 @@ sh_test( "//testdata/aws:credentials", "//testing/cross_language:test_lib", ], - tags = ["no_rbe"], + tags = [ + "manual", + "no_rbe", + "requires-network", + ], ) sh_test( @@ -90,5 +94,9 @@ sh_test( "//testing/cross_language:test_lib", "@google_root_pem//file", ], - tags = ["manual"], + tags = [ + "manual", + "no_rbe", + "requires-network", + ], ) diff --git a/tools/tinkey/src/test/java/com/google/crypto/tink/tinkey/BUILD.bazel b/tools/tinkey/src/test/java/com/google/crypto/tink/tinkey/BUILD.bazel index f5c3bba4a8..f01b39117f 100644 --- a/tools/tinkey/src/test/java/com/google/crypto/tink/tinkey/BUILD.bazel +++ b/tools/tinkey/src/test/java/com/google/crypto/tink/tinkey/BUILD.bazel @@ -32,6 +32,11 @@ java_test( size = "small", srcs = ["CreateKeysetCommandTest.java"], data = ["//testdata/gcp:credentials"], + tags = [ + "manual", + "no_rbe", + "requires-network", + ], deps = [ "//tinkey/src/main/java/com/google/crypto/tink/tinkey:create_keyset_command", "//tinkey/src/main/java/com/google/crypto/tink/tinkey:tinkey_util", @@ -50,6 +55,11 @@ java_test( size = "small", srcs = ["AddKeyCommandTest.java"], data = ["//testdata/gcp:credentials"], + tags = [ + "manual", + "no_rbe", + "requires-network", + ], deps = [ "//tinkey/src/main/java/com/google/crypto/tink/tinkey:add_key_command", "//tinkey/src/main/java/com/google/crypto/tink/tinkey:tinkey_util", @@ -69,6 +79,11 @@ java_test( size = "small", srcs = ["RotateKeysetCommandTest.java"], data = ["//testdata/gcp:credentials"], + tags = [ + "manual", + "no_rbe", + "requires-network", + ], deps = [ "//tinkey/src/main/java/com/google/crypto/tink/tinkey:rotate_keyset_command", "//tinkey/src/main/java/com/google/crypto/tink/tinkey:tinkey_util",