forked from Unidata/netcdf-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtesting.gradle
More file actions
64 lines (54 loc) · 2.13 KB
/
testing.gradle
File metadata and controls
64 lines (54 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
apply plugin: 'java'
apply from: "$rootDir/gradle/any/properties.gradle"
tasks.withType(Test).all {
// Propagates system properties set on the Gradle process to the test executors.
addFilteredSysProps(systemProperties)
jvmArgs = ['-Xmx1024m']
if (isJenkins && !isRelease) {
// On Jenkins, don't let test failures fail the build unless we are doing we release; we want
// the full test report.
ignoreFailures = true
} else {
// Otherwise, fail the build at the first sign of failure.
ignoreFailures = false
}
useJUnit {
// if we are not explicitly trying to run all tests, allow some categories to be ignored
// test tasks named 'simpleTests' do not depend on cdm-test-utils, so do not apply category
// filters (e.g. :native-compression:libaec-jna:simpleTests)
if (!runAllTests && !name.equals('simpleTests')) {
if (isJenkins) {
excludeCategories 'ucar.unidata.util.test.category.NotJenkins'
}
if (isPullRequestCheck) {
excludeCategories 'ucar.unidata.util.test.category.NotPullRequest'
excludeCategories 'ucar.unidata.util.test.category.NeedsExternalResource'
}
if (!isContentRootAvailable && !isJenkins) { // Don't skip tests on Jenkins, except NotJenkins ones.
excludeCategories 'ucar.unidata.util.test.category.NeedsContentRoot'
}
if (!isCdmUnitTestDirAvailable && !isJenkins) { // Don't skip tests on Jenkins, except NotJenkins ones.
excludeCategories 'ucar.unidata.util.test.category.NeedsCdmUnitTest'
}
if (!isRdaDataAvailable) {
excludeCategories 'ucar.unidata.util.test.category.NeedsRdaData'
}
if (!runSlowTests) {
excludeCategories 'ucar.unidata.util.test.category.Slow'
}
if (!isUcarNetworkAvailable) {
excludeCategories 'ucar.unidata.util.test.category.NeedsUcarNetwork'
}
if (skipDockerTests) {
// dap4
exclude 'dap4/test/**'
// httpservices
exclude 'ucar/httpservices/**'
exclude 'ucar/nc2/util/net/**'
// opendap
exclude 'opendap/test/**'
exclude 'ucar/nc2/dods/**'
}
}
}
}