Return-Path: Delivered-To: apmail-buildr-users-archive@www.apache.org Received: (qmail 60086 invoked from network); 23 Oct 2009 08:00:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Oct 2009 08:00:26 -0000 Received: (qmail 27089 invoked by uid 500); 23 Oct 2009 08:00:26 -0000 Delivered-To: apmail-buildr-users-archive@buildr.apache.org Received: (qmail 26956 invoked by uid 500); 23 Oct 2009 08:00:25 -0000 Mailing-List: contact users-help@buildr.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@buildr.apache.org Delivered-To: mailing list users@buildr.apache.org Received: (qmail 26946 invoked by uid 99); 23 Oct 2009 08:00:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Oct 2009 08:00:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [217.188.43.21] (HELO fluorine.blau.de) (217.188.43.21) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 23 Oct 2009 08:00:13 +0000 Received: (qmail 30375 invoked from network); 23 Oct 2009 09:59:52 +0200 Received: from unknown (HELO exchange.blau.de.local) (172.20.0.20) by nl.blau.de with SMTP; 23 Oct 2009 09:59:52 +0200 Received: from exchange.blau.de.local ([172.20.0.20]) by exchange.blau.de.local ([172.20.0.20]) with mapi; Fri, 23 Oct 2009 09:59:52 +0200 From: =?iso-8859-1?Q?Peter_Schr=F6der?= To: "users@buildr.apache.org" Date: Fri, 23 Oct 2009 09:59:52 +0200 Subject: Re: unpredictable behavior of test.using :integration Thread-Topic: unpredictable behavior of test.using :integration Thread-Index: AcpTts0bTg1Fcl6hTQmV1U8YHMD+iA== Message-ID: References: <4ADDB132.8050907@gmail.com> <5037b6e40910201020o214ba83eob7fa86ed9be12d4a@mail.gmail.com> <5c99d0330910201138g13d7d5d5u17725bd9227b0e58@mail.gmail.com> <2E0F53C0-DAC3-48E1-93BD-DFC3D781D496@detailedbalance.net> <1A45E88A-9352-4C75-93FA-9FAC9141A6DE@blau.de> <5037b6e40910211140j30de3a7w801c0016407fab7@mail.gmail.com> In-Reply-To: <5037b6e40910211140j30de3a7w801c0016407fab7@mail.gmail.com> Accept-Language: de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org the documentation on this topic is very limited... my expectations were the following: 1. integration setup and teardown are only executed if i explicitly =20 use :integration 2. i can configure it for each subproject 3. i am able to configure it from the outside via a custom task i dont think that it is neccessary to support all my needs, but i =20 think a clear instruction what you can do and what you cant would help! kind Regards, Peter Am 21.10.2009 um 20:40 schrieb Assaf Arkin: > On Wed, Oct 21, 2009 at 2:10 AM, Peter Schr=F6der wrote: > >> another thing i noticed, is that calling >> >> project.test.using :integration in a post-define task >> >> seems to work differntly form calling it directly in the project via >> >> test.using :integration >> >> any ideas? >> > > Flipping integration bit on simply changes when tests are run: after > packaging (integration), instead of before packaging (regular). All =20 > other > behavior is the same (setup, teardown, frameworks, etc). > > Test options are inherited, options you define in a parent project are > inherited by its sub-project, and that should include the integration > option. > > Changing the order in which tests are run involving setting up task > dependencies, which happens at the very end of the project =20 > definition, after > evaluating the block. If you then (post-define) change the setting, =20 > nothing > much happens, as task are already wired to run in non-integration =20 > order. > > Assaf > > >> >> Am 21.10.2009 um 09:32 schrieb Peter Schr=F6der: >> >>> hi there, >>> >>> we are experiencing somewhat strange behavior when using integration >>> tests. >>> >>> we have a setup where a project has n subprojects and only one of =20 >>> them >>> has tests that should be executed as integration-tests. >>> >>> we are using environment-variables to let buildr include some test- >>> classes that are only executed on our system-test-servers. >>> >>> this works very well: compiles, package artifacts, calls =20 >>> integration- >>> setup, performs-tests, integration-teardown >>> >>> on the other hand we have the same setup but with a single project >>> without subprojects, where the integration setup is missing, so the >>> system-tests fail without a system to test. in that project i have =20 >>> to >>> call the integration-target directly to have the desired behavior. >>> >>> the builds are quite complex so i wont include them here, but i =20 >>> played >>> around a little bit with a dummy project (see below). >>> >>> the things i dont understand are: >>> >>> 1. why are setup and teardown called for all projects even though =20 >>> they >>> are never configured with :integration >>> 2. why are all tests executed as :integration if you just =20 >>> configure it >>> in the parent project >>> 3. under wich circumstances will the integration-target get invoked >>> >>> >>> module SystemTests >>> include Extension >>> >>> after_define do |project| >>> info "after define for #{project}" >>> #project.test.using :integration >>> project.integration.setup do >>> info "-" * 50 + " integeration setup for #{project}" >>> end >>> >>> project.integration.teardown do >>> info "-" * 50 + " integeration teardown for #{project}" >>> end >>> end >>> >>> end >>> >>> class Buildr::Project >>> include SystemTests >>> end >>> >>> repositories.remote << 'http://www.ibiblio.org/maven2/' >>> >>> info "define all" >>> define 'all' do >>> >>> info "define subA" >>> define 'subA' do >>> info "subA goes here" >>> #test.using :integration >>> end >>> >>> info "define subB" >>> define 'subB' do >>> info "subB goes here" >>> #test.using :junit >>> end >>> >>> info "all goes here" >>> >>> test.using :integration >>> >>> end >> >>