From e62972b315eae3d25634817508ed2f64e5516052 Mon Sep 17 00:00:00 2001 From: Vlad Rozov Date: Thu, 13 Nov 2025 14:48:02 -0800 Subject: [PATCH] [SPARK-54342][BUILD] Unify scalatest format reports between SBT and maven builds --- pom.xml | 6 +++++- project/SparkBuild.scala | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 92d0f7ad23f9..6dcf787f6a95 100644 --- a/pom.xml +++ b/pom.xml @@ -2892,7 +2892,11 @@ ${project.build.directory}/surefire-reports . - SparkTestSuite.txt + + WDFI SparkTestSuite.txt -ea -Xmx4g -Xss4m -XX:MaxMetaspaceSize=2g -XX:ReservedCodeCacheSize=${CodeCacheSize} ${extraJavaTestArgs} diff --git a/project/SparkBuild.scala b/project/SparkBuild.scala index 94e8f0d9b9a9..38e1858fce8c 100644 --- a/project/SparkBuild.scala +++ b/project/SparkBuild.scala @@ -1883,8 +1883,14 @@ object TestSettings { sys.props.get("test.include.tags").map { tags => Seq("--include-categories=" + tags) }.getOrElse(Nil): _*), - // Show full stack trace and duration in test cases. - (Test / testOptions) += Tests.Argument("-oDF"), + // Show full stack trace (F) and duration (D) in test cases. + (Test / testOptions) += Tests.Argument(TestFrameworks.ScalaTest, "-oDF"), + (Test / testOptions) += Tests.Argument(TestFrameworks.ScalaTest, + // Output scala test result to the same location as maven scala test plugin + "-u", s"${baseDirectory.value}/target/surefire-reports", + // without color (W), show all durations (D), show full stack traces (F), + // show reminder of failed and canceled tests without stack traces (I) + "-fWDFI", s"${baseDirectory.value}/target/surefire-reports/SparkTestSuite.txt"), // Slowpoke notifications: receive notifications every 5 minute of tests that have been running // longer than two minutes. (Test / testOptions) += Tests.Argument(TestFrameworks.ScalaTest, "-W", "120", "300"),