Return-Path: Delivered-To: apmail-buildr-commits-archive@www.apache.org Received: (qmail 79508 invoked from network); 6 Sep 2009 18:48:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Sep 2009 18:48:22 -0000 Received: (qmail 63508 invoked by uid 500); 6 Sep 2009 18:48:22 -0000 Delivered-To: apmail-buildr-commits-archive@buildr.apache.org Received: (qmail 63476 invoked by uid 500); 6 Sep 2009 18:48:22 -0000 Mailing-List: contact commits-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@buildr.apache.org Delivered-To: mailing list commits@buildr.apache.org Received: (qmail 63467 invoked by uid 500); 6 Sep 2009 18:48:21 -0000 Delivered-To: apmail-incubator-buildr-commits@incubator.apache.org Received: (qmail 63464 invoked by uid 99); 6 Sep 2009 18:48:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Sep 2009 18:48:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Sep 2009 18:48:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E1394234C052 for ; Sun, 6 Sep 2009 11:47:57 -0700 (PDT) Message-ID: <882375769.1252262877921.JavaMail.jira@brutus> Date: Sun, 6 Sep 2009 11:47:57 -0700 (PDT) From: "Jeremie Lenfant-Engelmann (JIRA)" To: buildr-commits@incubator.apache.org Subject: [jira] Created: (BUILDR-307) Failures not reported correclty for ScalaTest (fix included) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org 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 Fix For: 1.3.5, 1.3.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.