aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-11-02 11:08:28 +0100
committerGuillaume Martres <smarter@ubuntu.com>2016-11-22 01:35:07 +0100
commit8a61ff432543a29234193cd1f7c14abd3f3d31a0 (patch)
treea8147561d307af862c295cfc8100d271063bb0dd /bin
parent6a455fe6da5ff9c741d91279a2dc6fe2fb1b472f (diff)
downloaddotty-8a61ff432543a29234193cd1f7c14abd3f3d31a0.tar.gz
dotty-8a61ff432543a29234193cd1f7c14abd3f3d31a0.tar.bz2
dotty-8a61ff432543a29234193cd1f7c14abd3f3d31a0.zip
Move compiler and compiler tests to compiler dir
Diffstat (limited to 'bin')
-rwxr-xr-xbin/common12
-rw-r--r--bin/test/TestScripts.scala16
2 files changed, 14 insertions, 14 deletions
diff --git a/bin/common b/bin/common
index cbefc33f8..4dd2b5716 100755
--- a/bin/common
+++ b/bin/common
@@ -86,7 +86,7 @@ function build_all {
printf "done\n"
printf "Building dotty-compiler..."
- MAIN_JAR=$(build_jar dotty-compiler/package "target/scala-$SCALA_BINARY_VERSION")
+ MAIN_JAR=$(build_jar dotty-compiler/package "compiler/target/scala-$SCALA_BINARY_VERSION")
printf "done\n"
printf "Building dotty library..."
@@ -94,7 +94,7 @@ function build_all {
printf "done\n"
printf "Building tests..."
- TEST_JAR=$(build_jar test:package "target/scala-$SCALA_BINARY_VERSION" '/dotty.*-tests\.jar/p')
+ TEST_JAR=$(build_jar test:package "compiler/target/scala-$SCALA_BINARY_VERSION" '/dotty.*-tests\.jar/p')
printf "done\n"
update_packages
@@ -130,10 +130,10 @@ function check_jar {
fi
}
-check_jar "dotty-interfaces" $INTERFACES_JAR "interfaces" 'INTERFACES_JAR=$(build_jar dotty-interfaces/package interfaces/target)'
-check_jar "dotty" $MAIN_JAR "src" 'MAIN_JAR=$(build_jar dotty-compiler/package target/scala-$SCALA_BINARY_VERSION)'
-check_jar "dotty-library" $DOTTY_LIB_JAR "library" 'DOTTY_LIB_JAR=$(build_jar dotty-library/package library/target/scala-$SCALA_BINARY_VERSION)'
-check_jar "dotty-tests" $TEST_JAR "test" 'TEST_JAR=$(build_jar test:package target/scala-$SCALA_BINARY_VERSION /dotty.*-tests\.jar/p)'
+check_jar "dotty-interfaces" $INTERFACES_JAR "interfaces/src" 'INTERFACES_JAR=$(build_jar dotty-interfaces/package interfaces/target)'
+check_jar "dotty" $MAIN_JAR "compiler/src" 'MAIN_JAR=$(build_jar dotty-compiler/package compiler/target/scala-$SCALA_BINARY_VERSION)'
+check_jar "dotty-library" $DOTTY_LIB_JAR "library/src" 'DOTTY_LIB_JAR=$(build_jar dotty-library/package library/target/scala-$SCALA_BINARY_VERSION)'
+check_jar "dotty-tests" $TEST_JAR "compiler/test" 'TEST_JAR=$(build_jar dotty-compiler/test:package compiler/target/scala-$SCALA_BINARY_VERSION /dotty.*-tests\.jar/p)'
# Autodetecting the scala-library location, in case it wasn't provided by an environment variable
if [ "$SCALA_LIBRARY_JAR" == "" ]; then
diff --git a/bin/test/TestScripts.scala b/bin/test/TestScripts.scala
index 1a200c1b9..0558c0480 100644
--- a/bin/test/TestScripts.scala
+++ b/bin/test/TestScripts.scala
@@ -28,13 +28,13 @@ class TestScripts {
}
try {
- for (jar <- Source.fromFile("../.packages").getLines())
+ for (jar <- Source.fromFile("./.packages").getLines())
delete(jar)
- delete("../.packages")
- delete("./src/dotty/tools/dotc/Dummy.scala")
- delete("HelloWorld.class")
- delete("HelloWorld$.class")
+ delete("./.packages")
+ delete("./compiler/src/dotty/tools/dotc/Dummy.scala")
+ delete("./HelloWorld.class")
+ delete("./HelloWorld$.class")
} catch {
case _: FileNotFoundException => ()
}
@@ -66,11 +66,11 @@ class TestScripts {
* rebuild dotty if needed
*/
@Test def rebuildIfNecessary = doUnlessWindows {
- val (retFirstBuild, _) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
- assert(retFirstBuild == 0, "building dotc failed")
+ val (retFirstBuild, out1) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
+ assert(retFirstBuild == 0, s"building dotc failed: $out1")
// Create a new file to force rebuild
- new JFile("./src/dotty/tools/dotc/Dummy.scala").createNewFile()
+ new JFile("./compiler/src/dotty/tools/dotc/Dummy.scala").createNewFile()
val (retSecondBuild, output) = executeScript("./bin/dotc ./tests/pos/HelloWorld.scala")
assert(