aboutsummaryrefslogtreecommitdiff
path: root/project/Build.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-11-14 20:04:24 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-11-22 01:35:07 +0100
commit1b19afa6184a0237a803f13e8491bfcb51b7585e (patch)
tree198f5c724e3177f5f98eea89f9a7501908654a17 /project/Build.scala
parentcc56d3d977eab5fa88f0a1b0ced5bd4f99accae9 (diff)
downloaddotty-1b19afa6184a0237a803f13e8491bfcb51b7585e.tar.gz
dotty-1b19afa6184a0237a803f13e8491bfcb51b7585e.tar.bz2
dotty-1b19afa6184a0237a803f13e8491bfcb51b7585e.zip
Run dotty tests with the correct baseDirectory
Before this commit, Build.scala contained: baseDirectory in run := baseDirectory.value / "..", The goal of this line is that when invoking the compiler using `run` or `dotc`, the working directory is the root of the dotty project, which is convenient for testing. However, this line also affects the working directory of `dotty-compiler/runPartestRunner`, but not of `dotty-compiler/test`. The result was that `dotty-compiler/test` was broken, and fixing the paths in the code would break `partest`. We solve this by using a different baseDirectory when running partest.
Diffstat (limited to 'project/Build.scala')
-rw-r--r--project/Build.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/project/Build.scala b/project/Build.scala
index 0f8594556..c241f77bd 100644
--- a/project/Build.scala
+++ b/project/Build.scala
@@ -179,8 +179,10 @@ object DottyBuild extends Build {
) map { case (k, v) => (k, v.getAbsolutePath) }
},
- // Set run baseDir to be root of project, makes dotc saner
- baseDirectory in run := baseDirectory.value / "..",
+ // For convenience, change the baseDirectory when running the compiler
+ baseDirectory in (Compile, run) := baseDirectory.value / "..",
+ // .. but not when running partest
+ baseDirectory in (Test, run) := baseDirectory.value,
repl := Def.inputTaskDyn {
val args: Seq[String] = spaceDelimited("<arg>").parsed