From 8a61ff432543a29234193cd1f7c14abd3f3d31a0 Mon Sep 17 00:00:00 2001 From: Felix Mulder Date: Wed, 2 Nov 2016 11:08:28 +0100 Subject: Move compiler and compiler tests to compiler dir --- bin/common | 12 ++++++------ bin/test/TestScripts.scala | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'bin') 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( -- cgit v1.2.3