From 225ace260f614deb74c8770608c4c9109d336bba Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Fri, 19 Jan 2018 03:12:15 -0800 Subject: Get Travis CI green again after adding Ammonite integration test --- .../src/main/scala/mill/scalalib/TestRunner.scala | 38 ++++++++++++---------- 1 file changed, 21 insertions(+), 17 deletions(-) (limited to 'scalalib/src') diff --git a/scalalib/src/main/scala/mill/scalalib/TestRunner.scala b/scalalib/src/main/scala/mill/scalalib/TestRunner.scala index fa387eef..01726022 100644 --- a/scalalib/src/main/scala/mill/scalalib/TestRunner.scala +++ b/scalalib/src/main/scala/mill/scalalib/TestRunner.scala @@ -48,23 +48,27 @@ object TestRunner { testClasses } def main(args: Array[String]): Unit = { - val result = apply( - frameworkName = args(0), - entireClasspath = Agg.from(args(1).split(" ").map(Path(_))), - testClassfilePath = Agg.from(args(2).split(" ").map(Path(_))), - args = args(3) match{ case "" => Nil case x => x.split(" ").toList } - )(new PrintLogger( - args(5) == "true", - if(args(5) == "true") Colors.Default - else Colors.BlackWhite, - System.out, - System.err, - System.err - )) - val outputPath = args(4) - - ammonite.ops.write(Path(outputPath), upickle.default.write(result)) - + try{ + val result = apply( + frameworkName = args(0), + entireClasspath = Agg.from(args(1).split(" ").map(Path(_))), + testClassfilePath = Agg.from(args(2).split(" ").map(Path(_))), + args = args(3) match{ case "" => Nil case x => x.split(" ").toList } + )(new PrintLogger( + args(5) == "true", + if(args(5) == "true") Colors.Default + else Colors.BlackWhite, + System.out, + System.err, + System.err + )) + val outputPath = args(4) + + ammonite.ops.write(Path(outputPath), upickle.default.write(result)) + }catch{case e: Throwable => + println(e) + e.printStackTrace() + } // Tests are over, kill the JVM whether or not anyone's threads are still running // Always return 0, even if tests fail. The caller can pick up the detailed test // results from the outputPath -- cgit v1.2.3