Skip to content
Snippets Groups Projects
build.gradle 4.72 KiB
Newer Older
evaluationDependsOn(':api-openbis-java')
evaluationDependsOn(':api-openbis-javascript')
evaluationDependsOn(':lib-openbis-common')
evaluationDependsOn(':lib-authentication')
evaluationDependsOn(':lib-dbmigration')
evaluationDependsOn(':server-application-server')
evaluationDependsOn(':server-original-data-store')
            project(':server-original-data-store'),
            'openhms:jackcess:1.2.2',
            'reveregroup:gwt-image-loader:1.1.4',
            'imagej:ij:1.43u',
    devRuntime project(path: ':server-application-server', configuration: 'devRuntime')
    testImplementation project(path: ':lib-commonbase', configuration: 'tests'),
            project(path: ':lib-common', configuration: 'tests'),
            project(path: ':lib-dbmigration', configuration: 'tests'),
            project(path: ':lib-authentication', configuration: 'tests'),
            project(path: ':api-openbis-java', configuration: 'tests'),
            project(path: ':lib-openbis-common', configuration: 'tests'),
            project(path: ':server-original-data-store', configuration: 'tests'),
            'fjelmer:classycle:1.4.2',
            'testng:testng:6.8-CISD',
            'springframework:spring-test:5.0.17.RELEASE',
            'startnet:apgdiff:2.3'
    testImplementation(project(path: ':server-application-server', configuration: 'tests')) {
        exclude group: 'google', module: 'gwt-user'
    }
            srcDirs = ['sourceTest/java']
    duplicatesStrategy 'include'
    from('../server-screening/source/sql') {
    from('../server-screening/source/java') {
        include 'screening-dssApplicationContext.xml'
    }
}

// This task is here to make TabularDataGraphCollectionConfigurationTest to work. It requires some data files
// to be present on the same directory than the class file itself.
task copyTestData(type: Copy, dependsOn: testClasses) {
    from "${project.projectDir}/sourceTest/java/ch/systemsx/cisd/openbis/dss/generic/server/graph"
    into "${project.buildDir}/classes/test/ch/systemsx/cisd/openbis/dss/generic/server/graph"
    include "*.properties"
}

task executeScreeningOpenBisDev(type: JavaExec) {
    main = 'org.eclipse.jetty.runner.Runner'
    classpath = sourceSets.main.runtimeClasspath + configurations.devRuntime
    jvmArgs(['-Dpython.path=../libraries/jython/jython-lib', '-Dlog4j.configuration=../server-application-server/etc/log.xml',
             '-Djavax.net.ssl.trustStore=../server-application-server/dist/server/openBIS.keystore',
             '-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StrErrLog',
             '-Dorg.mortbay.util.FileResource.checkAliases=false', '-Xmx2048M', '-ea'])
    args(['--classes', '../lib-commonbase/targets/gradle/classes/main',
          '--classes', '../lib-common/targets/gradle/classes/main',
          '--classes', '../lib-authentication/targets/gradle/classes/main',
          '--classes', '../lib-dbmigration/targets/gradle/classes/main',
          '--classes', '../lib-openbis-common/targets/gradle/classes/main',
          '--classes', '../api-openbis-java/targets/gradle/classes/main',
          '--classes', '../server-application-server/targets/gradle/classes/main',
          '--classes', 'targets/gradle/classes/main', '--lib', 'targets/www/lib/', '--port', '8888', 'targets/www'])
}

juanf's avatar
juanf committed
task executeScreeningDataStoreDev(type: JavaExec) {
    main = 'ch.systemsx.cisd.openbis.dss.generic.DataStoreServer'
    classpath = sourceSets.main.runtimeClasspath + configurations.devRuntime +
            files("../core-plugin-openbis/dist/core-plugins/microscopy/3/dss/drop-boxes/MicroscopyDropbox/lib/MicroscopyReader_20190521113500.jar")
    jvmArgs(['-Dpython.path=../libraries/jython/jython-lib', '-Dlog4j.configuration=../server-original-data-store/etc/log.xml',
             '-Djavax.net.ssl.trustStore=../server-original-data-store/dist/etc/openBIS.keystore',
juanf's avatar
juanf committed
             '-Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StrErrLog',
             '-Dorg.mortbay.util.FileResource.checkAliases=false', '-Xmx2048M', '-ea'])
task systemTestSuite(type: Test) {
    useTestNG()
    options.suites('sourceTest/java/tests_system.xml')
    reports.html.destination = file("${project.buildDir}/reports/tests-system")
}

test.dependsOn(systemTestSuite)
test.dependsOn(copyTestData)