hudson.distTest
Class DistTestingBuilder

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Builder
          extended by hudson.distTest.DistTestingBuilder
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Builder>, hudson.tasks.BuildStep, java.io.Serializable

public class DistTestingBuilder
extends hudson.tasks.Builder
implements java.io.Serializable

Core class for Distributed Testing Plugin. This class takes tests and run them on nodes in a label to which this project was tied.

Author:
Miroslav Novak
See Also:
Serialized Form

Nested Class Summary
static class DistTestingBuilder.DescriptorImpl
          Descriptor for DistTestBuilder.
static class DistTestingBuilder.DistLocations
          Class used for storing dist.
static class DistTestingBuilder.LibLocations
          Class used for storing lib.
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
DistTestingBuilder(DistTestingBuilder.DistLocations[] distLocations, DistTestingBuilder.LibLocations[] libLocations, java.lang.String testDir, boolean waitForNodes, boolean compileTests)
          Constructor for this build.
 
Method Summary
 DistTestingBuilder.DescriptorImpl getDescriptor()
           
 DistTestingBuilder.DistLocations[] getDistLocations()
           
 DistTestingBuilder.LibLocations[] getLibLocations()
           
 java.lang.String getTestDir()
           
 java.lang.String getWorkspaceForThisProjectOnNode(hudson.model.Node node, hudson.model.AbstractBuild build)
          Gets an absolute path where the workspace of the given project is on the node.
 boolean isCompileTests()
           
 boolean isWaitForNodes()
           
 boolean perform(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
          Method that actually runs the whole build step and control it.
 
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, prebuild
 

Constructor Detail

DistTestingBuilder

@DataBoundConstructor
public DistTestingBuilder(DistTestingBuilder.DistLocations[] distLocations,
                                               DistTestingBuilder.LibLocations[] libLocations,
                                               java.lang.String testDir,
                                               boolean waitForNodes,
                                               boolean compileTests)
Constructor for this build.

Parameters:
distLocations - locations of distribution directories and jar files
libLocations - locations of libraries
testDir - where resides directory with compiled tests or test sources
waitForNodes - whether build should wait for busy executors on online nodes
compileTests - whether compile tests sources in "testDir"
Method Detail

perform

public boolean perform(hudson.model.AbstractBuild build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
Method that actually runs the whole build step and control it.

Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Parameters:
build -
launcher -
listener -
Returns:

getWorkspaceForThisProjectOnNode

public java.lang.String getWorkspaceForThisProjectOnNode(hudson.model.Node node,
                                                         hudson.model.AbstractBuild build)
                                                  throws java.io.IOException,
                                                         java.lang.Exception
Gets an absolute path where the workspace of the given project is on the node.

Parameters:
node - node where to look for workspace
build - this build
Returns:
an absolute path of the workspace
Throws:
java.io.IOException
java.lang.Exception

getDescriptor

public DistTestingBuilder.DescriptorImpl getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Builder>
Overrides:
getDescriptor in class hudson.tasks.Builder

isWaitForNodes

public boolean isWaitForNodes()
Returns:
the waitForNodes

getTestDir

public java.lang.String getTestDir()
Returns:
the testDir

isCompileTests

public boolean isCompileTests()
Returns:
the compileTests

getDistLocations

public DistTestingBuilder.DistLocations[] getDistLocations()
Returns:
the distLocations

getLibLocations

public DistTestingBuilder.LibLocations[] getLibLocations()
Returns:
the libLocations


Copyright © 2011. All Rights Reserved.