SEC-2289: Add spring4Test
This commit is contained in:
parent
086056f191
commit
aca2e4ff3a
26
build.gradle
26
build.gradle
|
@ -30,8 +30,9 @@ allprojects {
|
||||||
group = 'org.springframework.security'
|
group = 'org.springframework.security'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven { url "http://repo.springsource.org/libs-release" }
|
maven { url "http://repo.springsource.org/libs-snapshot" }
|
||||||
maven { url "http://repo.springsource.org/plugins-release" }
|
maven { url "http://repo.springsource.org/plugins-release" }
|
||||||
|
maven { url "http://repo.terracotta.org/maven2/" }
|
||||||
}
|
}
|
||||||
|
|
||||||
eclipse.project.name = "${project.name}-3.2.x"
|
eclipse.project.name = "${project.name}-3.2.x"
|
||||||
|
@ -102,7 +103,22 @@ configure(coreModuleProjects) {
|
||||||
}
|
}
|
||||||
configurations {
|
configurations {
|
||||||
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
|
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
|
||||||
|
spring4TestRuntime.extendsFrom testRuntime
|
||||||
}
|
}
|
||||||
|
configurations.spring4TestRuntime {
|
||||||
|
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
|
||||||
|
if (details.requested.group == 'org.springframework') {
|
||||||
|
details.useVersion '4.0.0.BUILD-SNAPSHOT'
|
||||||
|
}
|
||||||
|
if (details.requested.name == 'ehcache') {
|
||||||
|
details.useVersion '2.6.5'
|
||||||
|
}
|
||||||
|
if (details.requested.name == 'ehcache-terracotta') {
|
||||||
|
details.useVersion '2.1.1'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
jacoco "org.jacoco:org.jacoco.agent:0.6.2.201302030002:runtime"
|
jacoco "org.jacoco:org.jacoco.agent:0.6.2.201302030002:runtime"
|
||||||
}
|
}
|
||||||
|
@ -112,6 +128,14 @@ configure(coreModuleProjects) {
|
||||||
integrationTest {
|
integrationTest {
|
||||||
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*"
|
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=${project.group}.*"
|
||||||
}
|
}
|
||||||
|
task spring4Test(type: Test) {
|
||||||
|
jvmArgs = ['-ea', '-Xmx500m', '-XX:MaxPermSize=128M']
|
||||||
|
exclude "**/EhCacheBasedAclCacheTests.class", "**/Issue55Tests.class"
|
||||||
|
classpath = sourceSets.test.output + sourceSets.main.output + configurations.spring4TestRuntime
|
||||||
|
testResultsDir = file("$buildDir/spring4-test-results/")
|
||||||
|
testReportDir = file("$buildDir/reports/spring4-tests/")
|
||||||
|
}
|
||||||
|
check.dependsOn spring4Test
|
||||||
}
|
}
|
||||||
|
|
||||||
configure (aspectjProjects) {
|
configure (aspectjProjects) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ classes.doLast {
|
||||||
|
|
||||||
sourceJar.from cryptoProject.sourceSets.main.java
|
sourceJar.from cryptoProject.sourceSets.main.java
|
||||||
|
|
||||||
test {
|
configure([test,spring4Test]) {
|
||||||
systemProperties['springSecurityVersion'] = version
|
systemProperties['springSecurityVersion'] = version
|
||||||
systemProperties['springVersion'] = springVersion
|
systemProperties['springVersion'] = springVersion
|
||||||
}
|
}
|
|
@ -4,7 +4,7 @@
|
||||||
// isJdk6 = jdkVersion >= '1.6'
|
// isJdk6 = jdkVersion >= '1.6'
|
||||||
int maxAESKeySize = javax.crypto.Cipher.getMaxAllowedKeyLength('AES')
|
int maxAESKeySize = javax.crypto.Cipher.getMaxAllowedKeyLength('AES')
|
||||||
|
|
||||||
test {
|
configure([test,spring4Test]) {
|
||||||
if (maxAESKeySize < 256) {
|
if (maxAESKeySize < 256) {
|
||||||
println "AES keysize limited to $maxAESKeySize, skipping EncryptorsTests"
|
println "AES keysize limited to $maxAESKeySize, skipping EncryptorsTests"
|
||||||
exclude '**/EncryptorsTests.class'
|
exclude '**/EncryptorsTests.class'
|
||||||
|
|
Loading…
Reference in New Issue