Remove distcheck and dist_install Kokoro tests (#10326 )
These tests verify that various things can be built/installed/tested using our published distribution archives, but starting with 22.0 we will no longer be publishing those.pull/10332/head
parent
1122a02024
commit
c10963c571
17 changed files with 0 additions and 270 deletions
@ -1,61 +0,0 @@ |
||||
#!/bin/bash |
||||
# |
||||
# Build file to set up and run tests using bazel-build dist archive |
||||
# |
||||
# Note that the builds use WORKSPACE to fetch external sources, not |
||||
# git submodules. |
||||
|
||||
set -eu |
||||
|
||||
use_bazel.sh 5.0.0 || true |
||||
bazel version |
||||
|
||||
# Change to repo root |
||||
cd $(dirname $0)/../../.. |
||||
|
||||
# Get kokoro scripts from repo root by default. |
||||
: ${SCRIPT_ROOT:=$(pwd)} |
||||
source ${SCRIPT_ROOT}/kokoro/common/pyenv.sh |
||||
|
||||
# Build distribution archive |
||||
echo "============================================================" |
||||
echo -e "[[ $(date) ]] Building distribution archive...\n" |
||||
${SCRIPT_ROOT}/kokoro/common/bazel_wrapper.sh build //pkg:dist_all_tar |
||||
DIST_ARCHIVE=$(readlink $(bazel info bazel-bin)/pkg/dist_all_tar.tar.gz) |
||||
bazel shutdown |
||||
|
||||
# Extract the dist archive. |
||||
echo "============================================================" |
||||
echo -e "[[ $(date) ]] Extracting distribution archive...\n" |
||||
|
||||
# Construct temp directory for running the dist build. |
||||
# If you want to run locally and keep the build dir, create a directory |
||||
# and pass it in the DIST_WORK_ROOT env var. |
||||
if [[ -z ${DIST_WORK_ROOT:-} ]]; then |
||||
: ${DIST_WORK_ROOT:=$(mktemp -d)} |
||||
function dist_cleanup() { |
||||
(( $BASH_SUBSHELL == 0 )) && rm -rf ${DIST_WORK_ROOT} |
||||
} |
||||
trap dist_cleanup EXIT |
||||
fi |
||||
|
||||
DIST_WORKSPACE=${DIST_WORK_ROOT}/protobuf |
||||
mkdir -p ${DIST_WORKSPACE} |
||||
tar -C ${DIST_WORKSPACE} --strip-components=1 -axf bazel-bin/pkg/dist_all_tar.tar.gz |
||||
|
||||
echo "============================================================" |
||||
echo -e "[[ $(date) ]] Building extracted archive...\n" |
||||
|
||||
cd ${DIST_WORKSPACE} |
||||
|
||||
bazel_args=( |
||||
test |
||||
--keep_going |
||||
--test_output=errors |
||||
-- |
||||
//... |
||||
-//objectivec/... # only works on macOS |
||||
-//csharp/... # release builds require external dependencies |
||||
@com_google_protobuf_examples//... |
||||
) |
||||
${SCRIPT_ROOT}/kokoro/common/bazel_wrapper.sh "${bazel_args[@]}" |
@ -1,9 +0,0 @@ |
||||
# Common config shared by presubmit and continuous. |
||||
|
||||
bazel_setting: { |
||||
project_id: "protobuf-build" |
||||
bes_backend_address: "buildeventservice.googleapis.com" |
||||
foundry_backend_address: "remotebuildexecution.googleapis.com" |
||||
upsalite_frontend_address: "https://source.cloud.google.com" |
||||
local_execution: true |
||||
} |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/linux/bazel_distcheck/build.sh" |
||||
timeout_mins: 15 |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/linux/bazel_distcheck/build.sh" |
||||
timeout_mins: 15 |
@ -1,60 +0,0 @@ |
||||
#!/bin/bash |
||||
# |
||||
# Build file to set up and run tests based on distribution archive |
||||
|
||||
set -eux |
||||
|
||||
# Change to repo root |
||||
cd $(dirname $0)/../../.. |
||||
|
||||
# |
||||
# Update git submodules |
||||
# |
||||
git submodule update --init --recursive |
||||
|
||||
# |
||||
# Build distribution archive |
||||
# |
||||
# TODO: this should use Bazel-built dist archives. |
||||
date ; ./autogen.sh |
||||
date ; ./configure |
||||
date ; make dist |
||||
date |
||||
|
||||
DIST_ARCHIVE=( $(ls protobuf-*.tar.gz) ) |
||||
if (( ${#DIST_ARCHIVE[@]} != 1 )); then |
||||
echo >&2 "Distribution archive not found. ${#DIST_ARCHIVE[@]} matches:" |
||||
echo >&2 "${DIST_ARCHIVE[@]}" |
||||
exit 1 |
||||
fi |
||||
|
||||
# |
||||
# Check for all expected files |
||||
# |
||||
kokoro/common/check_missing_dist_files.sh ${DIST_ARCHIVE} |
||||
|
||||
# |
||||
# Extract to a temporary directory |
||||
# |
||||
if [[ -z ${DIST_WORK_ROOT:-} ]]; then |
||||
# If you want to preserve the extracted sources, set the DIST_WORK_ROOT |
||||
# environment variable to an existing directory that should be used. |
||||
DIST_WORK_ROOT=$(mktemp -d) |
||||
function cleanup_work_root() { |
||||
echo "Cleaning up temporary directory ${DIST_WORK_ROOT}..." |
||||
rm -rf ${DIST_WORK_ROOT} |
||||
} |
||||
trap cleanup_work_root EXIT |
||||
fi |
||||
|
||||
tar -C ${DIST_WORK_ROOT} --strip-components=1 -axf ${DIST_ARCHIVE} |
||||
|
||||
# |
||||
# Run tests using extracted sources |
||||
# |
||||
SOURCE_DIR=${DIST_WORK_ROOT} \ |
||||
CMAKE_GENERATOR=Ninja \ |
||||
CTEST_PARALLEL_LEVEL=$(nproc) \ |
||||
kokoro/common/cmake.sh |
||||
|
||||
echo "PASS" |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/linux/cmake_distcheck/build.sh" |
||||
timeout_mins: 1440 |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/linux/cmake_distcheck/build.sh" |
||||
timeout_mins: 1440 |
@ -1,25 +0,0 @@ |
||||
#!/bin/bash |
||||
# |
||||
# Build file to set up and run tests |
||||
|
||||
set -ex # exit immediately on error |
||||
|
||||
# Change to repo root |
||||
cd $(dirname $0)/../../.. |
||||
|
||||
./tests.sh cpp_distcheck |
||||
|
||||
# Run tests under release docker image. |
||||
DOCKER_IMAGE_NAME=protobuf/protoc_$(sha1sum protoc-artifacts/Dockerfile | cut -f1 -d " ") |
||||
until docker pull $DOCKER_IMAGE_NAME; do sleep 10; done |
||||
|
||||
docker run -v $(pwd):/var/local/protobuf --rm $DOCKER_IMAGE_NAME \ |
||||
bash -l /var/local/protobuf/tests.sh cpp || FAILED="true" |
||||
|
||||
# This directory is owned by root. We need to delete it, because otherwise |
||||
# Kokoro will attempt to rsync it and fail with a permission error. |
||||
rm -rf src/core |
||||
|
||||
if [ "$FAILED" = "true" ]; then |
||||
exit 1 |
||||
fi |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/linux/cpp_distcheck/build.sh" |
||||
timeout_mins: 1440 |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/linux/cpp_distcheck/build.sh" |
||||
timeout_mins: 1440 |
@ -1,15 +0,0 @@ |
||||
#!/bin/bash |
||||
# |
||||
# Build file to set up and run tests |
||||
|
||||
set -ex # exit immediately on error |
||||
|
||||
# Change to repo root |
||||
cd $(dirname $0)/../../.. |
||||
|
||||
export DOCKERHUB_ORGANIZATION=protobuftesting |
||||
export DOCKERFILE_DIR=kokoro/linux/dockerfile/test/java_stretch |
||||
export DOCKER_RUN_SCRIPT=kokoro/linux/pull_request_in_docker.sh |
||||
export OUTPUT_DIR=testoutput |
||||
export TEST_SET="dist_install" |
||||
./kokoro/linux/build_and_run_docker.sh |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/linux/dist_install/build.sh" |
||||
timeout_mins: 1440 |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/linux/dist_install/build.sh" |
||||
timeout_mins: 1440 |
@ -1,11 +0,0 @@ |
||||
#!/bin/bash |
||||
# |
||||
# Build file to set up and run tests |
||||
|
||||
# Change to repo root |
||||
cd $(dirname $0)/../../.. |
||||
|
||||
# Prepare worker environment to run tests |
||||
source kokoro/macos/prepare_build_macos_rc |
||||
|
||||
./tests.sh cpp_distcheck |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/macos/cpp_distcheck/build.sh" |
||||
timeout_mins: 1440 |
@ -1,5 +0,0 @@ |
||||
# Config file for running tests in Kokoro |
||||
|
||||
# Location of the build script in repository |
||||
build_file: "protobuf/kokoro/macos/cpp_distcheck/build.sh" |
||||
timeout_mins: 1440 |
Loading…
Reference in new issue