You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by "Alex Eagle (JIRA)" <ji...@apache.org> on 2009/11/25 07:12:39 UTC

[jira] Created: (BUILDR-350) CLONE -Failures not reported correclty for ScalaTest (fix included)

CLONE -Failures not reported correclty for ScalaTest (fix included)
-------------------------------------------------------------------

                 Key: BUILDR-350
                 URL: https://issues.apache.org/jira/browse/BUILDR-350
             Project: Buildr
          Issue Type: Bug
          Components: Test frameworks
    Affects Versions: 1.3.4, 1.3.5
         Environment: all
            Reporter: Alex Eagle
            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.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BUILDR-350) CLONE -Failures not reported correclty for ScalaTest (fix included)

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert updated BUILDR-350:
---------------------------------

    Fix Version/s:     (was: 1.3.5)
                   1.4

> CLONE -Failures not reported correclty for ScalaTest (fix included)
> -------------------------------------------------------------------
>
>                 Key: BUILDR-350
>                 URL: https://issues.apache.org/jira/browse/BUILDR-350
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4, 1.3.5
>         Environment: all
>            Reporter: Alex Eagle
>            Assignee: Daniel Spiewak
>             Fix For: 1.4
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (BUILDR-350) CLONE -Failures not reported correclty for ScalaTest (fix included)

Posted by "Alex Eagle (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/BUILDR-350?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12782318#action_12782318 ] 

Alex Eagle commented on BUILDR-350:
-----------------------------------

Tried this again with 1.4.0 from head (built at 883980)
Still get an overall pass even when a test failed with scalatest.

As I commented on the issue I cloned, the fix is just to remove the extra hyphen after TESTS? FAILED, which was applied incorrectly from Jeremie's patch.

> CLONE -Failures not reported correclty for ScalaTest (fix included)
> -------------------------------------------------------------------
>
>                 Key: BUILDR-350
>                 URL: https://issues.apache.org/jira/browse/BUILDR-350
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4, 1.3.5
>         Environment: all
>            Reporter: Alex Eagle
>            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.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BUILDR-350) CLONE -Failures not reported correclty for ScalaTest (fix included)

Posted by "Alex Boisvert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BUILDR-350?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alex Boisvert resolved BUILDR-350.
----------------------------------

    Resolution: Fixed

Interesting, I couldn't reproduce this with our specs.

Anyhow, I apply the suggested fix.

Sending        CHANGELOG
Sending        lib/buildr/scala/tests.rb
Transmitting file data ..
Committed revision 884617.


> CLONE -Failures not reported correclty for ScalaTest (fix included)
> -------------------------------------------------------------------
>
>                 Key: BUILDR-350
>                 URL: https://issues.apache.org/jira/browse/BUILDR-350
>             Project: Buildr
>          Issue Type: Bug
>          Components: Test frameworks
>    Affects Versions: 1.3.4, 1.3.5
>         Environment: all
>            Reporter: Alex Eagle
>            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.
-
You can reply to this email to add a comment to the issue online.