summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2013-07-19 17:33:17 -0700
committerAdriaan Moors <adriaan.moors@typesafe.com>2013-08-20 16:16:02 -0700
commit473a1692abf4d64e5df81cd19be214fe5bfa06ec (patch)
treec5f26f42296e3e585fe211b5a4e93f7c45d3b543 /test
parent738441cf58136bd4af9985886dd0cd38ccda0777 (diff)
downloadscala-473a1692abf4d64e5df81cd19be214fe5bfa06ec.tar.gz
scala-473a1692abf4d64e5df81cd19be214fe5bfa06ec.tar.bz2
scala-473a1692abf4d64e5df81cd19be214fe5bfa06ec.zip
Move partest to https://github.com/scala/scala-partest
As partest is now resolved from maven, `test/partest` uses `ant test.suite.init` to determine the classpath (serialized to build/pack/partest.properties) that's necessary to run `scala.tools.partest.nest.ConsoleRunner`. Thus, partest gets exactly the same classpath, whether run from the command line through `test/partest` or via `ant test`. The version of partest we're using is specified by properties defined in versions.properties (formerly `starr.number`). Currently, we're using: ``` scala.binary.version=2.11.0-M4 partest.version.number=1.0-RC3 ``` NOTES: - The version of Scala being tested must be backwards binary compatible with the version of Scala that was used to compile partest. - Once 2.11 goes final, `scala.binary.version=2.11`, and `starr.version=2.11.0`. - Need scalacheck on classpath for test/partest scalacheck tests. - Removed atrophied ant tests (haven't been run/changed for at least two years I checked 81d659141a as a "random" sample). - Removed scalacheck. It's resolved as a partest dependency. - For now, use a locally built scalap - Kept the trace macro in the main repo (partest-extras) - New targets for faster pr validation: test-core-opt, test-stab-opt - Reused partest eclipse/intellij project to partest-extras (note: the partest dependency is hard-coded)
Diffstat (limited to 'test')
-rwxr-xr-xtest/build-partest.xml8
-rw-r--r--test/files/ant/README42
-rw-r--r--test/files/ant/fsc001-build.check14
-rw-r--r--test/files/ant/fsc001-build.xml26
-rw-r--r--test/files/ant/fsc001.scala7
-rw-r--r--test/files/ant/fsc002-build.check14
-rw-r--r--test/files/ant/fsc002-build.xml28
-rw-r--r--test/files/ant/fsc002.scala6
-rw-r--r--test/files/ant/fsc003-build.check14
-rw-r--r--test/files/ant/fsc003-build.xml25
-rw-r--r--test/files/ant/fsc003.scala7
-rw-r--r--test/files/ant/imported.xml150
-rw-r--r--test/files/ant/scalac001-build.check14
-rw-r--r--test/files/ant/scalac001-build.xml26
-rw-r--r--test/files/ant/scalac001.scala6
-rw-r--r--test/files/ant/scalac002-build.check14
-rw-r--r--test/files/ant/scalac002-build.xml28
-rw-r--r--test/files/ant/scalac002.scala7
-rw-r--r--test/files/ant/scalac003-build.check14
-rw-r--r--test/files/ant/scalac003-build.xml25
-rw-r--r--test/files/ant/scalac003.scala7
-rw-r--r--test/files/ant/scalac004-build.check24
-rw-r--r--test/files/ant/scalac004-build.xml26
-rw-r--r--test/files/ant/scalac004.scala11
-rw-r--r--test/files/ant/scaladoc-build.check15
-rw-r--r--test/files/ant/scaladoc-build.xml26
-rw-r--r--test/files/ant/scaladoc.scala7
-rw-r--r--test/files/lib/scalacheck.jar.desired.sha11
-rw-r--r--test/files/run/t6331b.scala2
-rwxr-xr-xtest/partest57
30 files changed, 37 insertions, 614 deletions
diff --git a/test/build-partest.xml b/test/build-partest.xml
index 44502ffa61..22ad85ac03 100755
--- a/test/build-partest.xml
+++ b/test/build-partest.xml
@@ -7,18 +7,14 @@
<attribute name="srcdir" default="files"/> <!-- TODO: make targets for `pending` and other subdirs -->
<attribute name="colors" default="${partest.colors}"/>
<attribute name="scalacOpts" default="${scalac.args.optimise}"/>
- <attribute name="kinds" default="pos neg run jvm res scalap scalacheck specialized instrumented presentation"/>
+ <attribute name="kinds"/>
<sequential>
<property name="partest.dir" value="@{dir}" />
<partest srcdir="@{srcdir}"
kinds="@{kinds}"
colors="@{colors}"
scalacOpts="@{scalacOpts}"
- compilationpathref="partest.classpath">
- <compilationpath>
- <fileset dir="${partest.dir}/files/lib" includes="*.jar" />
- </compilationpath>
- </partest>
+ compilationpathref="partest.compilation.path"/>
</sequential>
</macrodef>
</project>
diff --git a/test/files/ant/README b/test/files/ant/README
deleted file mode 100644
index 8cd8745970..0000000000
--- a/test/files/ant/README
+++ /dev/null
@@ -1,42 +0,0 @@
-README
-======
-
-Test cases in directory test/files/ant/ are executed by invoking an
-Ant script whose name ends with "build.xml" (eg. "fsc001-build.xml").
-
-The Scala Ant tasks fsc/scalac/scaladoc are instantiated from various
-binaries (quick/pack/latest/installed) and are executed with different
-combinations of Ant attributes/elements:
-
- +---------------------------+--------------------------+
- | Attributes | Nested elements |
-------------+---------------------------+--------------------------+
-fsc001 | srcdir,classpath (1) | compilerarg |
-fsc002 | srcref,classpathref (1) | compilerarg |
-fsc003 | (2) | compilerarg,src,include |
-------------+---------------------------+--------------------------+
-scalac001 | srcdir,classpath (1) | |
-scalac002 | srcref,classpathref (1) | |
-scalac003 | (2) | src,include |
-scalac004 | deprecation,unchecked (3) | |
-------------+---------------------------+--------------------------+
-scaladoc | srcdir,classpathref | |
-------------+---------------------------+--------------------------+
-
-Other attributes:
-(1) includes,destdir
-(2) destdir,classpathref
-(3) srcdir,includes,destdir,classpath
-
-
-The above test cases can also be run from the command prompt using one of
-the following shell commands:
-
-1) For quick/pack/latest binaries (-Dbinary=quick|pack|latest)
-
-$ ant -Dbinary=quick -Dproject.dir=$HOME/workspace/scala -f scalac001-build.xml
-
-2) For installed binaries (-Dbinary=installed)
-
-$ ant -Dbinary=installed -Dinstalled.dir=/opt/scala -f scalac001-build.xml
-
diff --git a/test/files/ant/fsc001-build.check b/test/files/ant/fsc001-build.check
deleted file mode 100644
index b5141f587b..0000000000
--- a/test/files/ant/fsc001-build.check
+++ /dev/null
@@ -1,14 +0,0 @@
-
-quick.init:
-
-pack.init:
-
-latest.init:
-
-installed.init:
-
-init:
-
-build:
- [mkdir] Created dir: [...]/files/ant/fsc001-ant.obj
- [fsc] Compiling 1 source file to [...]/files/ant/fsc001-ant.obj
diff --git a/test/files/ant/fsc001-build.xml b/test/files/ant/fsc001-build.xml
deleted file mode 100644
index 0130f3615c..0000000000
--- a/test/files/ant/fsc001-build.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="fsc001" default="run">
-
- <import file="${basedir}/imported.xml"/>
-
-<!-- ===========================================================================
-BUILD
-============================================================================ -->
-
- <target name="build" depends="init">
- <echo level="verbose" message="build.dir=${build.dir}"/>
- <mkdir dir="${build.dir}"/>
- <pathconvert property="classpath" refid="build.classpath"/>
- <fsc
- srcdir="${source.dir}"
- includes="**/${ant.project.name}*.scala"
- destdir="${build.dir}"
- classpath="${classpath}">
- </fsc>
- <echo level="verbose" message="log.file=${log.file}"/>
- <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
- </target>
-
-</project>
-
diff --git a/test/files/ant/fsc001.scala b/test/files/ant/fsc001.scala
deleted file mode 100644
index 6ede5981ce..0000000000
--- a/test/files/ant/fsc001.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-package test
-
-object Main {
- def main(args: Array[String]) {
- println(args mkString " ")
- }
-}
diff --git a/test/files/ant/fsc002-build.check b/test/files/ant/fsc002-build.check
deleted file mode 100644
index 0c9c30dbfa..0000000000
--- a/test/files/ant/fsc002-build.check
+++ /dev/null
@@ -1,14 +0,0 @@
-
-quick.init:
-
-pack.init:
-
-latest.init:
-
-installed.init:
-
-init:
-
-build:
- [mkdir] Created dir: [...]/files/ant/fsc002-ant.obj
- [fsc] Compiling 1 source file to [...]/files/ant/fsc002-ant.obj
diff --git a/test/files/ant/fsc002-build.xml b/test/files/ant/fsc002-build.xml
deleted file mode 100644
index db91070fa1..0000000000
--- a/test/files/ant/fsc002-build.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="fsc002" default="run">
-
- <import file="${basedir}/imported.xml"/>
-
-<!-- ===========================================================================
-BUILD
-============================================================================ -->
-
- <target name="build" depends="init">
- <echo level="verbose" message="build.dir=${build.dir}"/>
- <mkdir dir="${build.dir}"/>
- <path id="source.ref">
- <pathelement location="${source.dir}"/>
- </path>
- <fsc
- srcref="source.ref"
- includes="**/${ant.project.name}*.scala"
- destdir="${build.dir}"
- classpathref="build.classpath">
- </fsc>
- <echo level="verbose" message="log.file=${log.file}"/>
- <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
- </target>
-
-</project>
-
diff --git a/test/files/ant/fsc002.scala b/test/files/ant/fsc002.scala
deleted file mode 100644
index 47131daac6..0000000000
--- a/test/files/ant/fsc002.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package test
-
-object Main {
- def main(args: Array[String]): Unit =
- Console.println(args.toList)
-}
diff --git a/test/files/ant/fsc003-build.check b/test/files/ant/fsc003-build.check
deleted file mode 100644
index c8c9ed857e..0000000000
--- a/test/files/ant/fsc003-build.check
+++ /dev/null
@@ -1,14 +0,0 @@
-
-quick.init:
-
-pack.init:
-
-latest.init:
-
-installed.init:
-
-init:
-
-build:
- [mkdir] Created dir: [...]/files/ant/fsc003-ant.obj
- [fsc] Compiling 1 source file to [...]/files/ant/fsc003-ant.obj
diff --git a/test/files/ant/fsc003-build.xml b/test/files/ant/fsc003-build.xml
deleted file mode 100644
index 5f71770bf2..0000000000
--- a/test/files/ant/fsc003-build.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="fsc003" default="run">
-
- <import file="${basedir}/imported.xml"/>
-
-<!-- ===========================================================================
-BUILD
-============================================================================ -->
-
- <target name="build" depends="init">
- <echo level="verbose" message="build.dir=${build.dir}"/>
- <mkdir dir="${build.dir}"/>
- <fsc
- destdir="${build.dir}"
- classpathref="build.classpath">
- <src path="${source.dir}"/>
- <include name="**/${ant.project.name}*.scala"/>
- </fsc>
- <echo level="verbose" message="log.file=${log.file}"/>
- <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
- </target>
-
-</project>
-
diff --git a/test/files/ant/fsc003.scala b/test/files/ant/fsc003.scala
deleted file mode 100644
index 6ede5981ce..0000000000
--- a/test/files/ant/fsc003.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-package test
-
-object Main {
- def main(args: Array[String]) {
- println(args mkString " ")
- }
-}
diff --git a/test/files/ant/imported.xml b/test/files/ant/imported.xml
deleted file mode 100644
index 182c80aadf..0000000000
--- a/test/files/ant/imported.xml
+++ /dev/null
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="imported">
-
- <!-- This file is imported by the main Ant script. -->
-
- <!-- Prevents system classpath from being used -->
- <property name="build.sysclasspath" value="ignore"/>
-
-<!-- ===========================================================================
-PROPERTIES
-============================================================================ -->
-
- <property name="source.dir" value="${basedir}"/>
-
- <property file="${basedir}/build.properties"/>
-
- <property name="build.dir" location="${source.dir}/${ant.project.name}-ant.obj"/>
- <property name="log.dir" location="${source.dir}"/>
- <property name="log.file" value="${log.dir}/${ant.project.name}-build-ant.log"/>
- <property name="project.dir" value="../../.."/>
-
- <condition property="quick.binary">
- <equals arg1="${binary}" arg2="quick"/>
- </condition>
- <condition property="pack.binary">
- <equals arg1="${binary}" arg2="pack"/>
- </condition>
- <condition property="latest.binary">
- <equals arg1="${binary}" arg2="latest"/>
- </condition>
- <condition property="installed.binary">
- <equals arg1="${binary}" arg2="installed"/>
- </condition>
-
- <fail message="Property 'binary' must be set to either 'quick', 'pack', 'latest' or 'installed'.">
- <condition><not><or>
- <isset property="quick.binary"/>
- <isset property="pack.binary"/>
- <isset property="latest.binary"/>
- <isset property="installed.binary"/>
- </or></not></condition>
- </fail>
- <echo level="verbose" message="binary=${binary}"/>
- <echo level="verbose" message="build.dir=${build.dir}"/>
-
-<!-- ===========================================================================
-INITIALISATION
-============================================================================ -->
-
- <target name="quick.init" if="quick.binary">
- <property name="quick.dir" value="${project.dir}/build/quick"/>
- <fail message="Quick build could not be found.">
- <condition><not><available file="${quick.dir}"/></not></condition>
- </fail>
- <property name="scala.dir" value="${quick.dir}"/>
- <property name="scala-library.lib" value="${scala.dir}/classes/library/"/>
- <property name="scala-compiler.lib" value="${scala.dir}/classes/compiler/"/>
- </target>
-
- <target name="pack.init" if="pack.binary">
- <property name="pack.dir" value="${project.dir}/build/pack"/>
- <fail message="Pack build could not be found.">
- <condition><not><available file="${pack.dir}"/></not></condition>
- </fail>
- <property name="scala.dir" value="${pack.dir}"/>
- <property name="scala-library.lib" value="${scala.dir}/lib/scala-library.jar"/>
- <property name="scala-compiler.lib" value="${scala.dir}/lib/scala-compiler.jar"/>
- </target>
-
- <target name="latest.init" if="latest.binary">
- <property name="latest.dir" value="${project.dir}/dists/latest"/>
- <fail message="Latest build could not be found.">
- <condition><not><available file="${latest.dir}"/></not></condition>
- </fail>
- <property name="scala.dir" value="${latest.dir}"/>
- <property name="scala-library.lib" value="${scala.dir}/lib/scala-library.jar"/>
- <property name="scala-compiler.lib" value="${scala.dir}/lib/scala-compiler.jar"/>
- </target>
-
- <target name="installed.init" if="installed.binary">
- <property name="installed.dir" value="/opt/scala"/>
- <fail message="Installed distribution could not be found.">
- <condition><not><available file="${installed.dir}"/></not></condition>
- </fail>
- <property name="scala.dir" value="${installed.dir}"/>
- <property name="scala-library.lib" value="${scala.dir}/lib/scala-library.jar"/>
- <property name="scala-compiler.lib" value="${scala.dir}/lib/scala-compiler.jar"/>
- </target>
-
- <target name="init" depends="quick.init, pack.init, latest.init, installed.init">
- <echo level="verbose" message="scala.dir=${scala.dir}"/>
-
- <path id="scala.classpath">
- <pathelement location="${scala-library.lib}"/>
- <pathelement location="${scala-compiler.lib}"/>
- </path>
-
- <fail message="Scala library '${scala-library.lib}' or '${scala-compiler.lib}' is missing/broken">
- <condition><not><and>
- <available classname="scala.Predef"
- classpathref="scala.classpath"/>
- <available classname="scala.Option"
- classpathref="scala.classpath"/>
- <available classname="scala.runtime.ObjectRef"
- classpathref="scala.classpath"/>
- <available classname="scala.tools.ant.Scalac"
- classpathref="scala.classpath"/>
- <available classname="scala.tools.nsc.Main"
- classpathref="scala.classpath"/>
- <available classname="scala.tools.util.StringOps"
- classpathref="scala.classpath"/>
- </and></not></condition>
- </fail>
- <taskdef resource="scala/tools/ant/antlib.xml" classpathref="scala.classpath"/>
-
- <path id="build.classpath">
- <!--<pathelement location="${scala-actors.lib}"/>-->
- <pathelement location="${scala-library.lib}"/>
- <pathelement location="${build.dir}"/>
- </path>
-
- <!-- make sure the log file exists when the Ant build scripts -->
- <!-- are run manually from the command prompt -->
- <touch file="${log.file}"/>
- </target>
-
-<!-- ===========================================================================
-RUN
-============================================================================ -->
-
- <target name="run" depends="build, clean"/>
-
-<!-- ===========================================================================
-CLEAN
-============================================================================ -->
-
- <macrodef name="remove">
- <attribute name="dir"/>
- <sequential>
- <delete dir="@{dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
- </sequential>
- </macrodef>
-
- <target name="clean">
- <remove dir="${build.dir}"/>
- </target>
-
-</project>
-
diff --git a/test/files/ant/scalac001-build.check b/test/files/ant/scalac001-build.check
deleted file mode 100644
index 05a43ba572..0000000000
--- a/test/files/ant/scalac001-build.check
+++ /dev/null
@@ -1,14 +0,0 @@
-
-quick.init:
-
-pack.init:
-
-latest.init:
-
-installed.init:
-
-init:
-
-build:
- [mkdir] Created dir: [...]/files/ant/scalac001-ant.obj
- [scalac] Compiling 1 source file to [...]/files/ant/scalac001-ant.obj
diff --git a/test/files/ant/scalac001-build.xml b/test/files/ant/scalac001-build.xml
deleted file mode 100644
index 4ec7fc833c..0000000000
--- a/test/files/ant/scalac001-build.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="scalac001" default="run">
-
- <import file="${basedir}/imported.xml"/>
-
-<!-- ===========================================================================
-BUILD
-============================================================================ -->
-
- <target name="build" depends="init">
- <echo level="verbose" message="build.dir=${build.dir}"/>
- <mkdir dir="${build.dir}"/>
- <pathconvert property="classpath" refid="build.classpath"/>
- <scalac
- srcdir="${source.dir}"
- includes="**/${ant.project.name}*.scala"
- destdir="${build.dir}"
- classpath="${classpath}"
- />
- <echo level="verbose" message="log.file=${log.file}"/>
- <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
- </target>
-
-</project>
-
diff --git a/test/files/ant/scalac001.scala b/test/files/ant/scalac001.scala
deleted file mode 100644
index 47131daac6..0000000000
--- a/test/files/ant/scalac001.scala
+++ /dev/null
@@ -1,6 +0,0 @@
-package test
-
-object Main {
- def main(args: Array[String]): Unit =
- Console.println(args.toList)
-}
diff --git a/test/files/ant/scalac002-build.check b/test/files/ant/scalac002-build.check
deleted file mode 100644
index e7b3670a0c..0000000000
--- a/test/files/ant/scalac002-build.check
+++ /dev/null
@@ -1,14 +0,0 @@
-
-quick.init:
-
-pack.init:
-
-latest.init:
-
-installed.init:
-
-init:
-
-build:
- [mkdir] Created dir: [...]/files/ant/scalac002-ant.obj
- [scalac] Compiling 1 source file to [...]/files/ant/scalac002-ant.obj
diff --git a/test/files/ant/scalac002-build.xml b/test/files/ant/scalac002-build.xml
deleted file mode 100644
index 07628afa64..0000000000
--- a/test/files/ant/scalac002-build.xml
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="scalac002" default="run">
-
- <import file="${basedir}/imported.xml"/>
-
-<!-- ===========================================================================
-BUILD
-============================================================================ -->
-
- <target name="build" depends="init">
- <echo level="verbose" message="build.dir=${build.dir}"/>
- <mkdir dir="${build.dir}"/>
- <path id="source.ref">
- <pathelement location="${source.dir}"/>
- </path>
- <scalac
- srcref="source.ref"
- includes="**/${ant.project.name}*.scala"
- destdir="${build.dir}"
- classpathref="build.classpath"
- />
- <echo level="verbose" message="log.file=${log.file}"/>
- <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
- </target>
-
-</project>
-
diff --git a/test/files/ant/scalac002.scala b/test/files/ant/scalac002.scala
deleted file mode 100644
index 6ede5981ce..0000000000
--- a/test/files/ant/scalac002.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-package test
-
-object Main {
- def main(args: Array[String]) {
- println(args mkString " ")
- }
-}
diff --git a/test/files/ant/scalac003-build.check b/test/files/ant/scalac003-build.check
deleted file mode 100644
index 7b0d3367ed..0000000000
--- a/test/files/ant/scalac003-build.check
+++ /dev/null
@@ -1,14 +0,0 @@
-
-quick.init:
-
-pack.init:
-
-latest.init:
-
-installed.init:
-
-init:
-
-build:
- [mkdir] Created dir: [...]/files/ant/scalac003-ant.obj
- [scalac] Compiling 1 source file to [...]/files/ant/scalac003-ant.obj
diff --git a/test/files/ant/scalac003-build.xml b/test/files/ant/scalac003-build.xml
deleted file mode 100644
index 1d70aa115e..0000000000
--- a/test/files/ant/scalac003-build.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="scalac003" default="run">
-
- <import file="${basedir}/imported.xml"/>
-
-<!-- ===========================================================================
-BUILD
-============================================================================ -->
-
- <target name="build" depends="init">
- <echo level="verbose" message="build.dir=${build.dir}"/>
- <mkdir dir="${build.dir}"/>
- <scalac
- destdir="${build.dir}"
- classpathref="build.classpath">
- <src path="${source.dir}"/>
- <include name="**/${ant.project.name}*.scala"/>
- </scalac>
- <echo level="verbose" message="log.file=${log.file}"/>
- <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
- </target>
-
-</project>
-
diff --git a/test/files/ant/scalac003.scala b/test/files/ant/scalac003.scala
deleted file mode 100644
index 6ede5981ce..0000000000
--- a/test/files/ant/scalac003.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-package test
-
-object Main {
- def main(args: Array[String]) {
- println(args mkString " ")
- }
-}
diff --git a/test/files/ant/scalac004-build.check b/test/files/ant/scalac004-build.check
deleted file mode 100644
index ffe9e8c79a..0000000000
--- a/test/files/ant/scalac004-build.check
+++ /dev/null
@@ -1,24 +0,0 @@
-
-quick.init:
-
-pack.init:
-
-latest.init:
-
-installed.init:
-
-init:
-
-build:
- [mkdir] Created dir: [...]/files/ant/scalac004-ant.obj
- [scalac] Compiling 1 source file to [...]/files/ant/scalac004-ant.obj
- [scalac] [...]/files/ant/scalac004.scala:9: warning: method exit in object Predef is deprecated: Use sys.exit(status) instead
- [scalac] Predef.exit(0) //deprecated in 2.9.0
- [scalac] ^
- [scalac] [...]/files/ant/scalac004.scala:6: warning: match is not exhaustive!
- [scalac] missing combination Nil
- [scalac]
- [scalac] xs match { //(xs: @unchecked) match {
- [scalac] ^
- [scalac] two warnings found
- [scalac] Compile succeeded with 2 warnings; see the compiler output for details.
diff --git a/test/files/ant/scalac004-build.xml b/test/files/ant/scalac004-build.xml
deleted file mode 100644
index 66c19a39fb..0000000000
--- a/test/files/ant/scalac004-build.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="scalac004" default="run">
-
- <import file="${basedir}/imported.xml"/>
-
-<!-- ===========================================================================
-BUILD
-============================================================================ -->
-
- <target name="build" depends="init">
- <echo level="verbose" message="build.dir=${build.dir}"/>
- <mkdir dir="${build.dir}"/>
- <scalac
- deprecation="yes" unchecked="yes"
- srcdir="${source.dir}"
- includes="**/${ant.project.name}*.scala"
- destdir="${build.dir}"
- classpathref="build.classpath"
- />
- <echo level="verbose" message="log.file=${log.file}"/>
- <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
- </target>
-
-</project>
-
diff --git a/test/files/ant/scalac004.scala b/test/files/ant/scalac004.scala
deleted file mode 100644
index 66b2ba7985..0000000000
--- a/test/files/ant/scalac004.scala
+++ /dev/null
@@ -1,11 +0,0 @@
-package test
-
-object Main {
- def main(args: Array[String]) {
- val xs = List(1, 2, 3, 4)
- xs match { //(xs: @unchecked) match {
- case x::xs => println(x)
- }
- Predef.exit(0) //deprecated in 2.9.0
- }
-}
diff --git a/test/files/ant/scaladoc-build.check b/test/files/ant/scaladoc-build.check
deleted file mode 100644
index 1c82456ad0..0000000000
--- a/test/files/ant/scaladoc-build.check
+++ /dev/null
@@ -1,15 +0,0 @@
-
-quick.init:
-
-pack.init:
-
-latest.init:
-
-installed.init:
-
-init:
-
-build:
- [mkdir] Created dir: [...]/files/ant/scaladoc-ant.obj
- [scaladoc] Documenting 1 source file to [...]/files/ant/scaladoc-ant.obj
- [scaladoc] model contains 3 documentable templates
diff --git a/test/files/ant/scaladoc-build.xml b/test/files/ant/scaladoc-build.xml
deleted file mode 100644
index fb4dc6fe69..0000000000
--- a/test/files/ant/scaladoc-build.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<project name="scaladoc" default="run">
-
- <import file="${basedir}/imported.xml"/>
-
-<!-- ===========================================================================
-BUILD
-============================================================================ -->
-
- <target name="build" depends="init">
- <echo level="verbose" message="build.dir=${build.dir}"/>
- <mkdir dir="${build.dir}"/>
- <scaladoc
- srcdir="${source.dir}"
- includes="**/${ant.project.name}*.scala"
- deprecation="yes" unchecked="yes"
- destdir="${build.dir}"
- classpathref="build.classpath"
- />
- <echo level="verbose" message="log.file=${log.file}"/>
- <replace file="${log.file}" token="${log.dir}" value="[...]/files/ant"/>
- </target>
-
-</project>
-
diff --git a/test/files/ant/scaladoc.scala b/test/files/ant/scaladoc.scala
deleted file mode 100644
index 6ede5981ce..0000000000
--- a/test/files/ant/scaladoc.scala
+++ /dev/null
@@ -1,7 +0,0 @@
-package test
-
-object Main {
- def main(args: Array[String]) {
- println(args mkString " ")
- }
-}
diff --git a/test/files/lib/scalacheck.jar.desired.sha1 b/test/files/lib/scalacheck.jar.desired.sha1
deleted file mode 100644
index 2f15402d18..0000000000
--- a/test/files/lib/scalacheck.jar.desired.sha1
+++ /dev/null
@@ -1 +0,0 @@
-b6f4dbb29f0c2ec1eba682414f60d52fea84f703 *scalacheck.jar
diff --git a/test/files/run/t6331b.scala b/test/files/run/t6331b.scala
index 3e09965ee8..3a560ea64b 100644
--- a/test/files/run/t6331b.scala
+++ b/test/files/run/t6331b.scala
@@ -1,4 +1,4 @@
-import scala.tools.partest.trace
+import scala.tools.partest.Util.trace
import scala.util.control.Exception.allCatch
diff --git a/test/partest b/test/partest
index 8d94facba3..f396459c6d 100755
--- a/test/partest
+++ b/test/partest
@@ -46,29 +46,40 @@ if $cygwin; then
SCALA_HOME=`cygpath --unix "$SCALA_HOME"`
fi
-# Constructing the extension classpath
-EXT_CLASSPATH=""
-if [ -z "$EXT_CLASSPATH" ] ; then
- if [ -f "$SCALA_HOME/lib/scala-partest.jar" ] ; then
- for ext in "$SCALA_HOME"/lib/* ; do
- if [ -z "$EXT_CLASSPATH" ] ; then
- EXT_CLASSPATH="$ext"
- else
- EXT_CLASSPATH="$EXT_CLASSPATH:$ext"
- fi
- done
- elif [ -f "$SCALA_HOME/build/pack/lib/scala-partest.jar" ] ; then
- for lib in `echo "scala-partest scala-library scala-parser-combinators scala-xml scala-reflect scala-compiler diffutils"`; do
- ext="$SCALA_HOME/build/pack/lib/$lib.jar"
- if [ -z "$EXT_CLASSPATH" ] ; then
- EXT_CLASSPATH="$ext"
- else
- EXT_CLASSPATH="$EXT_CLASSPATH:$ext"
- fi
- done
+# Let ant construct the classpath used to run partest (downloading partest from maven if necessary)
+# PARTEST_CLASSPATH=""
+if [ -z "$PARTEST_CLASSPATH" ] ; then
+ if [ ! -f "$SCALA_HOME/build/pack/partest.properties" ] ; then
+ (cd "$SCALA_HOME" && ant -q test.suite.init) # builds pack, downloads partest and writes classpath to build/pack/partest.properties
fi
+
+ PARTEST_CLASSPATH=$( cat "$SCALA_HOME/build/pack/partest.properties" | grep partest.classpath | sed -e 's/\\:/:/g' | cut -f2- -d= )
+
+ # sanity check, disabled to save time
+ # $( javap -classpath $PARTEST_CLASSPATH scala.tools.partest.nest.NestRunner &> /dev/null ) || unset PARTEST_CLASSPATH
fi
+# if [ -z "$PARTEST_CLASSPATH" ] ; then
+# if [ -f "$SCALA_HOME/lib/scala-partest.jar" ] ; then
+# for ext in "$SCALA_HOME"/lib/* ; do
+# if [ -z "$PARTEST_CLASSPATH" ] ; then
+# PARTEST_CLASSPATH="$ext"
+# else
+# PARTEST_CLASSPATH="$PARTEST_CLASSPATH:$ext"
+# fi
+# done
+# elif [ -f "$SCALA_HOME/build/pack/lib/scala-partest.jar" ] ; then
+# for lib in `echo "scala-partest scala-library scala-parser-combinators scala-xml scala-reflect scala-compiler diffutils"`; do
+# ext="$SCALA_HOME/build/pack/lib/$lib.jar"
+# if [ -z "$PARTEST_CLASSPATH" ] ; then
+# PARTEST_CLASSPATH="$ext"
+# else
+# PARTEST_CLASSPATH="$PARTEST_CLASSPATH:$ext"
+# fi
+# done
+# fi
+# fi
+
# Locate a javac command
# Try: JAVA_HOME, sibling to specific JAVACMD, or PATH
# Don't fail if there is no javac, since not all tests require it.
@@ -101,7 +112,7 @@ if $cygwin; then
JAVAC_CMD=`cygpath --$format "$JAVAC_CMD"`
fi
SCALA_HOME=`cygpath --$format "$SCALA_HOME"`
- EXT_CLASSPATH=`cygpath --path --$format "$EXT_CLASSPATH"`
+ PARTEST_CLASSPATH=`cygpath --path --$format "$PARTEST_CLASSPATH"`
fi
# last arg wins, so if JAVA_OPTS already contains -Xmx or -Xms the
@@ -123,7 +134,7 @@ fi
# be quoted: otherwise an empty string will appear as a command line
# argument, and java will think that is the program to run.
"${JAVACMD:=java}" \
- $JAVA_OPTS -cp "$EXT_CLASSPATH" \
+ $JAVA_OPTS -cp "$PARTEST_CLASSPATH" \
${partestDebugStr} \
${color_opts} \
-Dfile.encoding=UTF-8 \
@@ -132,4 +143,4 @@ fi
-Dpartest.java_opts="${JAVA_OPTS}" \
-Dpartest.scalac_opts="${SCALAC_OPTS}" \
-Dpartest.javac_cmd="${JAVAC_CMD}" \
- scala.tools.partest.nest.NestRunner "$@"
+ scala.tools.partest.nest.ConsoleRunner "$@"