diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-19 03:12:15 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-19 10:49:22 -0800 |
commit | 225ace260f614deb74c8770608c4c9109d336bba (patch) | |
tree | 3d50c0d165e9d5be2ced4760cea4ac487badba46 /scalalib | |
parent | 4e6a81f65413a973223627d406564c2bf4351c1e (diff) | |
download | mill-225ace260f614deb74c8770608c4c9109d336bba.tar.gz mill-225ace260f614deb74c8770608c4c9109d336bba.tar.bz2 mill-225ace260f614deb74c8770608c4c9109d336bba.zip |
Get Travis CI green again after adding Ammonite integration test
Diffstat (limited to 'scalalib')
-rw-r--r-- | scalalib/src/main/scala/mill/scalalib/TestRunner.scala | 38 |
1 files changed, 21 insertions, 17 deletions
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 |