Project

Profile

Help

Revision 3afd888e

Added by Norman Tovey-Walsh 7 months ago

Run the JUnit tests with EEJ

View differences:

build.gradle
26 26
  preprocessor.extendsFrom(runtimeOnly)
27 27
  jarjarAsm.extendsFrom(implementation)
28 28
  testDrivers.extendsFrom(testImplementation)
29
  productTests.extendsFrom(testImplementation)
29 30
  ikvm.extendsFrom(implementation)
30 31
  compileDotNet.extendsFrom(implementation)
31 32
  asmDotNet.extendsFrom(implementation)
......
100 101
  testImplementation (
101 102
    [group: 'junit', name: 'junit', version: '4.12'],
102 103
    [group: 'org.junit.jupiter', name: 'junit-jupiter-api', version: '5.4.2'],
104
    [group: 'org.junit.platform', name: 'junit-platform-console-standalone', version: '1.7.1'],
103 105
    [group: 'org.apache.ant', name: 'ant', version: '1.10.9' ],
104 106
    files("src/main/resources"),
105 107
    files("lib/Tidy.jar"),
......
1215 1217

  
1216 1218
// ============================================================
1217 1219

  
1220
task eej_compile_junit_tests(
1221
  type: JavaCompile,
1222
  dependsOn: ["eejCompile"],
1223
  description: "Compile JUnit tests for Saxon-EE Java"
1224
) {
1225
  classpath = configurations.productTests + files("${buildDir}/classes/eej")
1226
  source fileTree(dir: "${projectDir}/src/test/java",
1227
                  include: ["jaxptest/*.java",
1228
                            "millicom/*.java",
1229
                            "commands/*.java",
1230
                            // "failing/*.java",  // Known to fail?
1231
                            "internaltests/*.java",
1232
                            "jstests/*.java",
1233
                            "nativetests/*.java",
1234
                            "performance/*.java",
1235
                            "pulltests/*.java",
1236
                            "regextests/*.java",
1237
                            "s9apitest/*.java",
1238
                            "sorttests/*.java",
1239
                            // "tools/*.java",    // Not tests
1240
                            "xqjtests/*.java"])
1241
  destinationDirectory = new File("${buildDir}/test_classes/eej")
1242
}
1243

  
1244
task eejTests(
1245
  type: JavaExec,
1246
  dependsOn: ["eej_compile_junit_tests"]
1247
) {
1248
  classpath = configurations.productTests + files("${buildDir}/classes/eej") + files("${buildDir}/test_classes/eej")
1249
  main = "org.junit.platform.console.ConsoleLauncher"
1250
  args "--scan-class-path"
1251
}
1252

  
1253
// ============================================================
1254

  
1218 1255
task hejRelease(
1219 1256
  type: Copy,
1220 1257
  dependsOn: ["hejJar", "hejJarXqj", "hejJarTests", "hej_notices"],

Also available in: Unified diff