diff options
author | Som Snytt <som.snytt@gmail.com> | 2013-05-18 08:46:43 -0700 |
---|---|---|
committer | Som Snytt <som.snytt@gmail.com> | 2013-05-19 13:29:46 -0700 |
commit | 4ab66d1613da276712692001ed8f9f3c009736ab (patch) | |
tree | 61388d728cc7dc5d9f3d40f2c620b5bb28aae791 /src/partest | |
parent | e0bd62c5f24fba233a879f6b97cd61152183c3a0 (diff) | |
download | scala-4ab66d1613da276712692001ed8f9f3c009736ab.tar.gz scala-4ab66d1613da276712692001ed8f9f3c009736ab.tar.bz2 scala-4ab66d1613da276712692001ed8f9f3c009736ab.zip |
SI-7494 Tests for status quo
Exploit SI-6446 fix to move old pending tests for plugins to the
active pool.
Also, nuance the partest runner to allow the compiler to crash
with a FatalError if a check file is present.
Some of the plugin tests make phase assembly throw.
One of the legacy tests was moved back to pending:
There seems to be a race for who shall be deemed truly dependent.
Back to pending for you!
apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/
Selected 1 tests drawn from specified tests
> starting 1 test in neg
ok 1 - neg/t7494-cyclic-dependency
1/1 passed (elapsed time: 00:00:04)
Test Run PASSED
apm@mara:~/projects/snytt/test$ ./partest files/neg/t7494-cyclic-dependency/
Selected 1 tests drawn from specified tests
> starting 1 test in neg
!! 1 - neg/t7494-cyclic-dependency [output differs]
> 0/1 passed, 1 failed in neg
>>>>> Transcripts from failed tests >>>>>
> partest files/neg/t7494-cyclic-dependency
% scalac t7494-cyclic-dependency/ThePlugin.scala
% scalac t7494-cyclic-dependency/sample_2.scala
error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice!
% diff files/neg/t7494-cyclic-dependency-neg.log files/neg/t7494-cyclic-dependency.check
@@ -1 +1 @@
-error: Cycle in compiler phase dependencies detected, phase cyclicdependency1 reacted twice!
+error: Cycle in compiler phase dependencies detected, phase cyclicdependency2 reacted twice!
0/1 passed, 1 failed (elapsed time: 00:00:04)
Test Run FAILED
Diffstat (limited to 'src/partest')
-rw-r--r-- | src/partest/scala/tools/partest/nest/Runner.scala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/partest/scala/tools/partest/nest/Runner.scala b/src/partest/scala/tools/partest/nest/Runner.scala index 85679ad0b8..01e4f50981 100644 --- a/src/partest/scala/tools/partest/nest/Runner.scala +++ b/src/partest/scala/tools/partest/nest/Runner.scala @@ -13,6 +13,7 @@ import java.util.concurrent.TimeUnit.NANOSECONDS import scala.collection.mutable.ListBuffer import scala.concurrent.duration.Duration import scala.io.Codec +import scala.reflect.internal.FatalError import scala.sys.process.Process import scala.tools.nsc.Properties.{ envOrElse, isWin, jdkHome, javaHome, propOrElse, propOrEmpty, setProp } import scala.tools.nsc.{ Settings, CompilerCommand, Global } @@ -451,9 +452,10 @@ class Runner(val testFile: File, fileManager: FileManager, val testRunParams: Te val failing = rounds find (x => nextTestActionExpectTrue("compilation failed", x.isOk) == false) // which means passing if it checks and didn't crash the compiler + // or, OK, we'll let you crash the compiler with a FatalError if you supply a check file def checked(r: CompileRound) = r.result match { - case f: Crash => false - case f => normalizeLog(); diffIsOk + case Crash(_, t, _) if !checkFile.canRead || !t.isInstanceOf[FatalError] => false + case _ => normalizeLog(); diffIsOk } failing map (checked) getOrElse nextTestActionFailing("expected compilation failure") |