-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add virtual thread support #3443
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
sormuras
wants to merge
14
commits into
main
Choose a base branch
from
loom-21
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3860131
Add virtual thread support
marcphilipp 3d2c43a
Run Gradle and Graal with Java 17
sormuras 8cab1aa
Install JDK 21 from https://jdk.java.net
sormuras 0d65d96
Only take into account main source set when compiling module descriptor
marcphilipp baa5793
Use at least JDK 21 when building an MR-JAR for JDK 21
marcphilipp 18aee3b
Add JDK 21 to all Gradle builds on GitHub Actions
marcphilipp 54b68db
Move env var export as well
marcphilipp fb9f2b7
Update test condition to Java 21
sormuras 105948f
Clean up
sormuras 9ff4567
Use Java 17 in reproducible build check
sormuras d356b2b
Fix JAVA_HOME value
sormuras 9bc7138
Restore reproducibility of jar junit-platform-engine jar
marcphilipp c8bb1a0
Use jar --date to make jar files reproducible
marcphilipp 673be2e
Add API annotation to JDK 21 implementation
marcphilipp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 0 additions & 52 deletions
52
gradle/plugins/common/src/main/kotlin/junitbuild.java-repackage-jars.gradle.kts
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,9 @@ abstract class RunConsoleLauncher @Inject constructor(private val execOperations | |
@get:Classpath | ||
abstract val runtimeClasspath: ConfigurableFileCollection | ||
|
||
@get:Input | ||
abstract val jvmArgs: ListProperty<String> | ||
|
||
@get:Input | ||
abstract val args: ListProperty<String> | ||
|
||
|
@@ -62,6 +65,7 @@ abstract class RunConsoleLauncher @Inject constructor(private val execOperations | |
val output = ByteArrayOutputStream() | ||
val result = execOperations.javaexec { | ||
executable = javaLauncher.get().executablePath.asFile.absolutePath | ||
jvmArgs([email protected]()) | ||
classpath = runtimeClasspath | ||
mainClass.set("org.junit.platform.console.ConsoleLauncher") | ||
args([email protected]()) | ||
|
@@ -82,6 +86,12 @@ abstract class RunConsoleLauncher @Inject constructor(private val execOperations | |
result.rethrowFailure().assertNormalExitValue() | ||
} | ||
|
||
@Suppress("unused") | ||
@Option(option = "jvm-args", description = "JVM args for the console launcher") | ||
fun setVMArgs(args: String) { | ||
jvmArgs.set(Commandline.translateCommandline(args).toList()) | ||
} | ||
|
||
@Suppress("unused") | ||
@Option(option = "args", description = "Additional command line arguments for the console launcher") | ||
fun setCliArgs(args: String) { | ||
|
24 changes: 0 additions & 24 deletions
24
gradle/plugins/common/src/main/kotlin/junitbuild/java/ExecJarAction.kt
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
gradle/plugins/common/src/main/kotlin/junitbuild/java/UpdateJarAction.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package junitbuild.java | ||
|
||
import org.gradle.api.Action | ||
import org.gradle.api.Task | ||
import org.gradle.api.internal.file.archive.ZipCopyAction | ||
import org.gradle.api.provider.ListProperty | ||
import org.gradle.api.provider.Property | ||
import org.gradle.api.tasks.bundling.AbstractArchiveTask | ||
import org.gradle.jvm.toolchain.JavaLauncher | ||
import org.gradle.process.ExecOperations | ||
import java.time.Instant | ||
import javax.inject.Inject | ||
|
||
abstract class UpdateJarAction @Inject constructor(private val operations: ExecOperations) : Action<Task> { | ||
|
||
abstract val javaLauncher: Property<JavaLauncher> | ||
|
||
abstract val args: ListProperty<String> | ||
|
||
abstract val date: Property<Instant> | ||
|
||
init { | ||
date.convention(Instant.ofEpochMilli(ZipCopyAction.CONSTANT_TIME_FOR_ZIP_ENTRIES)) | ||
} | ||
|
||
override fun execute(t: Task) { | ||
operations.exec { | ||
executable = javaLauncher.get() | ||
.metadata.installationPath.file("bin/jar").asFile.absolutePath | ||
args = listOf( | ||
"--update", | ||
"--file", (t as AbstractArchiveTask).archiveFile.get().asFile.absolutePath, | ||
"--date=${date.get()}" | ||
) + [email protected]() | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -124,6 +124,8 @@ public final class Constants { | |
@API(status = STABLE, since = "5.10") | ||
public static final String PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME = JupiterConfiguration.PARALLEL_EXECUTION_ENABLED_PROPERTY_NAME; | ||
|
||
public static final String PARALLEL_EXECUTOR_PROPERTY_NAME = JupiterConfiguration.PARALLEL_EXECUTOR_PROPERTY_NAME; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ needs an |
||
|
||
/** | ||
* Property name used to set the default test execution mode: {@value} | ||
* | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.