summaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorDale Wijnand <dale.wijnand@gmail.com>2017-02-01 00:43:52 -0700
committerDale Wijnand <dale.wijnand@gmail.com>2017-02-01 00:44:36 -0700
commit702deae96d5dd035b349d2845286f0ec9fc6b4c2 (patch)
tree5c22ce66c7d35739a3610db4940f566ab953bf94 /project
parent6d4782774be5ffff361724e4e22a6ae61d4624fe (diff)
downloadscala-702deae96d5dd035b349d2845286f0ec9fc6b4c2.tar.gz
scala-702deae96d5dd035b349d2845286f0ec9fc6b4c2.tar.bz2
scala-702deae96d5dd035b349d2845286f0ec9fc6b4c2.zip
Make partest --grep glob paths, not just filenames
Allows for "partest --grep run/t365*" to work, while previous it returned: > partest --grep run\/t365* [error] no tests match pattern / glob [error] partest --grep run\/t365* [error] ^
Diffstat (limited to 'project')
-rw-r--r--project/PartestUtil.scala4
1 files changed, 2 insertions, 2 deletions
diff --git a/project/PartestUtil.scala b/project/PartestUtil.scala
index 7343c1857f..ab7e62b3b4 100644
--- a/project/PartestUtil.scala
+++ b/project/PartestUtil.scala
@@ -64,9 +64,9 @@ object PartestUtil {
}
val matchingFileName = try {
val filter = GlobFilter("*" + x + "*")
- testFiles.allTestCases.filter(x => filter.accept(x._1.name))
+ testFiles.allTestCases.filter(x => filter.accept(x._1.asFile.getPath))
} catch {
- case t: Throwable => Nil
+ case _: Throwable => Nil
}
(matchingFileContent ++ matchingFileName).map(_._2).distinct.sorted
}