From c249e1a117e55c6362c55ed7f9defb27e96f9c2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Sat, 9 Nov 2024 20:18:14 +0100 Subject: [PATCH] Make e2e tests detect snapshot issues --- build.sbt | 13 +++++-------- .../src/test/scala/playground/e2e/E2ETests.scala | 7 +++---- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/build.sbt b/build.sbt index d04977fb..e3aebfb3 100644 --- a/build.sbt +++ b/build.sbt @@ -232,15 +232,12 @@ lazy val e2e = module("e2e") buildInfoKeys ++= Seq[BuildInfoKey.Entry[_]]( // do you know how to simplify this? let me know please! Def - .task((lsp / Compile / fullClasspath).value.map(_.data).map(_.toString)) + .task { + s"""${(lsp / organization).value}::${(lsp / moduleName).value}:${(lsp / version).value}""" + } + .dependsOn(lsp / publishLocal) .taskValue - .named("lspClassPath"), - Def - .task( - (lsp / Compile / mainClass).value.getOrElse(sys.error("didn't find main class in lsp")) - ) - .taskValue - .named("lspMainClass"), + .named("lspArtifact") ), publish / skip := true, ) diff --git a/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala b/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala index e4440b0a..9592492d 100644 --- a/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala +++ b/modules/e2e/src/test/scala/playground/e2e/E2ETests.scala @@ -74,10 +74,9 @@ object E2ETests extends SimpleIOSuite { val builder = new ProcessBuilder( - "java", - "-cp", - BuildInfo.lspClassPath.mkString(":"), - BuildInfo.lspMainClass, + "cs", + "launch", + BuildInfo.lspArtifact, ) // Watch process stderr in test runner .redirectError(Redirect.INHERIT)