summaryrefslogtreecommitdiff
path: root/integration
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-01-21 23:35:52 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-01-21 23:35:52 -0800
commit4a0658da074bc7b7df0c5bdff90e2c6bb1977b15 (patch)
tree59d077d40a7e96b419161f5b10cb17d326a51f9f /integration
parent3e80ade3249bc83b564d7b5bd31853c8affd555d (diff)
downloadmill-4a0658da074bc7b7df0c5bdff90e2c6bb1977b15.tar.gz
mill-4a0658da074bc7b7df0c5bdff90e2c6bb1977b15.tar.bz2
mill-4a0658da074bc7b7df0c5bdff90e2c6bb1977b15.zip
- Make `forkTest` and `forkRun` the default, renaming `test` and `run` to `testLocal` and `runLocal`
- Support passing `forkEnv` parameters to `test` and `run`, necessary to get Ammonite working - Standardize signatures of `Jvm.interactiveSubprocess`/`Jvm.subprocess` - `Jvm.inprocess` is now `Jvm.runLocal` - Swap `TestModule.testLocal` over to using `Jvm.runLocal`, for consistency with everything else
Diffstat (limited to 'integration')
-rw-r--r--integration/test/resources/ammonite/build.sc13
1 files changed, 9 insertions, 4 deletions
diff --git a/integration/test/resources/ammonite/build.sc b/integration/test/resources/ammonite/build.sc
index cb8d32ab..ebc264d4 100644
--- a/integration/test/resources/ammonite/build.sc
+++ b/integration/test/resources/ammonite/build.sc
@@ -26,7 +26,7 @@ object terminal extends Cross[TerminalModule](binCrossScalaVersions:_*)
class TerminalModule(val crossScalaVersion: String) extends AmmModule{
def ivyDeps = Agg(
ivy"com.lihaoyi::sourcecode:0.1.3",
- ivy"com.lihaoyi::fansi:0.2.3"
+ ivy"com.lihaoyi::fansi:0.2.4"
)
def compileIvyDeps = Agg(
ivy"org.scala-lang:scala-reflect:$crossScalaVersion"
@@ -141,9 +141,10 @@ class ShellModule(val crossScalaVersion: String) extends AmmModule{
def moduleDeps = Seq(ops(), amm())
object test extends Tests{
def moduleDeps = super.moduleDeps ++ Seq(amm.repl().test)
- // (test in Test) := (test in Test).dependsOn(packageBin in Compile).value,
- // (run in Test) := (run in Test).dependsOn(packageBin in Compile).evaluated,
- // (testOnly in Test) := (testOnly in Test).dependsOn(packageBin in Compile).evaluated
+ def forkEnv = super.forkEnv() ++ Seq(
+ "AMMONITE_TEST_SHELL" -> shell().jar().path.toString,
+ "AMMONITE_TEST_ASSEMBLY" -> amm().assembly().path.toString
+ )
}
}
object integration extends Cross[IntegrationModule](fullCrossScalaVersions:_*)
@@ -155,6 +156,10 @@ class IntegrationModule(val crossScalaVersion: String) extends AmmModule{
// (console in Test) := (console in Test).dependsOn(integrationTasks:_*).value,
// initialCommands in (Test, console) := "ammonite.integration.Main.main(null)"
object test extends Tests {
+ def forkEnv = super.forkEnv() ++ Seq(
+ "AMMONITE_TEST_SHELL" -> shell().jar().path.toString,
+ "AMMONITE_TEST_ASSEMBLY" -> amm().assembly().path.toString
+ )
}
}