diff options
Diffstat (limited to 'main/test')
-rw-r--r-- | main/test/src/main/ClientServerTests.scala | 6 | ||||
-rw-r--r-- | main/test/src/util/ScriptTestSuite.scala | 15 | ||||
-rw-r--r-- | main/test/src/util/TestEvaluator.scala | 4 |
3 files changed, 19 insertions, 6 deletions
diff --git a/main/test/src/main/ClientServerTests.scala b/main/test/src/main/ClientServerTests.scala index 05238a5f..6d918b30 100644 --- a/main/test/src/main/ClientServerTests.scala +++ b/main/test/src/main/ClientServerTests.scala @@ -13,7 +13,8 @@ class EchoServer extends MillServerMain[Int]{ stdout: PrintStream, stderr: PrintStream, env: Map[String, String], - setIdle: Boolean => Unit) = { + setIdle: Boolean => Unit, + systemProperties: Map[String, String]) = { val reader = new BufferedReader(new InputStreamReader(stdin)) val str = reader.readLine() @@ -23,6 +24,9 @@ class EchoServer extends MillServerMain[Int]{ env.toSeq.sortBy(_._1).foreach{ case (key, value) => stdout.println(s"$key=$value") } + systemProperties.toSeq.sortBy(_._1).foreach{ + case (key, value) => stdout.println(s"$key=$value") + } stdout.flush() if (args.nonEmpty){ stderr.println(str.toUpperCase + args(0)) diff --git a/main/test/src/util/ScriptTestSuite.scala b/main/test/src/util/ScriptTestSuite.scala index 92f57c4f..b15541f3 100644 --- a/main/test/src/util/ScriptTestSuite.scala +++ b/main/test/src/util/ScriptTestSuite.scala @@ -16,10 +16,19 @@ abstract class ScriptTestSuite(fork: Boolean) extends TestSuite{ val disableTicker = false val debugLog = false val keepGoing = false + val systemProperties = Map[String, String]() lazy val runner = new mill.main.MainRunner( - ammonite.main.Cli.Config(wd = wd), disableTicker, - stdOutErr, stdOutErr, stdIn, None, Map.empty, - b => (), debugLog, keepGoing = keepGoing + config = ammonite.main.Cli.Config(wd = wd), + disableTicker = disableTicker, + outprintStream = stdOutErr, + errPrintStream = stdOutErr, + stdIn = stdIn, + stateCache0 = None, + env = Map.empty, + setIdle = b => (), + debugLog = debugLog, + keepGoing = keepGoing, + systemProperties = systemProperties ) def eval(s: String*) = { if (!fork) runner.runScript(workspacePath / buildPath , s.toList) diff --git a/main/test/src/util/TestEvaluator.scala b/main/test/src/util/TestEvaluator.scala index 97be20be..45bc41d9 100644 --- a/main/test/src/util/TestEvaluator.scala +++ b/main/test/src/util/TestEvaluator.scala @@ -12,12 +12,12 @@ object TestEvaluator{ val externalOutPath = os.pwd / 'target / 'external - def static(module: TestUtil.BaseModule)(implicit fullName: sourcecode.FullName) = { + def static(module: => TestUtil.BaseModule)(implicit fullName: sourcecode.FullName) = { new TestEvaluator(module)(fullName, TestPath(Nil)) } } -class TestEvaluator(module: TestUtil.BaseModule, failFast: Boolean = false) +class TestEvaluator(module: => TestUtil.BaseModule, failFast: Boolean = false) (implicit fullName: sourcecode.FullName, tp: TestPath){ val outPath = TestUtil.getOutPath() |