...
 
Commits (3)
......@@ -52,23 +52,25 @@ tasks.withType(Test) {
}
// Copy Braille tables from submodule to working dir
task copyBrailleTables(type: Copy) {
def brailleTablesCopySpec = copySpec {
from "$projectDir/third_party/liblouis/tables/"
into "$rootDir/src/main/resources/mapping/liblouis"
//from "$projectDir/third_party/liblouis/tables/"
//into "$rootDir/src/test/resources/mapping/liblouis"
}
// Same for integrationtests
task copyBrailleTables(type: Copy) {
with brailleTablesCopySpec
into "$projectDir/src/main/resources/mapping/liblouis"
}
task copyBrailleTablesTest(type: Copy) {
with brailleTablesCopySpec
into "$projectDir/src/test/resources/mapping/liblouis"
}
task copyBrailleTablesIntegrationTest(type: Copy) {
from "$projectDir/third_party/liblouis/tables/"
into "$rootDir/src/integrationTest/resources/mapping/liblouis"
with brailleTablesCopySpec
into "$projectDir/src/integrationTest/resources/mapping/liblouis"
}
processResources.dependsOn copyBrailleTables
processResources.dependsOn copyBrailleTablesTest
processResources.dependsOn copyBrailleTablesIntegrationTest
// Abort if files are missing
gradle.taskGraph.afterTask { copyBrailleTables ->
if(copyBrailleTables.state.noSource){
......@@ -77,18 +79,30 @@ gradle.taskGraph.afterTask { copyBrailleTables ->
}
// Delete tables on "clean" task
clean {
delete "$rootDir/src/main/resources/mapping/liblouis"
delete "$rootDir/src/integrationTest/resources/mapping/liblouis"
delete "$rootDir/src/test/resources/mapping/liblouis"
delete "$projectDir/src/main/resources/mapping/liblouis"
delete "$projectDir/src/test/resources/mapping/liblouis"
delete "$projectDir/src/integrationTest/resources/mapping/liblouis"
}
// Copy native liblouis libraries for major platforms to the resource folder
task copyLibLouisBinary(type: Copy) {
def liblouisBinaryCopySpec = copySpec {
from "$projectDir/third_party/liblouis_bin/bin/"
into "$rootDir/src/main/resources/native/liblouis"
}
task copyLibLouisBinary(type: Copy) {
with liblouisBinaryCopySpec
into "$projectDir/src/main/resources/native/liblouis"
}
task copyLibLouisBinaryTest(type: Copy) {
with liblouisBinaryCopySpec
into "$projectDir/src/test/resources/native/liblouis"
}
task copyLibLouisBinaryIntegrationTest(type: Copy) {
with liblouisBinaryCopySpec
into "$projectDir/src/integrationTest/resources/native/liblouis"
}
processResources.dependsOn copyLibLouisBinary
processResources.dependsOn copyLibLouisBinaryTest
processResources.dependsOn copyLibLouisBinaryIntegrationTest
// Abort if files are missing
gradle.taskGraph.afterTask { copyLibLouisBinary ->
if(copyLibLouisBinary.state.noSource){
......@@ -97,11 +111,11 @@ gradle.taskGraph.afterTask { copyLibLouisBinary ->
}
// Delete libraries on "clean" task
clean {
delete "$rootDir/src/main/resources/native/liblouis"
delete "$projectDir/src/main/resources/native/liblouis"
delete "$projectDir/src/test/resources/native/liblouis"
delete "$projectDir/src/integrationTest/resources/native/liblouis"
}
//processResources.dependsOn copyBrailleTables
// Define the main class for the application
mainClassName = 'de.tudresden.inf.mci.brailleplot.App'
......@@ -121,7 +135,5 @@ checkstyleTest {
}
// Needed for Integrationtests
// Needed for integration tests
apply from: "$rootDir/integrationTest.gradle"
integrationTest.dependsOn copyBrailleTablesIntegrationTest
sourceSets {
integrationTest {
java.srcDir 'src/integrationTest'
java.srcDir 'src/integrationTest/java'
resources.srcDir 'src/integrationTest/resources'
compileClasspath += sourceSets.main.output + configurations.testRuntimeClasspath
runtimeClasspath += output + compileClasspath
}
}
task integrationTest(type: Test) {
......@@ -15,4 +14,4 @@ task integrationTest(type: Test) {
classpath = sourceSets.integrationTest.runtimeClasspath
mustRunAfter test
checkstyleIntegrationTest.enabled = false
}
\ No newline at end of file
}
......@@ -23,7 +23,9 @@ public class AppTest {
@Test
public void smokeTest() {
LiblouisBrailleTextRasterizer.initModule();
Assertions.assertEquals(0, mApp.run(new String[]{"-p", "src/test/resources/config/dummyprinter.properties",
Assertions.assertEquals(0, mApp.run(new String[]{
"-i",
"-p", "src/test/resources/config/dummyprinter.properties",
"-c", "src/test/resources/examples_csv/2_line_chart.csv",
"-d", "LineChart",
"-t", "title",
......