Skip to content

Commit eb78237

Browse files
committed
Revert "Revert "[SPARK-32253][INFRA] Show errors only for the sbt tests of github actions""
This reverts commit 5e79db6.
1 parent 5e79db6 commit eb78237

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

dev/run-tests.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,9 @@ def main():
653653
# If we're running the tests in Github Actions, attempt to detect and test
654654
# only the affected modules.
655655
if test_env == "github_actions":
656+
# Set the log level of sbt as ERROR to make the output more readable.
657+
if build_tool == "sbt":
658+
extra_profiles.append("--error")
656659
if os.environ["GITHUB_BASE_REF"] != "":
657660
# Pull requests
658661
changed_files = identify_changed_files_from_git_commits(

project/SparkBuild.scala

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,13 @@ object TestSettings {
10311031
}.getOrElse(Nil): _*),
10321032
// Show full stack trace and duration in test cases.
10331033
testOptions in Test += Tests.Argument("-oDF"),
1034+
// Show only the failed test cases with full stack traces in github action to make the log more
1035+
// readable.
1036+
// Check https://www.scalatest.org/user_guide/using_the_runner for the details of options .
1037+
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest,
1038+
sys.env.get("GITHUB_ACTIONS").map { _ =>
1039+
Seq("-eNCXEHLOPQMDF")
1040+
}.getOrElse(Nil): _*),
10341041
testOptions in Test += Tests.Argument(TestFrameworks.JUnit, "-v", "-a"),
10351042
// Enable Junit testing.
10361043
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test",

0 commit comments

Comments
 (0)