diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2017-04-06 13:46:29 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2017-04-12 11:31:14 +0200 |
commit | 07fab41be7d24e790cd37f625f3d7a10363c45ff (patch) | |
tree | 158a1429c35fb3e77c29adc2b6b73001fc37d89d /compiler/test/dotty/Jars.scala | |
parent | 1fced2bb8d684cc56672e84b2e164716c92a21b9 (diff) | |
download | dotty-07fab41be7d24e790cd37f625f3d7a10363c45ff.tar.gz dotty-07fab41be7d24e790cd37f625f3d7a10363c45ff.tar.bz2 dotty-07fab41be7d24e790cd37f625f3d7a10363c45ff.zip |
Add `Properties` object for dotty testing props and env
Diffstat (limited to 'compiler/test/dotty/Jars.scala')
-rw-r--r-- | compiler/test/dotty/Jars.scala | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/compiler/test/dotty/Jars.scala b/compiler/test/dotty/Jars.scala index 06df9c891..bc000fced 100644 --- a/compiler/test/dotty/Jars.scala +++ b/compiler/test/dotty/Jars.scala @@ -2,25 +2,34 @@ package dotty /** Jars used when compiling test, normally set from the sbt build */ object Jars { + /** Dotty library Jar */ val dottyLib: String = sys.env.get("DOTTY_LIB") - .getOrElse(sys.props("dotty.tests.classes.library")) + .getOrElse(Properties.dottyLib) + /** Dotty Compiler Jar */ val dottyCompiler: String = sys.env.get("DOTTY_COMPILER") - .getOrElse(sys.props("dotty.tests.classes.compiler")) + .getOrElse(Properties.dottyCompiler) + /** Dotty Interfaces Jar */ val dottyInterfaces: String = sys.env.get("DOTTY_INTERFACE") - .getOrElse(sys.props("dotty.tests.classes.interfaces")) + .getOrElse(Properties.dottyInterfaces) - val dottyExtras: List[String] = Option(sys.env.get("DOTTY_EXTRAS") - .getOrElse(sys.props("dotty.tests.extraclasspath"))) - .map(_.split(":").toList).getOrElse(Nil) + /** Dotty extras classpath from env or properties */ + val dottyExtras: List[String] = sys.env.get("DOTTY_EXTRAS") + .map(_.split(":").toList).getOrElse(Properties.dottyExtras) + /** Dotty REPL dependencies */ val dottyReplDeps: List[String] = dottyLib :: dottyExtras + /** Dotty test dependencies */ val dottyTestDeps: List[String] = dottyLib :: dottyCompiler :: dottyInterfaces :: dottyExtras - + /** Gets the scala 2.* library at runtime, note that doing this is unsafe + * unless you know that the library will be on the classpath of the running + * application. It is currently safe to call this function if the tests are + * run by sbt. + */ def scalaLibraryFromRuntime: String = findJarFromRuntime("scala-library-2.") private def findJarFromRuntime(partialName: String) = { @@ -31,5 +40,4 @@ object Jars { ) } } - } |