Skip to content

Commit

Permalink
fix integration.feature[bsp-server] tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bishabosha committed Oct 18, 2024
1 parent 27612d1 commit c466f2f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,22 @@
"dataKind": "scala",
"data": {
"scalaOrganization": "org.scala-lang",
"scalaVersion": "<scala-version>",
"scalaBinaryVersion": "2.13",
"scalaVersion": "<scala3-version>",
"scalaBinaryVersion": "3",
"platform": 1,
"jars": [
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler/<scala-version>/scala-compiler-<scala-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/<scala-version>/scala-reflect-<scala-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala-library/<scala-version>/scala-library-<scala-version>.jar"
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/<scala3-version>/scala3-compiler_3-<scala3-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala3-library_3/<scala3-version>/scala3-library_3-<scala3-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala3-interfaces/<scala3-version>/scala3-interfaces-<scala3-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/tasty-core_3/<scala3-version>/tasty-core_3-<scala3-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-asm/<scala-asm-version>/scala-asm-<scala-asm-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-sbt/compiler-interface/<compiler-interface-version>/compiler-interface-<compiler-interface-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/jline/jline-reader/<jline-reader-version>/jline-reader-<jline-reader-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/jline/jline-terminal/<jline-terminal-version>/jline-terminal-<jline-terminal-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/jline/jline-terminal-jna/<jline-terminal-jna-version>/jline-terminal-jna-<jline-terminal-jna-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-lang/scala-library/<scala-version>/scala-library-<scala-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/scala-sbt/util-interface/<util-interface-version>/util-interface-<util-interface-version>.jar",
"file:///coursier-cache/https/repo1.maven.org/maven2/org/jline/jline-native/<jline-native-version>/jline-native-<jline-native-version>.jar"
],
"jvmBuildTarget": {
"javaHome": "file:///java-home/",
Expand All @@ -151,4 +160,4 @@
}
}
]
}
}
21 changes: 16 additions & 5 deletions integration/ide/bsp-server/src/BspServerTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,21 @@ object BspServerTests extends UtestIntegrationTestSuite {
workspacePath,
millTestSuiteEnv
) { (buildServer, initRes) =>
val scalaVersion = sys.props.getOrElse("TEST_SCALA_2_13_VERSION", ???)
val scalaTransitiveSubstitutions = transitiveDependenciesSubstitutions(
val scala2Version = sys.props.getOrElse("TEST_SCALA_2_13_VERSION", ???)
val scala3Version = sys.props.getOrElse("MILL_SCALA_3_NEXT_VERSION", ???)
val scala2TransitiveSubstitutions = transitiveDependenciesSubstitutions(
coursierapi.Dependency.of(
"org.scala-lang",
"scala-compiler",
scalaVersion
scala2Version
),
_.getModule.getOrganization != "org.scala-lang"
)
val scala3TransitiveSubstitutions = transitiveDependenciesSubstitutions(
coursierapi.Dependency.of(
"org.scala-lang",
"scala3-compiler_3",
scala3Version
),
_.getModule.getOrganization != "org.scala-lang"
)
Expand All @@ -71,10 +80,12 @@ object BspServerTests extends UtestIntegrationTestSuite {
)

val normalizedLocalValues = normalizeLocalValuesForTesting(workspacePath) ++
scalaTransitiveSubstitutions ++
scala2TransitiveSubstitutions ++
scala3TransitiveSubstitutions ++
kotlinTransitiveSubstitutions ++
Seq(
scalaVersion -> "<scala-version>",
scala2Version -> "<scala-version>",
scala3Version -> "<scala3-version>",
kotlinVersion -> "<kotlin-version>"
)

Expand Down

0 comments on commit c466f2f

Please sign in to comment.