aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotc
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-11-24 13:09:28 +0100
committerGitHub <noreply@github.com>2016-11-24 13:09:28 +0100
commit3599c243c86ae0a926ef45a435d38b7878dc322f (patch)
tree652ba7ea49bd791149bef5d51439d4d671e14c09 /compiler/test/dotc
parente0439545c598478a9c619ae704d7859f866e0664 (diff)
parent2f1a7946c01f3f08d4354465e6890c4214faf328 (diff)
downloaddotty-3599c243c86ae0a926ef45a435d38b7878dc322f.tar.gz
dotty-3599c243c86ae0a926ef45a435d38b7878dc322f.tar.bz2
dotty-3599c243c86ae0a926ef45a435d38b7878dc322f.zip
Merge pull request #1739 from dotty-staging/topic/environmentally-friendly-tests
Environmentally friendly tests
Diffstat (limited to 'compiler/test/dotc')
-rw-r--r--compiler/test/dotc/tests.scala27
1 files changed, 20 insertions, 7 deletions
diff --git a/compiler/test/dotc/tests.scala b/compiler/test/dotc/tests.scala
index a3946947c..827e1addd 100644
--- a/compiler/test/dotc/tests.scala
+++ b/compiler/test/dotc/tests.scala
@@ -1,5 +1,6 @@
package dotc
+import dotty.Jars
import dotty.tools.dotc.CompilerTest
import org.junit.{Before, Test}
@@ -32,18 +33,28 @@ class tests extends CompilerTest {
)
val classPath = {
- val paths = List(
- "../library/target/scala-2.11/dotty-library_2.11-0.1-SNAPSHOT.jar",
- "./target/scala-2.11/dotty-compiler_2.11-0.1-SNAPSHOT.jar",
- "../interfaces/target/dotty-interfaces-0.1-SNAPSHOT.jar"
- ).map { p =>
+ val paths = Jars.dottyTestDeps map { p =>
val file = new JFile(p)
assert(
file.exists,
- s"""File "$p" couldn't be found. Run `packageAll` from build tool before testing"""
+ s"""|File "$p" couldn't be found. Run `packageAll` from build tool before
+ |testing.
+ |
+ |If running without sbt, test paths need to be setup environment variables:
+ |
+ | - DOTTY_LIBRARY
+ | - DOTTY_COMPILER
+ | - DOTTY_INTERFACES
+ | - DOTTY_EXTRAS
+ |
+ |Where these all contain locations, except extras which is a colon
+ |separated list of jars.
+ |
+ |When compiling with eclipse, you need the sbt-interfaces jar, put
+ |it in extras."""
)
file.getAbsolutePath
- }.mkString(":")
+ } mkString (":")
List("-classpath", paths)
}
@@ -342,6 +353,8 @@ class tests extends CompilerTest {
// first compile dotty
compileDir(dottyDir, ".", List("-deep", "-Ycheck-reentrant", "-strict"))(allowDeepSubtypes)
+ compileDir(libDir, "dotty", "-deep" :: opt)
+ compileDir(libDir, "scala", "-deep" :: opt)
compileDir(dottyDir, "tools", opt)
compileDir(toolsDir, "dotc", opt)
compileDir(dotcDir, "ast", opt)