Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2b8f4e1

Browse files
committed
Merge commit '743891dfb1' into merge-2.12-to-2.13-20250415
2 parents f27e08e + 743891d commit 2b8f4e1

File tree

8 files changed

+6
-58
lines changed

8 files changed

+6
-58
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
fail-fast: false
2020
matrix:
2121
os: [ubuntu-latest, windows-latest]
22-
java: [8, 11, 17, 21, 23]
22+
java: [8, 11, 17, 21, 24]
2323
runs-on: ${{matrix.os}}
2424
steps:
2525
- run: git config --global core.autocrlf false

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,8 @@ lazy val testkit = configureAsSubproject(project)
845845
// This is enforced by error (not just by warning) since JDK 16. In our tests we use reflective access
846846
// from the unnamed package (the classpath) to JDK modules in testing utilities like `assertNotReachable`.
847847
// `add-exports=jdk.jdeps/com.sun.tools.javap` is tests that use `:javap` in the REPL, see scala/bug#12378
848-
val addOpensForTesting = "-XX:+IgnoreUnrecognizedVMOptions" +: "--add-exports=jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED" +:
848+
// Also --enable-native-access is needed for jvm/natives.scala
849+
val addOpensForTesting = "-XX:+IgnoreUnrecognizedVMOptions" +: "--add-exports=jdk.jdeps/com.sun.tools.javap=ALL-UNNAMED" +: "--enable-native-access=ALL-UNNAMED" +:
849850
Seq("java.util.concurrent.atomic", "java.lang", "java.lang.reflect", "java.net").map(p => s"--add-opens=java.base/$p=ALL-UNNAMED")
850851

851852
lazy val junit = project.in(file("test") / "junit")
@@ -1091,7 +1092,6 @@ lazy val test = project
10911092
IntegrationTest / fork := true,
10921093
Compile / scalacOptions += "-Yvalidate-pos:parser,typer",
10931094
IntegrationTest / javaOptions ++= List("-Xmx2G", "-Dpartest.exec.in.process=true", "-Dfile.encoding=UTF-8", "-Duser.language=en", "-Duser.country=US") ++ addOpensForTesting,
1094-
IntegrationTest / javaOptions ++= { if (scala.util.Properties.isJavaAtLeast("18")) List("-Djava.security.manager=allow") else Nil },
10951095
IntegrationTest / testOptions += Tests.Argument("-Dfile.encoding=UTF-8", "-Duser.language=en", "-Duser.country=US"),
10961096
testFrameworks += new TestFramework("scala.tools.partest.sbt.Framework"),
10971097
IntegrationTest / testOptions += Tests.Argument(s"-Dpartest.java_opts=-Xmx1024M -Xms64M ${addOpensForTesting.mkString(" ")}"),

src/partest/scala/tools/partest/nest/Runner.scala

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -262,16 +262,8 @@ class Runner(val testInfo: TestInfo, val suiteRunner: AbstractRunner) {
262262
}
263263

264264
pushTranscript(s"<in process execution of $testIdent> > ${logFile.getName}")
265-
266-
@nowarn("cat=deprecation") // JDK 17 deprecates SecurityManager, so TrapExit is deprecated too
267-
val trapExit = TrapExit
268-
269-
trapExit(() => run()) match {
270-
case Left((status, throwable)) if status != 0 =>
271-
genFail("non-zero exit code")
272-
case _ =>
273-
genPass()
274-
}
265+
run()
266+
genPass
275267
}
276268
}
277269

src/partest/scala/tools/partest/nest/TrapExit.scala

Lines changed: 0 additions & 37 deletions
This file was deleted.

test/files/jvm/non-fatal-tests.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,4 @@ trait NonFatalTests {
4242

4343
object Test
4444
extends App
45-
with NonFatalTests {
46-
System.exit(0)
47-
}
45+
with NonFatalTests

test/files/jvm/scala-concurrent-tck-b.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,6 @@ class ReportingExecutionContext extends TestBase {
111111

112112
object Test extends App {
113113
new ReportingExecutionContext
114-
115-
System.exit(0)
116114
}
117115

118116
package scala.concurrent {

test/files/jvm/scala-concurrent-tck.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,4 @@ extends App {
10581058
new GlobalExecutionContext
10591059
new CustomExecutionContext
10601060
new ExecutionContextPrepare
1061-
1062-
System.exit(0)
10631061
}

test/files/presentation/random/src/Random.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ object randomserver {
6464
catch {
6565
case e: IOException =>
6666
System.err.println("Could not listen on port: 9999.");
67-
System.exit(-1)
6867
}
6968
}
7069

0 commit comments

Comments
 (0)