浏览代码

SEC-3029: Add springSnapshotTests

Test against Spring Framework's latest Snapshots
Rob Winch 10 年之前
父节点
当前提交
848523e47a
共有 1 个文件被更改,包括 19 次插入0 次删除
  1. 19 0
      gradle/javaprojects.gradle

+ 19 - 0
gradle/javaprojects.gradle

@@ -94,6 +94,15 @@ configurations {
 	integrationTestRuntime {
 		extendsFrom integrationTestCompile, testRuntime
 	}
+	springSnapshotTestRuntime.extendsFrom testRuntime
+}
+
+configurations.springSnapshotTestRuntime {
+	resolutionStrategy.eachDependency { DependencyResolveDetails details ->
+		if (details.requested.group == 'org.springframework') {
+			details.useVersion 'latest.integration'
+		}
+	}
 }
 
 sourceSets {
@@ -126,6 +135,16 @@ project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 1, pro
 project.conf2ScopeMappings.addMapping(MavenPlugin.TEST_COMPILE_PRIORITY + 2, project.configurations.getByName("integrationTestRuntime"), Conf2ScopeMappingContainer.TEST)
 check.dependsOn integrationTest
 
+task springSnapshotTest(type: Test) {
+	jvmArgs = ['-ea', '-Xmx500m', '-XX:MaxPermSize=128M']
+	classpath = sourceSets.test.output + sourceSets.main.output + configurations.springSnapshotTestRuntime
+	reports {
+		html.destination = project.file("$buildDir/spring-snapshot-test-results/")
+		junitXml.destination = project.file("$buildDir/reports/spring-snapshot-tests/")
+	}
+}
+check.dependsOn springSnapshotTest
+
 dependencies {
 	optional "commons-logging:commons-logging:$commonsLoggingVersion"