summaryrefslogtreecommitdiff
path: root/src/partest
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-07-01 15:27:40 +0000
committerPaul Phillips <paulp@improving.org>2011-07-01 15:27:40 +0000
commit3c5f893b78e5cfc7d0124cece34daea257e649ff (patch)
tree1dedcbab9fb6c415afdf7aff2a2cd08f80786cbb /src/partest
parent60085c5cf8c6fd2cb8ee04f049798f389cf5db6a (diff)
downloadscala-3c5f893b78e5cfc7d0124cece34daea257e649ff.tar.gz
scala-3c5f893b78e5cfc7d0124cece34daea257e649ff.tar.bz2
scala-3c5f893b78e5cfc7d0124cece34daea257e649ff.zip
Fixed a path issue in partest, no review.
Diffstat (limited to 'src/partest')
-rw-r--r--src/partest/scala/tools/partest/nest/ConsoleFileManager.scala8
-rw-r--r--src/partest/scala/tools/partest/nest/ConsoleRunner.scala7
-rw-r--r--src/partest/scala/tools/partest/nest/PathSettings.scala2
3 files changed, 10 insertions, 7 deletions
diff --git a/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala b/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala
index 02edf0fc31..e2e4ba648e 100644
--- a/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala
+++ b/src/partest/scala/tools/partest/nest/ConsoleFileManager.scala
@@ -65,7 +65,7 @@ class ConsoleFileManager extends FileManager {
}
CLASSPATH = {
- val libs = (srcDir / Directory("lib")).files filter (_ hasExtension "jar") map (_.normalize.path)
+ val libs = (srcDir / Directory("lib")).files filter (_ hasExtension "jar") map (_.toCanonical.path)
// add all jars in libs
(CLASSPATH :: libs.toList) mkString pathSeparator
@@ -74,11 +74,11 @@ class ConsoleFileManager extends FileManager {
def findLatest() {
NestUI.verbose("test parent: "+testParent)
- def prefixFileWith(parent: File, relPath: String) = (io.File(parent) / relPath).normalize
- def prefixFile(relPath: String) = (testParent / relPath).normalize
+ def prefixFileWith(parent: File, relPath: String) = (io.File(parent) / relPath).toCanonical
+ def prefixFile(relPath: String) = (testParent / relPath).toCanonical
if (!testClasses.isEmpty) {
- testClassesDir = Path(testClasses.get).normalize.toDirectory
+ testClassesDir = Path(testClasses.get).toCanonical.toDirectory
NestUI.verbose("Running with classes in "+testClassesDir)
latestFile = testClassesDir.parent / "bin"
diff --git a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala
index 953823ef77..9cc0f699de 100644
--- a/src/partest/scala/tools/partest/nest/ConsoleRunner.scala
+++ b/src/partest/scala/tools/partest/nest/ConsoleRunner.scala
@@ -211,10 +211,13 @@ class ConsoleRunner extends DirectRunner {
* @return (success count, failure count)
*/
def testCheckAll(enabledSets: List[TestSet]): (Int, Int) = {
- def kindOf(f: File) = (srcDir relativize Path(f).normalize).segments.head
+ def kindOf(f: File) = (srcDir relativize Path(f).toCanonical).segments.head
val (valid, invalid) = testFiles partition (x => testSetKinds contains kindOf(x))
- invalid foreach (x => NestUI.failure("Invalid test file '%s', skipping.\n" format x))
+ invalid foreach (x => NestUI.failure(
+ "Invalid test file '%s', skipping.\n".format(x) +
+ "(Test kind '%s' not in known set '%s')".format(kindOf(x), testSetKinds))
+ )
val grouped = (valid groupBy kindOf).toList sortBy (x => testSetKinds indexOf x._1)
val runTestsFileLists =
diff --git a/src/partest/scala/tools/partest/nest/PathSettings.scala b/src/partest/scala/tools/partest/nest/PathSettings.scala
index 7461b45fee..f6353faa6f 100644
--- a/src/partest/scala/tools/partest/nest/PathSettings.scala
+++ b/src/partest/scala/tools/partest/nest/PathSettings.scala
@@ -25,7 +25,7 @@ object PathSettings {
}
// Directory <root>/test/files
- lazy val srcDir = Directory(testRoot / srcDirName normalize)
+ lazy val srcDir = Directory(testRoot / srcDirName toCanonical)
// Directory <root>/test/files/lib
lazy val srcLibDir = Directory(srcDir / "lib")