diff --git a/kokoro/linux/bazel_distcheck/build.sh b/kokoro/linux/bazel_distcheck/build.sh deleted file mode 100755 index a50b175db2..0000000000 --- a/kokoro/linux/bazel_distcheck/build.sh +++ /dev/null @@ -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[@]}" diff --git a/kokoro/linux/bazel_distcheck/common.cfg b/kokoro/linux/bazel_distcheck/common.cfg deleted file mode 100644 index 6b1848816d..0000000000 --- a/kokoro/linux/bazel_distcheck/common.cfg +++ /dev/null @@ -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 -} diff --git a/kokoro/linux/bazel_distcheck/continuous.cfg b/kokoro/linux/bazel_distcheck/continuous.cfg deleted file mode 100644 index 4ea8b21006..0000000000 --- a/kokoro/linux/bazel_distcheck/continuous.cfg +++ /dev/null @@ -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 diff --git a/kokoro/linux/bazel_distcheck/presubmit.cfg b/kokoro/linux/bazel_distcheck/presubmit.cfg deleted file mode 100644 index 4ea8b21006..0000000000 --- a/kokoro/linux/bazel_distcheck/presubmit.cfg +++ /dev/null @@ -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 diff --git a/kokoro/linux/cmake_distcheck/build.sh b/kokoro/linux/cmake_distcheck/build.sh deleted file mode 100755 index 116e40b86d..0000000000 --- a/kokoro/linux/cmake_distcheck/build.sh +++ /dev/null @@ -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" diff --git a/kokoro/linux/cmake_distcheck/continuous.cfg b/kokoro/linux/cmake_distcheck/continuous.cfg deleted file mode 100644 index 6ef4c890b4..0000000000 --- a/kokoro/linux/cmake_distcheck/continuous.cfg +++ /dev/null @@ -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 diff --git a/kokoro/linux/cmake_distcheck/presubmit.cfg b/kokoro/linux/cmake_distcheck/presubmit.cfg deleted file mode 100644 index 6ef4c890b4..0000000000 --- a/kokoro/linux/cmake_distcheck/presubmit.cfg +++ /dev/null @@ -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 diff --git a/kokoro/linux/cpp_distcheck/build.sh b/kokoro/linux/cpp_distcheck/build.sh deleted file mode 100755 index a28843e9cb..0000000000 --- a/kokoro/linux/cpp_distcheck/build.sh +++ /dev/null @@ -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 diff --git a/kokoro/linux/cpp_distcheck/continuous.cfg b/kokoro/linux/cpp_distcheck/continuous.cfg deleted file mode 100644 index 4289f6a715..0000000000 --- a/kokoro/linux/cpp_distcheck/continuous.cfg +++ /dev/null @@ -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 diff --git a/kokoro/linux/cpp_distcheck/presubmit.cfg b/kokoro/linux/cpp_distcheck/presubmit.cfg deleted file mode 100644 index 4289f6a715..0000000000 --- a/kokoro/linux/cpp_distcheck/presubmit.cfg +++ /dev/null @@ -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 diff --git a/kokoro/linux/dist_install/build.sh b/kokoro/linux/dist_install/build.sh deleted file mode 100755 index c456ee81fa..0000000000 --- a/kokoro/linux/dist_install/build.sh +++ /dev/null @@ -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 diff --git a/kokoro/linux/dist_install/continuous.cfg b/kokoro/linux/dist_install/continuous.cfg deleted file mode 100644 index b1e0b2013d..0000000000 --- a/kokoro/linux/dist_install/continuous.cfg +++ /dev/null @@ -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 diff --git a/kokoro/linux/dist_install/presubmit.cfg b/kokoro/linux/dist_install/presubmit.cfg deleted file mode 100644 index b1e0b2013d..0000000000 --- a/kokoro/linux/dist_install/presubmit.cfg +++ /dev/null @@ -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 diff --git a/kokoro/macos/cpp_distcheck/build.sh b/kokoro/macos/cpp_distcheck/build.sh deleted file mode 100755 index d729b63db1..0000000000 --- a/kokoro/macos/cpp_distcheck/build.sh +++ /dev/null @@ -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 diff --git a/kokoro/macos/cpp_distcheck/continuous.cfg b/kokoro/macos/cpp_distcheck/continuous.cfg deleted file mode 100644 index 89441bcca0..0000000000 --- a/kokoro/macos/cpp_distcheck/continuous.cfg +++ /dev/null @@ -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 diff --git a/kokoro/macos/cpp_distcheck/presubmit.cfg b/kokoro/macos/cpp_distcheck/presubmit.cfg deleted file mode 100644 index 89441bcca0..0000000000 --- a/kokoro/macos/cpp_distcheck/presubmit.cfg +++ /dev/null @@ -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 diff --git a/tests.sh b/tests.sh index ecd7e12a12..6508674031 100755 --- a/tests.sh +++ b/tests.sh @@ -45,44 +45,6 @@ build_cpp_tcmalloc() { PPROF_PATH=/usr/bin/google-pprof HEAPCHECK=strict ./protobuf-test } -build_cpp_distcheck() { - grep -q -- "-Og" src/Makefile.am && - echo "The -Og flag is incompatible with Clang versions older than 4.0." && - exit 1 - - # Initialize any submodules. - git submodule update --init --recursive - ./autogen.sh - ./configure - make dist - - # List all files that should be included in the distribution package. - git ls-files | grep "^\(java\|python\|objectivec\|csharp\|ruby\|php\|cmake\|examples\|src/google/protobuf/.*\.proto\)" |\ - grep -v ".gitignore" | grep -v "java/lite/proguard.pgcfg" |\ - grep -v "python/compatibility_tests" | grep -v "python/docs" | grep -v "python/.repo-metadata.json" |\ - grep -v "python/protobuf_distutils" | grep -v "csharp/compatibility_tests" > dist.lst - # Unzip the dist tar file. - DIST=`ls *.tar.gz` - tar -xf $DIST - cd ${DIST//.tar.gz} - # Check if every file exists in the dist tar file. - FILES_MISSING="" - for FILE in $(<../dist.lst); do - [ -f "$FILE" ] || { - echo "$FILE is not found!" - FILES_MISSING="$FILE $FILES_MISSING" - } - done - cd .. - if [ ! -z "$FILES_MISSING" ]; then - echo "Missing files in EXTRA_DIST: $FILES_MISSING" - exit 1 - fi - - # Do the regular dist-check for C++. - make distcheck -j$(nproc) -} - build_dist_install() { # Create a symlink pointing to python2 and put it at the beginning of $PATH. # This is necessary because the googletest build system involves a Python @@ -539,7 +501,6 @@ build_benchmark() { if [ "$#" -ne 1 ]; then echo " Usage: $0 { cpp | - cpp_distcheck | csharp | java_jdk7 | java_oracle7 |