Added config for regression tests

This commit is contained in:
Georgy Litvinov 2021-02-25 00:35:05 +01:00
parent d96897d5ae
commit 6eeaebecf4
2 changed files with 25 additions and 10 deletions

View file

@ -11,14 +11,27 @@ properties.setProperty('releaseVersion', project.version )
mkdir "src/main/tmp/w2phtml"
propertyDestFile.withWriter { properties.store(it, null) }
sourceSets {
regressionTest {
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + files('src/main/java')
java.srcDir file('src/r_tests/java')
}
}
}
sourceCompatibility = 1.8
configurations{
bundledLibs
regressionTestCompile.extendsFrom mainCompile
regressionTestRuntime.extendsFrom mainRuntime
regressionTestRuntime.extendsFrom bundledLibs
}
dependencies{
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.1'
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.1'
testImplementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
regressionTestImplementation group: 'commons-io', name: 'commons-io', version: '2.8.0'
regressionTestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.7.1'
regressionTestImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.7.1'
regressionTestRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
bundledLibs 'org.libreoffice:jurt:5.3.2'
bundledLibs 'org.libreoffice:juh:5.3.2'
@ -202,12 +215,14 @@ task oxtNew(type: Zip){
from 'releasenotes.txt'
include '*'
}
task regressionTests(type: Test){
useJUnit()
testLogging {
events "passed", "skipped", "failed"
}
task regressionTest(type: Test) {
testClassesDirs = sourceSets.regressionTest.output.classesDirs
classpath = sourceSets.regressionTest.runtimeClasspath
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed", "standardOut", "standardError"
}
mustRunAfter jar
}
task setVersion(){

View file

@ -14,7 +14,7 @@ public class TestExample {
@Test
@DisplayName("Heading with page break before")
public static void main(String[] args) throws Exception {
void testExample() throws Exception{
List<String> arguments = new ArrayList<String>();
arguments.add("-page_break_style");