Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 59B2D62A7 for ; Sun, 26 Jun 2011 15:22:14 +0000 (UTC) Received: (qmail 5835 invoked by uid 500); 26 Jun 2011 15:22:13 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 5706 invoked by uid 500); 26 Jun 2011 15:22:13 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 5698 invoked by uid 99); 26 Jun 2011 15:22:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jun 2011 15:22:12 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.74.71.28] (HELO sif.is.scarlet.be) (193.74.71.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Jun 2011 15:22:05 +0000 Received: from mail.harfang.homelinux.org (ip-213-49-249-139.dsl.scarlet.be [213.49.249.139]) by sif.is.scarlet.be (8.14.2/8.14.2) with ESMTP id p5QFLhQo013258 for ; Sun, 26 Jun 2011 17:21:44 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1309101704; bh=n8E9fMIWm+kXSj3Ump3rx/+/uIRydon9xwWyQOC5enU=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Transfer-Encoding:In-Reply-To; b=VQIBUyh57t2lAqjP1A1QJV6+U4NH+ZEeFIFDd6a7C7FddabPAiEbdPlJnL2ChvmOj Jvht9rlnDLoibb4/Qeldk9jWhwHWdVylLCI+Hf7v4YLCb+VI0nV7ePJnW+6p16xhW9 0Uw69PJqDNZpFIl0OefPDaXldS78Z4PNYQdDvdsw= Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id B249B617EB for ; Sun, 26 Jun 2011 17:43:42 +0200 (CEST) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id FJWrIc+nmEKo for ; Sun, 26 Jun 2011 17:43:39 +0200 (CEST) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 76EF4617A9 for ; Sun, 26 Jun 2011 17:43:39 +0200 (CEST) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.72) (envelope-from ) id 1QarUp-0007Dx-88 for dev@commons.apache.org; Sun, 26 Jun 2011 17:43:39 +0200 Date: Sun, 26 Jun 2011 17:43:38 +0200 From: Gilles Sadowski To: dev@commons.apache.org Subject: Re: [Math] Gump failure for "BaseSecantSolverTest" Message-ID: <20110626154338.GI10648@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org References: <20110625225101.GG10648@dusk.harfang.homelinux.org> <5705bdf6-995b-4d39-9574-d10152b5304a@email.android.com> <20110626110025.GH10648@dusk.harfang.homelinux.org> <4E071CBC.8000403@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.20 (2009-06-14) X-DCC-scarlet.be-Metrics: sif 20001; Body=1 Fuz1=1 Fuz2=1 X-Virus-Checked: Checked by ClamAV on apache.org On Sun, Jun 26, 2011 at 01:47:07PM +0100, sebb wrote: > On 26 June 2011 12:49, Luc Maisonobe wrote: > > Hi Gilles, > > > > Le 26/06/2011 13:00, Gilles Sadowski a �crit : > >> > >> On Sun, Jun 26, 2011 at 12:41:09AM +0200, Luc Maisonobe wrote: > >>> > >>> I think there are some naming conventions. Try using Abstract in the name > >>> (there are other examples in our tests base) so that gump doesn't attempt to > >>> run it directly. > > > > In fact, the proper naming scheme for maven is XxxAbstractTest (see the > > configuration for maven-surefire-plugin in pom.xml). > > +1 > > That also agrees with the Ant build file. > > >> > >> I can understand that there would be some version difference between tools > >> run locally and by gump (e.g. the Java version target set to 1.5) but why > >> would gump have other conventions for picking up test classes than what is > >> defined in the "commons-math" configuration (supposing everything > >> necessary > >> is defined in trunk...). > > > > I think Gump relies on ant and Continuum relies on Maven. > > That depends on how the Math Gump project is configured [1]; Gump > supports both Ant and Maven. > > Gump is currently using Ant for Math. > > So to try and reproduce any errors, use Ant rather than Maven. > > I just tried, and Ant does fail, because it runs BaseSecantSolverTest. > > Whereas > > mvn test -Dtest=BaseSecantSolverTest > > says > > There are no tests to run. I suppose that this is the behaviour expected by Dennis. It seems logical: The class is abstract; can this fact be known to the build system (or Junit or whatever) so that it does not try to instantiate it? At least, maven's conclusion is correct: It knows that there no tests to run (or rather that it should not try to instantiate an abstract class) despite the fact that there are methods marked with the "@Test" annotation. If it's possible, it is certainly more robust to rely on a Java keyword ("abstract") rather than on an external convention (a name ending with "AbstractTest"). [Or, more precisely, even if the name does not end with "AbstracTest", the information exists that can prevent generating an error.] The introduction of the "@Test" annotation is a progress, going in that direction; that is, it is not mandatory anymore that the name of a test method starts with "test". Similarly, it should not be mandatory that a base class for tests ends with "AbstractTest". > > Maven also relies > > on the surefire plugin to run the tests, and surefire relies on Junit. So > > there are a lot of intermediate steps between a build system (Gump, > > Continuum, direct use of ant, direct use of Maven, Eclipse, Eclipse with > > maven plugin ...) and the low level Junit runs. This may explain the > > differences. > > Indeed. > > > I have already noticed that many tools do not have the same algorithm to > > select classes to test. A recent example was the performance tests for > > FastMath. Maven skip these tests because they do not end in "Test", but > > Eclipse for example does not skip them because it directly look inside the > > class and find the @Test annotations. > > [Yes, that Eclipse behaviour is a nuisance!] > > It *could* have been that the Ant build file and Maven Pom had > different configs for the test file names. However, I've just > checked, and the files agree. > > The difference is due to the way that Surefire currently processes > test-classes before handing them to JUnit. Do you mean that it's Surefire that handles the things correctly? Then, could it be used also by Gump? > > There is clearly no ideal solution, but I think having different build > > systems to suit several users needs is better. Having different tools help > > finding different bugs. > > Indeed - in this case, the wrong naming convention for an abstract test class. If it's impossible to properly configure Gump, I'll change the name... Gilles > [1] https://svn.apache.org/repos/asf/gump/metadata/project/commons-proper.xml > > S. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org > For additional commands, e-mail: dev-help@commons.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org