aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/Jars.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-01-11 04:05:49 +0100
committerGuillaume Martres <smarter@ubuntu.com>2017-01-27 13:54:28 +0100
commit6419a0668b3d4e0bfd42f9a1f69fde66a3944fd6 (patch)
tree3ca3707efda30a7d5196449ba45833bd84b83d90 /compiler/test/dotty/Jars.scala
parent0c97f764fec6881abc812e0066cdebb3e0c6ce8a (diff)
downloaddotty-6419a0668b3d4e0bfd42f9a1f69fde66a3944fd6.tar.gz
dotty-6419a0668b3d4e0bfd42f9a1f69fde66a3944fd6.tar.bz2
dotty-6419a0668b3d4e0bfd42f9a1f69fde66a3944fd6.zip
Do not hardcode jars path in the tests, instead get them from sbt
This is necessary to run the tests with the bootstrapped projects and is just much better than hardcoding them anyway.
Diffstat (limited to 'compiler/test/dotty/Jars.scala')
-rw-r--r--compiler/test/dotty/Jars.scala20
1 files changed, 9 insertions, 11 deletions
diff --git a/compiler/test/dotty/Jars.scala b/compiler/test/dotty/Jars.scala
index 6fc9b0fde..f062f8b25 100644
--- a/compiler/test/dotty/Jars.scala
+++ b/compiler/test/dotty/Jars.scala
@@ -1,20 +1,18 @@
package dotty
-/** Jars used when compiling test, defaults to sbt locations */
+/** Jars used when compiling test, normally set from the sbt build */
object Jars {
- val dottyLib: String = sys.env.get("DOTTY_LIB") getOrElse {
- "../library/target/scala-2.11/dotty-library_2.11-0.1.1-SNAPSHOT.jar"
- }
+ val dottyLib: String = sys.env.get("DOTTY_LIB")
+ .getOrElse(sys.props("dotty.tests.classes.library"))
- val dottyCompiler: String = sys.env.get("DOTTY_COMPILER") getOrElse {
- "./target/scala-2.11/dotty-compiler_2.11-0.1.1-SNAPSHOT.jar"
- }
+ val dottyCompiler: String = sys.env.get("DOTTY_COMPILER")
+ .getOrElse(sys.props("dotty.tests.classes.compiler"))
- val dottyInterfaces: String = sys.env.get("DOTTY_INTERFACE") getOrElse {
- "../interfaces/target/dotty-interfaces-0.1.1-SNAPSHOT.jar"
- }
+ val dottyInterfaces: String = sys.env.get("DOTTY_INTERFACE")
+ .getOrElse(sys.props("dotty.tests.classes.interfaces"))
- val dottyExtras: List[String] = sys.env.get("DOTTY_EXTRAS")
+ val dottyExtras: List[String] = Option(sys.env.get("DOTTY_EXTRAS")
+ .getOrElse(sys.props("dotty.tests.extraclasspath")))
.map(_.split(":").toList).getOrElse(Nil)
val dottyReplDeps: List[String] = dottyLib :: dottyExtras