From scm-return-17451-apmail-geronimo-scm-archive=geronimo.apache.org@geronimo.apache.org Sat Feb 03 01:49:08 2007 Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 77506 invoked from network); 3 Feb 2007 01:49:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Feb 2007 01:49:07 -0000 Received: (qmail 94522 invoked by uid 500); 3 Feb 2007 01:49:13 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 94493 invoked by uid 500); 3 Feb 2007 01:49:13 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 94467 invoked by uid 99); 3 Feb 2007 01:49:13 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 17:49:13 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Feb 2007 17:49:06 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id F24A31A981A; Fri, 2 Feb 2007 17:48:45 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r502840 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy Date: Sat, 03 Feb 2007 01:48:45 -0000 To: scm@geronimo.apache.org From: jdillon@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070203014845.F24A31A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jdillon Date: Fri Feb 2 17:48:45 2007 New Revision: 502840 URL: http://svn.apache.org/viewvc?view=rev&rev=502840 Log: Move stuff around a little Generating target/runtest.properties with the full params we used, will need this later when generating the report Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy?view=diff&rev=502840&r1=502839&r2=502840 ============================================================================== --- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy (original) +++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/config/projects/Geronimo_CTS/Controller.groovy Fri Feb 2 17:48:45 2007 @@ -35,6 +35,13 @@ */ class Controller extends gbuild.system.ProjectController { + // + // TODO: Need to add a way to provide custom initalization for controllers + // so we can easily setup commonly used variables. + // + // Might simply override init() ? + // + def build = { def maven = new MavenCommand(context) @@ -56,54 +63,6 @@ maven.execute() } - def runtests = { - def exec = new ExecCommand(context) - exec.executable = 'project/tck-testsuite/runtests' - - def args = [] - args << '--nocolor' - - args << '-w' - args << params.require('webcontainer') - - def repoDir = new File('repository').canonicalFile - args << "-Dmaven.repo.local=$repoDir" - - // - // NOTE: Once library support is hooked up, we can probably avoid this - // (and the builk repo collection too) by running gproxy - // with a cache dir which is shared between builds - // - - // If offline is not set or it set but not true, then run offline - if (params.offline == null || !params.offline) { - args << '--offline' - } - - // Append some extra arguments for 2.0 runtests to generate summary reports - switch (params.require('anthill.workflow')) { - case 'build 2.0': - args << '--summary' - break - } - - args << params.require('tests') - - exec.execute(args) - } - - def runtestsIteration = { - params.tests = '%' - - def cfg = new IterationConfigurator(context) - cfg.configFile = 'project/tck-testsuite/iteration.conf' - cfg.iteration = params.iteration - cfg.applyTo = [ 'tests' ] - cfg.apply() - - runtests() - } - def primeTestsuite = { params.webcontainer = 'jetty' params.tests = 'nosuchtest' @@ -224,7 +183,72 @@ separator() } + def runtests = { + def exec = new ExecCommand(context) + exec.executable = 'project/tck-testsuite/runtests' + + def args = [] + args << '--nocolor' + + args << '-w' + args << params.require('webcontainer') + + def repoDir = new File('repository').canonicalFile + args << "-Dmaven.repo.local=$repoDir" + + // + // NOTE: Once library support is hooked up, we can probably avoid this + // (and the builk repo collection too) by running gproxy + // with a cache dir which is shared between builds + // + + // If offline is not set or it set but not true, then run offline + if (params.offline == null || !params.offline) { + args << '--offline' + } + + // Append some extra arguments for 2.0 runtests to generate summary reports + switch (params.require('anthill.workflow')) { + case 'build 2.0': + args << '--summary' + break + } + + args << params.require('tests') + + // Before we execute, save the parameters used to execute runtests + def targetDir = new File('target').canonicalFile + ant.mkdir(dir: targetDir) + params.store("$targetDir/runtests.properties") + + exec.execute(args) + } + + def runtestsIteration = { + params.tests = '%' + + def cfg = new IterationConfigurator(context) + cfg.configFile = 'project/tck-testsuite/iteration.conf' + cfg.iteration = params.iteration + cfg.applyTo = [ 'tests' ] + cfg.apply() + + // + // TODO: May want to include extra deals from the conf, like + // a header/title for the iteration, so we can use + // that when generating reports + // + // Need to change config to xml before we do this though... + // + + runtests() + } + def collectResults = { + // + // TODO: use target/results for dir to be sucked up by AH + // + def workflowId = params.require('anthill.workflow.id') def iteration = params.require('iteration') def webcontainer = params.require('webcontainer') @@ -296,6 +320,12 @@ } def testing = { + def resultsDir = new File('target/results').canonicalFile + ant.mkdir(dir: resultsDir) + + params.store("$resultsDir/runtests.properties") + params.store("$resultsDir/runtests.xml", true) + /* def workflowId = params.require('anthill.workflow.id') def webcontainer = params.require('webcontainer')