forked from phoedos/pmd
[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.
This commit is contained in:
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<projectlist xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="projectlist_1_0_0.xsd">
|
||||
xsi:noNamespaceSchemaLocation="projectlist_1_1_0.xsd">
|
||||
<description>Standard Projects</description>
|
||||
|
||||
<project>
|
||||
@ -9,6 +9,19 @@ xsi:noNamespaceSchemaLocation="projectlist_1_0_0.xsd">
|
||||
<type>git</type>
|
||||
<connection>https://github.com/checkstyle/checkstyle</connection>
|
||||
<tag>checkstyle-8.10</tag>
|
||||
|
||||
<exclude-pattern>.*/target/test-classes/com/puppycrawl/tools/checkstyle/.*</exclude-pattern>
|
||||
<exclude-pattern>.*/target/generated-sources/.*</exclude-pattern>
|
||||
|
||||
<build-command><![CDATA[#!/usr/bin/env bash
|
||||
if test -e classpath.txt; then
|
||||
exit
|
||||
fi
|
||||
|
||||
mvn test-compile
|
||||
mvn dependency:build-classpath -DincludeScope=test -Dmdep.outputFile=classpath.txt
|
||||
]]></build-command>
|
||||
<auxclasspath-command>echo -n "$(pwd)/target/classes:$(pwd)/target/test-classes:"; cat classpath.txt</auxclasspath-command>
|
||||
</project>
|
||||
|
||||
<project>
|
||||
@ -16,6 +29,39 @@ xsi:noNamespaceSchemaLocation="projectlist_1_0_0.xsd">
|
||||
<type>git</type>
|
||||
<connection>https://github.com/spring-projects/spring-framework</connection>
|
||||
<tag>v5.0.6.RELEASE</tag>
|
||||
|
||||
<build-command><![CDATA[#!/usr/bin/env bash
|
||||
if test -e classpath.txt; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Note: openjdk8 will be installed by "before_install.sh"
|
||||
JAVA_HOME=${HOME}/openjdk8
|
||||
PATH=$JAVA_HOME/bin:$PATH
|
||||
|
||||
./gradlew build -x javadoc -x dokka -x asciidoctor -x test -x testNG -x api -x distZip
|
||||
cat >> build.gradle <<EOF
|
||||
task createSquishClasspath {
|
||||
doLast {
|
||||
def dependencies = new HashSet()
|
||||
dependencies.addAll(subprojects.configurations.compile.resolvedConfiguration.resolvedArtifacts.file.flatten())
|
||||
dependencies.addAll(subprojects.configurations.optional.resolvedConfiguration.resolvedArtifacts.file.flatten())
|
||||
dependencies.addAll(subprojects.configurations.testCompile.resolvedConfiguration.resolvedArtifacts.file.flatten())
|
||||
dependencies.addAll(subprojects.configurations.testRuntime.resolvedConfiguration.resolvedArtifacts.file.flatten())
|
||||
|
||||
def paths = new ArrayList()
|
||||
paths.addAll(subprojects.jar.outputs.files.asPath)
|
||||
paths.addAll(subprojects.sourceSets.test.output.resourcesDir)
|
||||
paths.addAll(subprojects.sourceSets.test.output.classesDirs.files.flatten())
|
||||
paths.addAll(dependencies)
|
||||
println paths.join(File.pathSeparator)
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
./gradlew createSquishClasspath -q > classpath.txt
|
||||
]]></build-command>
|
||||
<auxclasspath-command>cat classpath.txt</auxclasspath-command>
|
||||
</project>
|
||||
|
||||
<!---<project>
|
||||
|
3
Gemfile
3
Gemfile
@ -2,8 +2,9 @@ source 'https://rubygems.org/'
|
||||
|
||||
# bleeding edge from git
|
||||
#gem 'pmdtester', :git => 'https://github.com/pmd/pmd-regression-tester.git'
|
||||
gem 'pmdtester', :git => 'https://github.com/adangel/pmd-regression-tester.git', :branch => 'auxclasspath'
|
||||
|
||||
gem 'pmdtester', '~> 1.0'
|
||||
#gem 'pmdtester', '~> 1.0'
|
||||
gem 'danger', '~> 5.6', '>= 5.6'
|
||||
|
||||
# This group is only needed for rendering release notes
|
||||
|
30
Gemfile.lock
30
Gemfile.lock
@ -1,3 +1,14 @@
|
||||
GIT
|
||||
remote: https://github.com/adangel/pmd-regression-tester.git
|
||||
revision: b30efaea1c77bd0f914309562538b9eed4fa47f4
|
||||
branch: auxclasspath
|
||||
specs:
|
||||
pmdtester (1.1.0.pre.SNAPSHOT)
|
||||
differ (~> 0.1)
|
||||
nokogiri (~> 1.8)
|
||||
rufus-scheduler (~> 3.5)
|
||||
slop (~> 4.6)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
@ -31,9 +42,9 @@ GEM
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faraday-http-cache (1.3.1)
|
||||
faraday (~> 0.8)
|
||||
fugit (1.3.8)
|
||||
fugit (1.4.0)
|
||||
et-orbi (~> 1.1, >= 1.1.8)
|
||||
raabro (~> 1.3)
|
||||
raabro (~> 1.4)
|
||||
git (1.7.0)
|
||||
rchardet (~> 1.8)
|
||||
kramdown (1.17.0)
|
||||
@ -44,19 +55,14 @@ GEM
|
||||
no_proxy_fix (0.1.2)
|
||||
nokogiri (1.10.10)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
octokit (4.18.0)
|
||||
octokit (4.19.0)
|
||||
faraday (>= 0.9)
|
||||
sawyer (~> 0.8.0, >= 0.5.3)
|
||||
open4 (1.3.4)
|
||||
pmdtester (1.0.1)
|
||||
differ (~> 0.1)
|
||||
nokogiri (~> 1.8)
|
||||
rufus-scheduler (~> 3.5)
|
||||
slop (~> 4.6)
|
||||
public_suffix (4.0.5)
|
||||
raabro (1.3.1)
|
||||
public_suffix (4.0.6)
|
||||
raabro (1.4.0)
|
||||
rchardet (1.8.0)
|
||||
rouge (3.22.0)
|
||||
rouge (3.24.0)
|
||||
rufus-scheduler (3.6.0)
|
||||
fugit (~> 1.1, >= 1.1.6)
|
||||
safe_yaml (1.0.5)
|
||||
@ -76,7 +82,7 @@ PLATFORMS
|
||||
DEPENDENCIES
|
||||
danger (~> 5.6, >= 5.6)
|
||||
liquid (>= 4.0.0)
|
||||
pmdtester (~> 1.0)
|
||||
pmdtester!
|
||||
rouge (>= 1.7, < 4)
|
||||
safe_yaml (>= 1.0)
|
||||
|
||||
|
Reference in New Issue
Block a user