Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 11 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ task buildDLJC(type: Exec) {
commandLine './buildDLJC'
}

def configureTestJvmArgs = { Test testTask ->
if (isJava8) {
testTask.jvmArgs += [
"-Xbootclasspath/p:${configurations.javacJar.asPath}"
]
} else {
testTask.jvmArgs += compilerArgsForRunningCF
}
}

test {
dependsOn(shadowJar)
dependsOn('dist')
Expand All @@ -178,17 +188,6 @@ test {
systemProperties += ["emit.test.debug": 'true']
}

if (isJava8) {
jvmArgs += [
"-Xbootclasspath/p:${configurations.javacJar.asPath}"
]
} else {
// Without this, the test throw "java.lang.OutOfMemoryError: Java heap space"
// Corresponding pull request: https://github.com/opprop/checker-framework-inference/pull/263
forkEvery(1)
jvmArgs += compilerArgsForRunningCF
}

testLogging {
// Always run the tests
outputs.upToDateWhen { false }
Expand Down Expand Up @@ -373,11 +372,7 @@ afterEvaluate {
systemProperties += ["emit.test.debug": 'true']
}

if (isJava8) {
jvmArgs += [
"-Xbootclasspath/p:${configurations.javacJar.asPath}"
]
}
configureTestJvmArgs(delegate)

testLogging {
// Always run the tests
Expand Down
Loading