You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Peter Donald (JIRA)" <ji...@apache.org> on 2011/06/22 12:10:55 UTC

[jira] [Closed] (BUILDR-307) Failures not reported correclty for ScalaTest (fix included)

     [ https://issues.apache.org/jira/browse/BUILDR-307?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Peter Donald closed BUILDR-307.
-------------------------------


> Failures not reported correclty for ScalaTest (fix included)
> ------------------------------------------------------------
>
>                 Key: BUILDR-307
>                 URL: https://issues.apache.org/jira/browse/BUILDR-307
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4, 1.3.5
>         Environment: all
>            Reporter: Jeremie Lenfant-Engelmann
>            Assignee: Daniel Spiewak
>             Fix For: 1.3.5
>
>
> Today when a ScalaTest fails Buildr doesn't report it correctly and just ends without reporting the correct error or returning an error code.
> There is 2 problems:
> - The regexp used to now if a test failed is wrong
> - The loop reading the reportFile breaks too early, it breaks on the sentence 'Run completed.' but 'TEST FAILED' is on the following line
> Here is a fix for it:
> Index: lib/buildr/scala/tests.rb
> ===================================================================
> --- lib/buildr/scala/tests.rb	(revision 811837)
> +++ lib/buildr/scala/tests.rb	(working copy)
> @@ -126,9 +126,9 @@
>          while (!completed) do
>            File.open(reportFile, "r") do |input|
>              while (line = input.gets) do
> -              failed = (line =~ /(TEST FAILED -)|(RUN STOPPED)|(RUN ABORTED)/) unless failed
> +              failed = (line =~ /(TESTS? FAILED)|(RUN STOPPED)|(RUN ABORTED)/) unless failed
>                completed |= (line =~ /Run completed\./)
> -              break if (failed || completed)
> +              break if (failed)
>              end
>            end
>            wait += 1

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira