Skip to content

Commit 156a6dc

Browse files
committed
refactor(test): add in customizable targetRoot
1 parent 2d1ca93 commit 156a6dc

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

tests/buildTools/src/test/scala/tests/BaseBuildToolSuite.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,16 @@ abstract class BaseBuildToolSuite extends MopedSuite(ScipJava.app) {
5757
extraArguments: List[String] = Nil,
5858
expectedError: Option[String => Unit] = None,
5959
expectedPackages: String = "",
60-
initCommand: => List[String] = Nil
60+
initCommand: => List[String] = Nil,
61+
targetRoot: Option[String] = None
6162
): Unit = {
6263
test(options.withTags(options.tags ++ tags)) {
6364
if (initCommand.nonEmpty) {
6465
os.proc(Shellable(initCommand)).call(os.Path(workingDirectory))
6566
}
6667
FileLayout.fromString(original, root = workingDirectory)
67-
val targetroot = workingDirectory.resolve("targetroot")
68+
val targetroot = workingDirectory
69+
.resolve(targetRoot.getOrElse("targetroot"))
6870
val arguments =
6971
List[String](
7072
"index",

tests/buildTools/src/test/scala/tests/MillBuildToolSuite.scala

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,15 @@ class MillBuildToolSuite extends BaseBuildToolSuite {
5353
|""".stripMargin,
5454
expectedSemanticdbFiles = 2,
5555
expectedPackages =
56-
"""|maven:munit:munit:1.0.0-M6
56+
"""|maven:junit:junit:4.13.2
57+
|maven:org.hamcrest:hamcrest-core:1.3
58+
|maven:org.scala-lang:scala-library:2.13.8
59+
|maven:org.scala-sbt:test-interface:1.0
60+
|maven:org.scalameta:junit-interface:1.0.0-M6
61+
|maven:org.scalameta:munit_2.13:1.0.0-M6
5762
|""".stripMargin,
58-
initCommand = setupMill()
63+
initCommand = setupMill(),
64+
targetRoot = Some("out/io/kipp/mill/scip/Scip/generate.dest")
5965
)
6066
}
6167
}

0 commit comments

Comments
 (0)