Skip to content
Snippets Groups Projects
Commit fedd9e07 authored by dgelessus's avatar dgelessus
Browse files

Try to enable parallel test running for all tests except JS tests

parent d6ba2454
No related branches found
No related tags found
No related merge requests found
Pipeline #149376 failed
......@@ -37,4 +37,4 @@ test:linux:
- mkdir cpp_build && cd cpp_build
- cmake ..
- make install & cd ..
- ./gradlew test --info --stacktrace
- ./gradlew check --info --stacktrace
......@@ -42,19 +42,43 @@ application {
mainClass = 'de.hhu.stups.codegenerator.CodeGenerator'
}
// The JavaScript tests currently cannot run in parallel,
// because multiple tests copy files to the same location and conflict with each other.
final noParallelTests = [
"de.hhu.stups.codegenerator.js.*",
]
test {
// We could enable executing tests in parallel, as recommended here:
// Execute tests in parallel where possible, as recommended here:
// https://docs.gradle.org/8.12/userguide/performance.html#execute_tests_in_parallel
// But this currently doesn't work with the JavaScript tests,
// because multiple tests copy files to the same location and conflict with each other.
//maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
filter {
excludePatterns += noParallelTests
}
}
final testNoParallel = tasks.register("testNoParallel", Test) {
description = "Runs tests that cannot be executed in parallel."
group = "verification"
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
filter {
includePatterns += noParallelTests
}
}
tasks.named("check").configure {
dependsOn += [testNoParallel]
}
tasks.withType(Test).configureEach {
testLogging {
events += [TestLogEvent.PASSED]
}
}
jar {
manifest {
attributes(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment