diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-05-25 15:09:35 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2013-05-25 17:12:58 -0700 |
commit | e037c9a3c12e21104a5aaf15d2bf27779cc3fd12 (patch) | |
tree | 807be2951a7e49608f09fc3a3e1c98b59d852432 /test/files | |
parent | 99b4d95fe6c908ce3170ff4d090420f8e47efa1d (diff) | |
download | scala-e037c9a3c12e21104a5aaf15d2bf27779cc3fd12.tar.gz scala-e037c9a3c12e21104a5aaf15d2bf27779cc3fd12.tar.bz2 scala-e037c9a3c12e21104a5aaf15d2bf27779cc3fd12.zip |
SI-7198 Par-Test uses filters files
Partest will also read files/filters and files/kind/filters for
filter expressions (one per line, trimmed, leading #comments)
which are taken as regexes.
A test/files/filters is provided which attempts to quell HotSpot
warnings; the test for this commit requires it.
The elided lines can be revealed using the lemon juice of verbosity:
apm@mara:~/projects/snytt/test$ ./partest --verbose --show-diff files/run/t7198.scala
[snip]
>>>>> Transcripts from failed tests >>>>>
> partest files/run/t7198.scala
% scalac t7198.scala
[snip]
% filtering t7198-run.log
--Over the moon
--Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 28).
The filtering operation is part of the transcript, which is printed on failure.
No attempt is made to be clever about not slurping the filters file a thousand times.
Previous literal patterns had to be updated because there's parens in them thar strings.
Future feature: pattern aliases, define once globally and invoke in test filters.
Diffstat (limited to 'test/files')
-rw-r--r-- | test/files/filters | 3 | ||||
-rw-r--r-- | test/files/run/colltest1.scala | 2 | ||||
-rw-r--r-- | test/files/run/compiler-asSeenFrom.scala | 2 | ||||
-rw-r--r-- | test/files/run/existentials-in-compiler.scala | 2 | ||||
-rw-r--r-- | test/files/run/is-valid-num.scala | 2 | ||||
-rw-r--r-- | test/files/run/iterator-from.scala | 2 | ||||
-rw-r--r-- | test/files/run/json.scala | 2 | ||||
-rw-r--r-- | test/files/run/mapConserve.scala | 2 | ||||
-rw-r--r-- | test/files/run/pc-conversions.scala | 2 | ||||
-rw-r--r-- | test/files/run/stringinterpolation_macro-run.scala | 2 | ||||
-rw-r--r-- | test/files/run/t7096.scala | 2 | ||||
-rw-r--r-- | test/files/run/t7198.check | 2 | ||||
-rw-r--r-- | test/files/run/t7198.scala | 9 |
13 files changed, 24 insertions, 10 deletions
diff --git a/test/files/filters b/test/files/filters new file mode 100644 index 0000000000..9a9b439784 --- /dev/null +++ b/test/files/filters @@ -0,0 +1,3 @@ +# +#Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 28). +Java HotSpot\(TM\) .* warning: diff --git a/test/files/run/colltest1.scala b/test/files/run/colltest1.scala index 87d3ef618b..9d77fc413a 100644 --- a/test/files/run/colltest1.scala +++ b/test/files/run/colltest1.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ import scala.collection._ import scala.language.postfixOps diff --git a/test/files/run/compiler-asSeenFrom.scala b/test/files/run/compiler-asSeenFrom.scala index 2952f85f01..bd3db0bf66 100644 --- a/test/files/run/compiler-asSeenFrom.scala +++ b/test/files/run/compiler-asSeenFrom.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ import scala.tools.nsc._ import scala.tools.partest.CompilerTest diff --git a/test/files/run/existentials-in-compiler.scala b/test/files/run/existentials-in-compiler.scala index 5ff40578c5..f5a0aa98d0 100644 --- a/test/files/run/existentials-in-compiler.scala +++ b/test/files/run/existentials-in-compiler.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ import scala.tools.nsc._ import scala.tools.partest.CompilerTest diff --git a/test/files/run/is-valid-num.scala b/test/files/run/is-valid-num.scala index 6d281d625f..19a3b9c7c0 100644 --- a/test/files/run/is-valid-num.scala +++ b/test/files/run/is-valid-num.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ object Test { def x = BigInt("10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000") diff --git a/test/files/run/iterator-from.scala b/test/files/run/iterator-from.scala index c8efa01b77..fb33f6b5ed 100644 --- a/test/files/run/iterator-from.scala +++ b/test/files/run/iterator-from.scala @@ -1,5 +1,5 @@ /* This file tests iteratorFrom, keysIteratorFrom, and valueIteratorFrom on various sorted sets and maps - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ import scala.util.{Random => R} diff --git a/test/files/run/json.scala b/test/files/run/json.scala index d9d28ba1ca..36e86ac5bb 100644 --- a/test/files/run/json.scala +++ b/test/files/run/json.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ import scala.util.parsing.json._ import scala.collection.immutable.TreeMap diff --git a/test/files/run/mapConserve.scala b/test/files/run/mapConserve.scala index ffd9106fa9..330fb34ca1 100644 --- a/test/files/run/mapConserve.scala +++ b/test/files/run/mapConserve.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ import scala.annotation.tailrec import scala.collection.mutable.ListBuffer diff --git a/test/files/run/pc-conversions.scala b/test/files/run/pc-conversions.scala index 0a51d312e1..b1ef3d963e 100644 --- a/test/files/run/pc-conversions.scala +++ b/test/files/run/pc-conversions.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ import collection._ diff --git a/test/files/run/stringinterpolation_macro-run.scala b/test/files/run/stringinterpolation_macro-run.scala index 4c43f2059e..1138cd0860 100644 --- a/test/files/run/stringinterpolation_macro-run.scala +++ b/test/files/run/stringinterpolation_macro-run.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ object Test extends App { diff --git a/test/files/run/t7096.scala b/test/files/run/t7096.scala index 437f7a086d..2495102899 100644 --- a/test/files/run/t7096.scala +++ b/test/files/run/t7096.scala @@ -1,5 +1,5 @@ /* - * filter: inliner warning(s); re-run with -Yinline-warnings for details + * filter: inliner warning\(s\); re-run with -Yinline-warnings for details */ import scala.tools.partest._ import scala.tools.nsc._ diff --git a/test/files/run/t7198.check b/test/files/run/t7198.check new file mode 100644 index 0000000000..6dad496f49 --- /dev/null +++ b/test/files/run/t7198.check @@ -0,0 +1,2 @@ +The quick brown fox jumped +And ran away with the vixen. diff --git a/test/files/run/t7198.scala b/test/files/run/t7198.scala new file mode 100644 index 0000000000..26e1d8805a --- /dev/null +++ b/test/files/run/t7198.scala @@ -0,0 +1,9 @@ +/* spew a few lines + * filter: Over the moon + */ +object Test extends App { + Console println "The quick brown fox jumped" + Console println "Over the moon" + Console println "And ran away with the vixen." + Console println "Java HotSpot(TM) 64-Bit Server VM warning: Failed to reserve shared memory (errno = 28)." +} |