diff --git a/.github/scripts/run/run-its.sh b/.github/scripts/run/run-its.sh index 41206f1e7..09fc728a9 100755 --- a/.github/scripts/run/run-its.sh +++ b/.github/scripts/run/run-its.sh @@ -22,16 +22,17 @@ trap "jps -mlv" EXIT if [ "$(expr substr $(uname -s) 1 5 2>/dev/null)" == "MINGW" ]; then ./mill -i show "scala.integration.test.testCommand" "almond.integration.KernelTestsTwoStepStartup212.*" > test-args-212.json + ./mill -i show "scala.integration.test.testCommand" "almond.integration.KernelTestsTwoStepStartup213.*" > test-args-213.json + ./mill -i show "scala.integration.test.testCommand" "almond.integration.KernelTestsTwoStepStartup3.*" > test-args-3.json + cat test-args-212.json "$RUN_APP" test-args-212.json checkResults - ./mill -i show "scala.integration.test.testCommand" "almond.integration.KernelTestsTwoStepStartup213.*" > test-args-213.json cat test-args-213.json "$RUN_APP" test-args-213.json checkResults - ./mill -i show "scala.integration.test.testCommand" "almond.integration.KernelTestsTwoStepStartup3.*" > test-args-3.json cat test-args-3.json "$RUN_APP" test-args-3.json checkResults diff --git a/modules/scala/integration/src/test/scala/almond/integration/KernelTestsTwoStepStartup213.scala b/modules/scala/integration/src/test/scala/almond/integration/KernelTestsTwoStepStartup213.scala index c4b8ba50b..7b5f28ea9 100644 --- a/modules/scala/integration/src/test/scala/almond/integration/KernelTestsTwoStepStartup213.scala +++ b/modules/scala/integration/src/test/scala/almond/integration/KernelTestsTwoStepStartup213.scala @@ -2,6 +2,8 @@ package almond.integration import almond.testkit.Dsl._ +import scala.util.Properties + class KernelTestsTwoStepStartup213 extends KernelTestsDefinitions { lazy val kernelLauncher = @@ -233,7 +235,10 @@ class KernelTestsTwoStepStartup213 extends KernelTestsDefinitions { |} |""".stripMargin - val directivesHandler = tmpDir / "handle-spark-directives" + val directivesHandler = { + val ext = if (Properties.isWin) ".bat" else "" + tmpDir / s"handle-spark-directives$ext" + } os.write(tmpDir / "Handler.scala", handlerCode) diff --git a/modules/shared/test-kit/src/main/scala/almond/testkit/Dsl.scala b/modules/shared/test-kit/src/main/scala/almond/testkit/Dsl.scala index cd75f7eaa..e5b09f68d 100644 --- a/modules/shared/test-kit/src/main/scala/almond/testkit/Dsl.scala +++ b/modules/shared/test-kit/src/main/scala/almond/testkit/Dsl.scala @@ -196,8 +196,10 @@ object Dsl { .map(s => if (trimReplyLines) s.trimLines else s) if (Properties.isWin) { expect(replies.length == Option(reply).toVector.length) - val obtainedReplyLines = replies.headOption.iterator.flatMap(_.linesIterator).toVector - val expectedReplyLines = Option(reply).iterator.flatMap(_.linesIterator).toVector + val obtainedReplyLines = + replies.headOption.iterator.flatMap(_.linesIterator).filter(_.nonEmpty).toVector + val expectedReplyLines = + Option(reply).iterator.flatMap(_.linesIterator).filter(_.nonEmpty).toVector if (obtainedReplyLines != expectedReplyLines) { pprint.err.log(obtainedReplyLines) pprint.err.log(expectedReplyLines) diff --git a/project/settings.sc b/project/settings.sc index c5a01fc29..81add5b0b 100644 --- a/project/settings.sc +++ b/project/settings.sc @@ -732,6 +732,8 @@ trait TestCommand extends TestModule { else forkArgs() -> Map() + os.remove(outputPath) + val testArgs = TestRunner.TestArgs( framework = testFramework(), classpath = runClasspath().map(_.path.toString()),