Skip to content

Commit 6f9da4f

Browse files
committed
added gradle task to automatically download conformance suite before running integration tests
1 parent 5649081 commit 6f9da4f

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

build.gradle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ plugins {
55
id "com.github.kt3k.coveralls" version "2.8.1"
66
id "de.aaschmid.cpd" version "1.0"
77
id "org.owasp.dependencycheck" version "1.4.5"
8+
id "com.dorongold.task-tree" version "1.3"
9+
id "org.ajoberstar.grgit" version "1.7.0"
810
}
911
apply from: 'eclipse.gradle'
1012
apply from: 'maven-central.gradle'
@@ -36,3 +38,17 @@ dependencies {
3638
test { //show test output
3739
testLogging.showStandardStreams = true
3840
}
41+
42+
import org.ajoberstar.grgit.*
43+
task cloneConformanceSuite(){
44+
group "Verification"
45+
description "get the bagit conformance suite"
46+
File location = file("${project.projectDir}/bagit-conformance-suite")
47+
outputs.dir(location)
48+
49+
onlyIf { !location.exists() }
50+
doLast{
51+
Grgit.clone(dir: location,
52+
uri: 'https://github.com/loc-rdc/bagit-conformance-suite.git')
53+
}
54+
}

code-quality.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ configurations {
1818
integrationTestRuntime.extendsFrom testRuntime
1919
}
2020

21-
task integrationTest(type: Test) {
21+
task integrationTest(type: Test, dependsOn: "cloneConformanceSuite") {
2222
group "Verification"
2323
description "Runs the integration tests."
2424
testClassesDir = sourceSets.integrationTest.output.classesDir

0 commit comments

Comments
 (0)