From 74291161169b69019d466b8714fa9c183f6ac8e0 Mon Sep 17 00:00:00 2001 From: AndroidX Test Team Date: Mon, 30 Oct 2023 15:03:21 -0700 Subject: [PATCH] Add second kokoro config that runs tests PiperOrigin-RevId: 577967689 --- .../release.cfg => axt_build_artifacts.cfg} | 2 +- kokoro/axt_test_artifacts.cfg | 1 + .../kokoro_build.sh => build_artifacts.sh} | 0 kokoro/{gcp_ubuntu_docker => }/common.sh | 0 kokoro/test_artifacts.sh | 24 +++++++++++++++++++ 5 files changed, 26 insertions(+), 1 deletion(-) rename kokoro/{gcp_ubuntu_docker/release.cfg => axt_build_artifacts.cfg} (70%) create mode 100644 kokoro/axt_test_artifacts.cfg rename kokoro/{gcp_ubuntu_docker/kokoro_build.sh => build_artifacts.sh} (100%) rename kokoro/{gcp_ubuntu_docker => }/common.sh (100%) create mode 100644 kokoro/test_artifacts.sh diff --git a/kokoro/gcp_ubuntu_docker/release.cfg b/kokoro/axt_build_artifacts.cfg similarity index 70% rename from kokoro/gcp_ubuntu_docker/release.cfg rename to kokoro/axt_build_artifacts.cfg index 2b553d889..9e3e82747 100644 --- a/kokoro/gcp_ubuntu_docker/release.cfg +++ b/kokoro/axt_build_artifacts.cfg @@ -1,4 +1,4 @@ -build_file: "android-test-releases/kokoro/gcp_ubuntu_docker/kokoro_build.sh" +build_file: "android-test-releases/kokoro/build_artifacts.sh" action { define_artifacts { diff --git a/kokoro/axt_test_artifacts.cfg b/kokoro/axt_test_artifacts.cfg new file mode 100644 index 000000000..cb5969120 --- /dev/null +++ b/kokoro/axt_test_artifacts.cfg @@ -0,0 +1 @@ +build_file: "android-test-releases/kokoro/test_artifacts.sh" diff --git a/kokoro/gcp_ubuntu_docker/kokoro_build.sh b/kokoro/build_artifacts.sh similarity index 100% rename from kokoro/gcp_ubuntu_docker/kokoro_build.sh rename to kokoro/build_artifacts.sh diff --git a/kokoro/gcp_ubuntu_docker/common.sh b/kokoro/common.sh similarity index 100% rename from kokoro/gcp_ubuntu_docker/common.sh rename to kokoro/common.sh diff --git a/kokoro/test_artifacts.sh b/kokoro/test_artifacts.sh new file mode 100644 index 000000000..b28593a24 --- /dev/null +++ b/kokoro/test_artifacts.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +# Fail on any error. +set -e + +# move to where kokoro put the repository root +cd "${KOKORO_ARTIFACTS_DIR}/github/android-test-releases" + +unzip "${KOKORO_GFILE_DIR}/axt_m2repository.zip" -d "/root/.m2" + +# copybara:strip_begin +# LINT.IfChange +# copybara:strip_end +curl -s https://repos.azul.com/azul-repo.key | sudo gpg --dearmor -o /usr/share/keyrings/azul.gpg +echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" | sudo tee /etc/apt/sources.list.d/zulu.list +apt-get update +apt-get install -y zulu17-jdk +export JAVA_HOME="$(update-java-alternatives -l | grep "1.17" | head -n 1 | tr -s " " | cut -d " " -f 3)" + +cd gradle-tests +./gradlew nexusOneApi30DebugAndroidTest -Pandroid.testoptions.manageddevices.emulator.gpu=swiftshader_indirect -Dandroid.experimental.androidTest.numManagedDeviceShards=1 +# copybara:strip_begin +# LINT.ThenChange(//depot/google3/third_party/android/androidx_test/.github/workflows/ci.yml) +# copybara:strip_end