Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop running JVM tests written in Java/Scala #10175

Merged
merged 4 commits into from
Jun 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
121 changes: 0 additions & 121 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1057,127 +1057,6 @@ jobs:
script:
- MODE=debug ./build-support/bin/ci.py --sanity-checks --python-version 3.7
stage: Test Pants (Cron)
- addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
- openssl
- libssl-dev
- jq
- unzip
- shellcheck
after_failure:
- ./build-support/bin/ci-failure.sh
before_cache:
- sudo chown -R travis:travis "${HOME}" "${TRAVIS_BUILD_DIR}"
- find ${HOME}/.ivy2/pants -type f -name "ivydata-*.properties" -delete
- rm -f ${HOME}/.ivy2/pants/*.{css,properties,xml,xsl}
- rm -rf ${HOME}/.ivy2/pants/com.example
- du -m -d2 ${HOME}/.cache/pants | sort -r -n
- ./build-support/bin/prune_travis_cache.sh
before_install:
- PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin":$PATH
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- sudo sysctl fs.inotify.max_user_watches=524288
- ./build-support/bin/install_aws_cli_for_ci.sh
- pyenv global 2.7.15 3.6.7 3.7.1
- sudo apt-get install -y pkg-config fuse libfuse-dev
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
before_script:
- ./build-support/bin/get_ci_bootstrapped_pants_pex.sh ${AWS_BUCKET} ${BOOTSTRAPPED_PEX_KEY_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
cache:
directories:
- ${AWS_CLI_ROOT}
- ${PYENV_ROOT_OSX}
- ${HOME}/.cache/pants/tools
- ${HOME}/.cache/pants/zinc
- ${HOME}/.ivy2/pants
- ${HOME}/.npm
timeout: 500
dist: xenial
env:
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py36.linux
- PANTS_REMOTE_CA_CERTS_PATH=/usr/lib/google-cloud-sdk/lib/third_party/grpc/_cython/_credentials/roots.pem
- CACHE_NAME=jvm_tests.py36
if: commit_message !~ /\[ci skip-jvm-tests\]/
language: python
name: JVM tests (Python 3.6)
os: linux
python:
- '2.7'
- '3.6'
- '3.7'
script:
- ./build-support/bin/ci.py --jvm-tests --python-version 3.6
stage: Test Pants
sudo: required
- addons:
apt:
packages:
- lib32stdc++6
- lib32z1
- lib32z1-dev
- gcc-multilib
- python-dev
- openssl
- libssl-dev
- jq
- unzip
- shellcheck
after_failure:
- ./build-support/bin/ci-failure.sh
before_cache:
- sudo chown -R travis:travis "${HOME}" "${TRAVIS_BUILD_DIR}"
- find ${HOME}/.ivy2/pants -type f -name "ivydata-*.properties" -delete
- rm -f ${HOME}/.ivy2/pants/*.{css,properties,xml,xsl}
- rm -rf ${HOME}/.ivy2/pants/com.example
- du -m -d2 ${HOME}/.cache/pants | sort -r -n
- ./build-support/bin/prune_travis_cache.sh
before_install:
- PATH="/usr/lib/jvm/java-8-openjdk-amd64/jre/bin":$PATH
- JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
- sudo sysctl fs.inotify.max_user_watches=524288
- ./build-support/bin/install_aws_cli_for_ci.sh
- pyenv global 2.7.15 3.6.7 3.7.1
- sudo apt-get install -y pkg-config fuse libfuse-dev
- sudo modprobe fuse
- sudo chmod 666 /dev/fuse
- sudo chown root:$USER /etc/fuse.conf
before_script:
- ./build-support/bin/get_ci_bootstrapped_pants_pex.sh ${AWS_BUCKET} ${BOOTSTRAPPED_PEX_KEY_PREFIX}.${BOOTSTRAPPED_PEX_KEY_SUFFIX}
cache:
directories:
- ${AWS_CLI_ROOT}
- ${PYENV_ROOT_OSX}
- ${HOME}/.cache/pants/tools
- ${HOME}/.cache/pants/zinc
- ${HOME}/.ivy2/pants
- ${HOME}/.npm
timeout: 500
dist: xenial
env:
- BOOTSTRAPPED_PEX_KEY_SUFFIX=py37.linux
- PANTS_REMOTE_CA_CERTS_PATH=/usr/lib/google-cloud-sdk/lib/third_party/grpc/_cython/_credentials/roots.pem
- PANTS_NATIVE_BUILD_STEP_CPP_COMPILE_SETTINGS_DEFAULT_COMPILER_OPTION_SETS="[]"
- CACHE_NAME=jvm_tests.py37
if: commit_message !~ /\[ci skip-jvm-tests\]/
language: python
name: JVM tests (Python 3.7)
os: linux
python:
- '2.7'
- '3.6'
- '3.7'
script:
- ./build-support/bin/ci.py --jvm-tests --python-version 3.7
stage: Test Pants (Cron)
sudo: required
- addons:
apt:
packages:
Expand Down
14 changes: 0 additions & 14 deletions build-support/bin/ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ def main() -> None:
run_unit_tests(oauth_token_path=remote_execution_oauth_token_path)
if args.rust_tests:
run_rust_tests()
if args.jvm_tests:
run_jvm_tests()
if args.integration_tests_v1:
run_integration_tests_v1(shard=args.integration_shard)
if args.integration_tests_v2:
Expand Down Expand Up @@ -123,7 +121,6 @@ def create_parser() -> argparse.ArgumentParser:
)
parser.add_argument("--unit-tests", action="store_true", help="Run Python unit tests.")
parser.add_argument("--rust-tests", action="store_true", help="Run Rust tests.")
parser.add_argument("--jvm-tests", action="store_true", help="Run JVM tests.")
parser.add_argument(
"--integration-tests-v1",
action="store_true",
Expand Down Expand Up @@ -556,17 +553,6 @@ def run_rust_tests() -> None:
die("Rust test failure.")


def run_jvm_tests() -> None:
# NB: Ensure that this stays in sync with githooks/prepare-commit-msg.
targets = ["src/java::", "src/scala::", "tests/java::", "tests/scala::", "zinc::"]
_run_command(
["./pants.pex", "test", *targets],
slug="CoreJVM",
start_message="Running JVM tests",
die_message="JVM test failure.",
)


def run_integration_tests_v1(*, shard: Optional[str]) -> None:
target_sets = TestTargetSets.calculate(
test_type=TestType.integration, remote_execution_enabled=False
Expand Down
23 changes: 0 additions & 23 deletions build-support/bin/generate_travis_yml.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,6 @@ def osx_shard(

# See https://docs.travis-ci.com/user/conditions-v1.
SKIP_RUST_CONDITION = r"commit_message !~ /\[ci skip-rust-tests\]/"
SKIP_JVM_CONDITION = r"commit_message !~ /\[ci skip-jvm-tests\]/"

# ----------------------------------------------------------------------
# Bootstrap engine
Expand Down Expand Up @@ -756,27 +755,6 @@ def osx_10_13_sanity_check(python_version: PythonVersion) -> Dict:
return _osx_sanity_check(python_version, os_version_number=13, osx_image="xcode10.1")


# -------------------------------------------------------------------------
# JVM tests
# -------------------------------------------------------------------------


def jvm_tests(python_version: PythonVersion) -> Dict:
shard = {
**linux_shard(python_version=python_version),
# NB: linux_fuse comes after linux_shard to ensure that linux_fuse's before_install
# entry is used.
**linux_fuse_shard(),
"name": f"JVM tests (Python {python_version.decimal})",
"script": [
f"./build-support/bin/ci.py --jvm-tests --python-version {python_version.decimal}"
],
"if": SKIP_JVM_CONDITION,
}
safe_append(shard, "env", f"CACHE_NAME=jvm_tests.py{python_version.number}")
return shard


# -------------------------------------------------------------------------
# Deploy
# -------------------------------------------------------------------------
Expand Down Expand Up @@ -886,7 +864,6 @@ def main() -> None:
*[osx_platform_tests(v) for v in supported_python_versions],
*[osx_10_12_sanity_check(v) for v in supported_python_versions],
*[osx_10_13_sanity_check(v) for v in supported_python_versions],
*[jvm_tests(v) for v in supported_python_versions],
deploy_stable(),
deploy_unstable(),
]
Expand Down
26 changes: 4 additions & 22 deletions build-support/githooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -22,46 +22,28 @@ NUM_NON_MD_FILES=$(echo "${CHANGED_FILES})" | grep -c -v ".\md$")
NUM_RUST_FILES=$(echo "${CHANGED_FILES})" | grep -c -E \
-e "^src/rust/engine" \
-e "^rust-toolchain" \
-e "^src/python/pants/engine/internals/native.py" \
-e "^build-support/bin/native" \
-e "^3rdparty/python/requirements.txt" \
-e "^build-support/bin/generate_travis_yml.py")

# Ensure that this stays in sync with `build-support/bin/ci.py`.
NUM_JVM_FILES=$(echo "${CHANGED_FILES})" | grep -c -E \
-e "^src/java" \
-e "^src/scala" \
-e "^tests/java" \
-e "^tests/scala" \
-e "^zinc" \
-e "^build-support/bin/generate_travis_yml.py")

# To avoid putting skip labels multiple times, check if the labels already exist
# in the commit message.
grep "\[ci skip-rust-tests\]" "${COMMIT_MSG_FILEPATH}" > /dev/null
HAS_RUST_SKIP=$?
grep "\[ci skip-jvm-tests\]" "${COMMIT_MSG_FILEPATH}" > /dev/null
HAS_JVM_SKIP=$?
grep "\[ci skip\]" "${COMMIT_MSG_FILEPATH}" > /dev/null
HAS_CI_SKIP=$?

if [[ "${HAS_CI_SKIP}" -eq 1 ]] && [ "${NUM_NON_MD_FILES}" -eq 0 ]; then
cat <<EOF >> "${COMMIT_MSG_FILEPATH}"
# Delete this line to force a full CI run for documentation-only changes.

# All CI will be skipped. Delete if not intended.
[ci skip]
EOF
fi

if [[ "${HAS_RUST_SKIP}" -eq 1 ]] && [ "${NUM_RUST_FILES}" -eq 0 ]; then
cat <<EOF >> "${COMMIT_MSG_FILEPATH}"
# Delete this line to force CI to run Clippy and the Rust tests.
[ci skip-rust-tests]
EOF
fi

if [[ "${HAS_JVM_SKIP}" -eq 1 ]] && [ "${NUM_JVM_FILES}" -eq 0 ]; then
cat <<EOF >> "${COMMIT_MSG_FILEPATH}"
# Delete this line to force CI to run the JVM tests.
[ci skip-jvm-tests]
# Rust tests will be skipped. Delete if not intended.
[ci skip-rust-tests]
EOF
fi
98 changes: 0 additions & 98 deletions tests/java/org/pantsbuild/args4j/ArgfileOptionHandlerTest.java

This file was deleted.

11 changes: 0 additions & 11 deletions tests/java/org/pantsbuild/args4j/BUILD

This file was deleted.