From ff6e5278f3208aa2b797f7b94bc2d3c895135a48 Mon Sep 17 00:00:00 2001 From: Andreas Dangel Date: Mon, 26 Oct 2020 17:46:05 +0100 Subject: [PATCH] [ci] Update pmd-tester, use auxclasspath This will test pmd/pmd-regression-tester#72 checkstyle: Add exclude patterns for checkstyle: after compilation, testresources appear now under target/test-classes and they don't need to be analyzed again. Also exclude generated-sources. --- .travis/before_install.sh | 40 +++++++++++++++++++------------- .travis/project-list.xml | 48 ++++++++++++++++++++++++++++++++++++++- Gemfile | 3 ++- Gemfile.lock | 30 ++++++++++++++---------- 4 files changed, 91 insertions(+), 30 deletions(-) diff --git a/.travis/before_install.sh b/.travis/before_install.sh index 4b0182f2cf..0f34538540 100644 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -13,6 +13,24 @@ bash .travis/configure-maven.sh bash .travis/install-openjdk.sh $OPENJDK_VERSION +function install_jdk() { + LOCAL_DIR=$1 + TARGET_DIR=$2 + DOWNLOAD_URL=$3 + ARCHIVE=$(basename $DOWNLOAD_URL) + + mkdir -p ${LOCAL_DIR} + mkdir -p ${TARGET_DIR} + if [ ! -e ${LOCAL_DIR}/${ARCHIVE} ]; then + log_info "Downloading from ${DOWNLOAD_URL} to ${LOCAL_DIR}" + wget --directory-prefix ${LOCAL_DIR} --timestamping --continue ${DOWNLOAD_URL} + else + log_info "Skipped download, file ${LOCAL_DIR}/${ARCHIVE} already exists" + fi + log_info "Extracting to ${TARGET_DIR}" + tar --extract --file ${LOCAL_DIR}/${ARCHIVE} -C ${TARGET_DIR} --strip-components=1 +} + if travis_isLinux; then gem install bundler bundle config set --local path vendor/bundle @@ -20,23 +38,13 @@ if travis_isLinux; then bundle install # install jdk7 for integration test - LOCAL_DIR=${HOME}/.cache/jdk7 - TARGET_DIR=${HOME}/oraclejdk7 - JDK7_ARCHIVE=jdk-7u80-linux-x64.tar.gz - DOWNLOAD_URL=https://pmd-code.org/oraclejdk/${JDK7_ARCHIVE} - mkdir -p ${LOCAL_DIR} - mkdir -p ${TARGET_DIR} - if [ ! -e ${LOCAL_DIR}/${JDK7_ARCHIVE} ]; then - log_info "Downloading from ${DOWNLOAD_URL} to ${LOCAL_DIR}" - wget --directory-prefix ${LOCAL_DIR} --timestamping --continue ${DOWNLOAD_URL} - else - log_info "Skipped download, file ${LOCAL_DIR}/${JDK7_ARCHIVE} already exists" - fi - log_info "Extracting to ${TARGET_DIR}" - tar --extract --file ${LOCAL_DIR}/${JDK7_ARCHIVE} -C ${TARGET_DIR} --strip-components=1 - log_info "OracleJDK7 can be used via -Djava7.home=${TARGET_DIR}" + install_jdk "${HOME}/.cache/jdk7" "${HOME}/oraclejdk7" "https://pmd-code.org/oraclejdk/jdk-7u80-linux-x64.tar.gz" + log_info "OracleJDK7 can be used via -Djava7.home=${HOME}/oraclejdk7" + # install openjdk8 for pmd-regression-tests + install_jdk "${HOME}/.cache/openjdk" "${HOME}/openjdk8" "https://pmd-code.org/openjdk/latest/jdk-8-linux64.tar.gz" + log_info "OpenJDK8 can be used from ${HOME}/openjdk8" else - log_info "Not setting up ruby for ${TRAVIS_OS_NAME}." + log_info "Not setting up ruby and additional jvms for ${TRAVIS_OS_NAME}." exit 0 fi diff --git a/.travis/project-list.xml b/.travis/project-list.xml index 5471d6f2e3..600061f674 100644 --- a/.travis/project-list.xml +++ b/.travis/project-list.xml @@ -1,7 +1,7 @@ +xsi:noNamespaceSchemaLocation="projectlist_1_1_0.xsd"> Standard Projects @@ -9,6 +9,19 @@ xsi:noNamespaceSchemaLocation="projectlist_1_0_0.xsd"> git https://github.com/checkstyle/checkstyle checkstyle-8.10 + + .*/target/test-classes/com/puppycrawl/tools/checkstyle/.* + .*/target/generated-sources/.* + + + echo -n "$(pwd)/target/classes:$(pwd)/target/test-classes:"; cat classpath.txt @@ -16,6 +29,39 @@ xsi:noNamespaceSchemaLocation="projectlist_1_0_0.xsd"> git https://github.com/spring-projects/spring-framework v5.0.6.RELEASE + + > build.gradle < classpath.txt +]]> + cat classpath.txt