Skip to content

Commit

Permalink
SEC-2289: Add spring4Test
Browse files Browse the repository at this point in the history
  • Loading branch information
rwinch committed Aug 27, 2013
1 parent 086056f commit aca2e4f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
26 changes: 25 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ allprojects {
group = 'org.springframework.security'

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.terracotta.org/maven2/" }
}

eclipse.project.name = "${project.name}-3.2.x"
Expand Down Expand Up @@ -102,7 +103,22 @@ configure(coreModuleProjects) {
}
configurations {
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 {
jacoco "org.jacoco:org.jacoco.agent:0.6.2.201302030002:runtime"
}
Expand All @@ -112,6 +128,14 @@ configure(coreModuleProjects) {
integrationTest {
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) {
Expand Down
2 changes: 1 addition & 1 deletion core/core.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ classes.doLast {

sourceJar.from cryptoProject.sourceSets.main.java

test {
configure([test,spring4Test]) {
systemProperties['springSecurityVersion'] = version
systemProperties['springVersion'] = springVersion
}
2 changes: 1 addition & 1 deletion crypto/crypto.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// isJdk6 = jdkVersion >= '1.6'
int maxAESKeySize = javax.crypto.Cipher.getMaxAllowedKeyLength('AES')

test {
configure([test,spring4Test]) {
if (maxAESKeySize < 256) {
println "AES keysize limited to $maxAESKeySize, skipping EncryptorsTests"
exclude '**/EncryptorsTests.class'
Expand Down

0 comments on commit aca2e4f

Please sign in to comment.