gump-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r1766555 - in /gump/live/python/gump/core/build: basebuilder.py configure.py make.py msbuild.py nuget.py script.py
Date Tue, 25 Oct 2016 16:43:21 GMT
Author: bodewig
Date: Tue Oct 25 16:43:21 2016
New Revision: 1766555

URL: http://svn.apache.org/viewvc?rev=1766555&view=rev
Log:
refactor all builders that don't need setup code

Modified:
    gump/live/python/gump/core/build/basebuilder.py
    gump/live/python/gump/core/build/configure.py
    gump/live/python/gump/core/build/make.py
    gump/live/python/gump/core/build/msbuild.py
    gump/live/python/gump/core/build/nuget.py
    gump/live/python/gump/core/build/script.py

Modified: gump/live/python/gump/core/build/basebuilder.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/basebuilder.py?rev=1766555&r1=1766554&r2=1766555&view=diff
==============================================================================
--- gump/live/python/gump/core/build/basebuilder.py (original)
+++ gump/live/python/gump/core/build/basebuilder.py Tue Oct 25 16:43:21 2016
@@ -21,7 +21,8 @@ from gump import log
 from gump.core.model.state import REASON_BUILD_FAILED, REASON_BUILD_TIMEDOUT, \
     STATE_FAILED, STATE_SUCCESS
 from gump.core.run.gumprun import RunSpecific
-from gump.util.process.command import CMD_STATE_SUCCESS, CMD_STATE_TIMED_OUT, Cmd
+from gump.util.process.command import CMD_STATE_SUCCESS, CMD_STATE_TIMED_OUT, Cmd, \
+    Parameters
 from gump.util.process.launcher import execute
 from gump.util.work import CommandWorkItem, WORK_TYPE_BUILD
 
@@ -47,6 +48,20 @@ def is_verbose_enabled(project, builder=
     return project.getWorkspace().isVerbose() or project.isVerbose() or \
         (builder and builder.isVerbose())
 
+def get_args(builder):
+    """ Get command line args for a builder that supports args """
+    args = Parameters()
+    for arg in builder.getProperties():
+        if arg.name.startswith('--') or not arg.name.startswith('-'):
+            if arg.value and arg.value != "*Unset*": # TODO: fix this properly. Ugly!
+                args.addNamedParameter(arg.name, arg.value, '=')
+            else:
+                args.addParameter(arg.name)
+        else:
+            args.addParameter(arg.name)
+            args.addParameter(arg.value)
+    return args
+
 class BaseBuilder(RunSpecific):
     """
     Base class for all builders.

Modified: gump/live/python/gump/core/build/configure.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/configure.py?rev=1766555&r1=1766554&r2=1766555&view=diff
==============================================================================
--- gump/live/python/gump/core/build/configure.py (original)
+++ gump/live/python/gump/core/build/configure.py Tue Oct 25 16:43:21 2016
@@ -15,78 +15,31 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-__revision__  = "$Rev: 36667 $"
-__date__      = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
-__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
-__license__   = "http://www.apache.org/licenses/LICENSE-2.0"
-
-
 """
 	An configure builder (uses ./configure to build projects)
 """
 
 import os.path
 
-from gump import log
-from gump.core.build.script import getArgs
-from gump.core.config import setting
-from gump.core.model.state import REASON_BUILD_FAILED, REASON_BUILD_TIMEDOUT, STATE_FAILED,\
-    STATE_SUCCESS
-from gump.core.run.gumprun import RunSpecific
-
-from gump.util.process.command import CMD_STATE_SUCCESS, CMD_STATE_TIMED_OUT, Cmd
-from gump.util.process.launcher import execute
-from gump.util.work import CommandWorkItem, WORK_TYPE_BUILD
+from gump.core.build.basebuilder import BaseBuilder, get_args, get_command_skeleton
 
 
 ###############################################################################
 # Classes
 ###############################################################################
 
-class ConfigureBuilder(RunSpecific):
+class ConfigureBuilder(BaseBuilder):
+    """
+	An configure builder (uses ./configure to build projects)
+    """
 
     def __init__(self, run):
         """
         A configure 'builder'
         """
-        RunSpecific.__init__(self, run)
-
-    def buildProject(self, project, languageHelper, stats):
-        """
-        Run a project's configure script (doesn't support Windows, yet)
-        """
+        BaseBuilder.__init__(self, run, 'Project\'s configure script')
 
-        workspace = self.run.getWorkspace()
-
-        log.info('Run Project\'s configure script: #[' + `project.getPosition()` +\
-                 '] : ' + project.getName())
-
-        #
-        # Get the appropriate build command...
-        #
-        cmd = self.getConfigureCommand(project)
-
-        if cmd:
-            # Execute the command ....
-            cmdResult = execute(cmd, workspace.tmpdir)
-
-            # Update Context
-            work = CommandWorkItem(WORK_TYPE_BUILD, cmd, cmdResult)
-            project.performedWork(work)
-            project.setBuilt(True)
-
-            # Update Context w/ Results
-            if cmdResult.state != CMD_STATE_SUCCESS:
-                reason = REASON_BUILD_FAILED
-                if cmdResult.state == CMD_STATE_TIMED_OUT:
-                    reason = REASON_BUILD_TIMEDOUT
-                project.changeState(STATE_FAILED, reason)
-
-            else:
-                # For now, things are going good...
-                project.changeState(STATE_SUCCESS)
-
-    def getConfigureCommand(self, project):
+    def get_command(self, project, _language):
         """ Return the command object for a <configure entry """
         configure = project.configure
 
@@ -96,21 +49,7 @@ class ConfigureBuilder(RunSpecific):
         # The script
         scriptfile = os.path.abspath(os.path.join(basedir, 'configure'))
 
-        # Optional 'timeout'
-        if configure.hasTimeout():
-            timeout = configure.getTimeout()
-        else:
-            timeout = setting.TIMEOUT
-
-        cmd = Cmd(scriptfile, 'buildscript_'+project.getModule().getName()+'_'+project.getName(),
-                  basedir, timeout=timeout)
-        cmd.addParameters(getArgs(configure))
+        cmd = get_command_skeleton(project, scriptfile, configure)
+        cmd.addParameters(get_args(configure))
 
         return cmd
-
-    def preview(self, project, languageHelper, stats):
-        """
-        Preview what this would do
-        """
-        cmd = self.getConfigureCommand(project)
-        cmd.dump()

Modified: gump/live/python/gump/core/build/make.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/make.py?rev=1766555&r1=1766554&r2=1766555&view=diff
==============================================================================
--- gump/live/python/gump/core/build/make.py (original)
+++ gump/live/python/gump/core/build/make.py Tue Oct 25 16:43:21 2016
@@ -15,81 +15,32 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-__revision__  = "$Rev: 36667 $"
-__date__      = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
-__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
-__license__   = "http://www.apache.org/licenses/LICENSE-2.0"
-
-
 """
         An make builder (uses make to build projects)
 """
 
-from gump import log
-from gump.core.run.gumprun import RunSpecific
-from gump.core.build.script import getArgs
-from gump.core.config import setting
-from gump.core.model.state import REASON_BUILD_FAILED, REASON_BUILD_TIMEDOUT, STATE_FAILED,\
-    STATE_SUCCESS
-from gump.util.process.command import CMD_STATE_SUCCESS, CMD_STATE_TIMED_OUT, Cmd
-from gump.util.process.launcher import execute
-from gump.util.work import CommandWorkItem, WORK_TYPE_BUILD
-
+from gump.core.build.basebuilder import BaseBuilder, get_args, get_command_skeleton
 
 
 ###############################################################################
 # Classes
 ###############################################################################
 
-class MakeBuilder(RunSpecific):
+class MakeBuilder(BaseBuilder):
+    """
+        An make builder (uses make to build projects)
+    """
 
     def __init__(self, run):
         """
         A make 'builder'
         """
-        RunSpecific.__init__(self, run)
-
-    def buildProject(self, project, languageHelper, stats):
-        """
-        Run a project's make file
-        """
-
-        workspace = self.run.getWorkspace()
+        BaseBuilder.__init__(self, run, 'make')
 
-        log.info('Run make on project: #[' + `project.getPosition()` + '] : ' + project.getName())
-
-        #
-        # Get the appropriate build command...
-        #
-        cmd = self.getMakeCommand(project)
-
-        if cmd:
-            # Execute the command ....
-            cmdResult = execute(cmd, workspace.tmpdir)
-
-            # Update Context
-            work = CommandWorkItem(WORK_TYPE_BUILD, cmd, cmdResult)
-            project.performedWork(work)
-            project.setBuilt(True)
-
-            # Update Context w/ Results
-            if cmdResult.state != CMD_STATE_SUCCESS:
-                reason = REASON_BUILD_FAILED
-                if cmdResult.state == CMD_STATE_TIMED_OUT:
-                    reason = REASON_BUILD_TIMEDOUT
-                project.changeState(STATE_FAILED,reason)
-
-            else:
-                # For now, things are going good...
-                project.changeState(STATE_SUCCESS)
-
-    def getMakeCommand(self, project):
+    def get_command(self, project, _language):
         """ Return the command object for a <make entry """
         make = project.make
 
-        # Where to run this:
-        basedir = make.getBaseDirectory() or project.getBaseDirectory()
-
         # The make target (or none == ALL)
         target = make.getTarget()
 
@@ -97,34 +48,19 @@ class MakeBuilder(RunSpecific):
         makefile = make.getMakeFile()
 
         # The make command, defaults to "make"
-        makeCommand = project.getWorkspace().getMakeCommand()
-
-        # Optional 'timeout'
-        if make.hasTimeout():
-            timeout = make.getTimeout()
-        else:
-            timeout = setting.TIMEOUT
+        make_command = project.getWorkspace().getMakeCommand()
 
-        cmd = Cmd(makeCommand, 'build_'+project.getModule().getName()+'_'+project.getName(),
-                  basedir, timeout=timeout)
+        cmd = get_command_skeleton(project, make_command, make)
 
         # Pass the makefile
         if makefile:
             cmd.addParameter('-f', makefile)
 
-        cmd.addParameters(getArgs(make))
+        cmd.addParameters(get_args(make))
 
         # End with the target (or targets)...
         if target:
-            for targetParam in target.split():
-                cmd.addParameter(targetParam)
+            for single_target in target.split():
+                cmd.addParameter(single_target)
 
         return cmd
-
-
-    def preview(self, project, languageHelper, stats):
-        """
-        Preview what this would do
-        """
-        cmd = self.getMakeCommand(project)
-        cmd.dump()

Modified: gump/live/python/gump/core/build/msbuild.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/msbuild.py?rev=1766555&r1=1766554&r2=1766555&view=diff
==============================================================================
--- gump/live/python/gump/core/build/msbuild.py (original)
+++ gump/live/python/gump/core/build/msbuild.py Tue Oct 25 16:43:21 2016
@@ -15,17 +15,17 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+"""
+        A MSBuild builder (uses MSBuild or Mono's xbuild to build projects)
+"""
+
 from gump import log
-from gump.core.config import setting
-from gump.core.model.state import REASON_BUILD_FAILED, REASON_BUILD_TIMEDOUT, \
-    REASON_PREBUILD_FAILED, STATE_FAILED, STATE_SUCCESS
-from gump.core.run.gumprun import RunSpecific
-from gump.util.process.command import CMD_STATE_SUCCESS, CMD_STATE_TIMED_OUT, \
-    Cmd, Parameters
-from gump.util.process.launcher import execute
-from gump.util.work import CommandWorkItem, WORK_TYPE_BUILD
+from gump.core.build.basebuilder import BaseBuilder, get_command_skeleton, \
+    is_debug_enabled, is_verbose_enabled
+from gump.core.model.state import REASON_PREBUILD_FAILED, STATE_FAILED
+from gump.util.process.command import Parameters
 
-def getMSBuildProperties(project):
+def get_msbuild_properties(project):
     """ Get properties for a project """
     properties = Parameters()
     props = project.getWorkspace().getProperties() + \
@@ -34,7 +34,7 @@ def getMSBuildProperties(project):
         properties.addPrefixedNamedParameter('/p:', prop.name, prop.value, '=')
     return properties
 
-class MSBuildBuilder(RunSpecific):
+class MSBuildBuilder(BaseBuilder):
     """
         A MSBuild builder (uses MSBuild or Mono's xbuild to build projects)
     """
@@ -44,44 +44,9 @@ class MSBuildBuilder(RunSpecific):
         """
                 The MSBuild Builder is a .NET Builder
         """
-        RunSpecific.__init__(self, run)
-
-    def buildProject(self, project, _language, _stats):
-        """
-                Build a project using MSBuild, based off the <msbuild metadata.
-
-                Note: switch on -verbose|-debug based of the stats for this
-                project, i.e. how long in a state of failure.
-        """
-
-        workspace = self.run.getWorkspace()
-
-        log.info('Run MSBuild on Project: #[' + `project.getPosition()` + \
-                     '] : ' + project.getName())
-
-        # Get the appropriate build command...
-        cmd = self.getMSBuildCommand(project)
+        BaseBuilder.__init__(self, run, 'MSBuild')
 
-        if cmd:
-            # Execute the command ....
-            cmdResult = execute(cmd, workspace.tmpdir)
-
-            # Update context with the fact that this work was done
-            work = CommandWorkItem(WORK_TYPE_BUILD, cmd, cmdResult)
-            project.performedWork(work)
-            project.setBuilt(True)
-
-            # Update context state based of the result
-            if cmdResult.state != CMD_STATE_SUCCESS:
-                reason = REASON_BUILD_FAILED
-                if cmdResult.state == CMD_STATE_TIMED_OUT:
-                    reason = REASON_BUILD_TIMEDOUT
-                project.changeState(STATE_FAILED, reason)
-            else:
-                # For now, things are going good...
-                project.changeState(STATE_SUCCESS)
-
-    def getMSBuildCommand(self, project):
+    def get_command(self, project, _language):
         """
         Build an MSBuild command for this project, based on the <msbuild metadata
         select targets and build files as appropriate.
@@ -103,38 +68,18 @@ class MSBuildBuilder(RunSpecific):
         # The msbuild build file (or none == Solution/Project in current folder)
         buildfile = msbuild.getBuildFile()
 
-        # Optional 'verbose' or 'debug'
-        verbose = msbuild.isVerbose()
-        debug = msbuild.isDebug()
-
-        # Where to run this:
-        basedir = msbuild.getBaseDirectory() or project.getBaseDirectory()
-
-        # Get properties
-        properties = getMSBuildProperties(project)
-
-        # Optional 'timeout'
-        if msbuild.hasTimeout():
-            timeout = msbuild.getTimeout()
-        else:
-            timeout = setting.TIMEOUT
-
         # Run MSBuild...
-        cmd = Cmd(self.run.env.get_msbuild_command(),
-                  'build_' + project.getModule().getName() + '_' + \
-                  project.getName(),
-                  basedir, timeout=timeout)
+        cmd = get_command_skeleton(project, self.run.env.get_msbuild_command(), msbuild)
 
         # Allow MSBuild-level debugging...
-        if project.getWorkspace().isDebug() or project.isDebug() or debug:
+        if is_debug_enabled(project, msbuild):
             cmd.addParameter('/verbosity:diagnostic')
-        if project.getWorkspace().isVerbose() or project.isVerbose() \
-                or verbose:
+        if is_verbose_enabled(project, msbuild):
             cmd.addParameter('/verbosity:detailed')
 
         # These are from the project and/or workspace
         # These are 'normal' properties.
-        cmd.addNamedParameters(properties)
+        cmd.addNamedParameters(get_msbuild_properties(project))
 
         # target (or targets)...
         if target:
@@ -145,11 +90,3 @@ class MSBuildBuilder(RunSpecific):
             cmd.addParameter(buildfile)
 
         return cmd
-
-    def preview(self, project, _language, _stats):
-        """
-                Preview what an MSBuild build would look like.
-        """
-        cmd = self.getMSBuildCommand(project)
-        cmd.dump()
-

Modified: gump/live/python/gump/core/build/nuget.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/nuget.py?rev=1766555&r1=1766554&r2=1766555&view=diff
==============================================================================
--- gump/live/python/gump/core/build/nuget.py (original)
+++ gump/live/python/gump/core/build/nuget.py Tue Oct 25 16:43:21 2016
@@ -15,25 +15,17 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-__copyright__ = "Copyright (c) 1999-2015 Apache Software Foundation"
-__license__ = "http://www.apache.org/licenses/LICENSE-2.0"
+"""
+    A NuGet builder http://www.nuget.org/
+"""
 
-from gump import log
-from gump.core.build.script import getArgs
-from gump.core.config import setting
-from gump.core.model.state import REASON_BUILD_FAILED, REASON_BUILD_TIMEDOUT, \
-    STATE_FAILED, STATE_SUCCESS
-from gump.core.run.gumprun import RunSpecific
-from gump.util.process.command import CMD_STATE_SUCCESS, CMD_STATE_TIMED_OUT, \
-    Cmd
-from gump.util.process.launcher import execute
-from gump.util.work import CommandWorkItem, WORK_TYPE_BUILD
+from gump.core.build.basebuilder import BaseBuilder, get_args, get_command_skeleton
 
 ###############################################################################
 # Classes
 ###############################################################################
 
-class NuGetBuilder(RunSpecific):
+class NuGetBuilder(BaseBuilder):
     """
     A NuGet builder http://www.nuget.org/
     """
@@ -42,69 +34,16 @@ class NuGetBuilder(RunSpecific):
         """
         A NuGet 'builder'
         """
-        RunSpecific.__init__(self, run)
-
-    def buildProject(self, project, _languageHelper, _stats):
-        """
-        Run a NuGet command
-        """
-
-        workspace = self.run.getWorkspace()
-
-        log.info('Run NuGet on: #[' + `project.getPosition()` + '] : ' + \
-                 project.getName())
+        BaseBuilder.__init__(self, run, 'NuGet')
 
-        #
-        # Get the appropriate build command...
-        #
-        cmd = self.getNuGetCommand(project)
-
-        if cmd:
-            # Execute the command ....
-            cmdResult = execute(cmd, workspace.tmpdir)
-
-            # Update Context
-            work = CommandWorkItem(WORK_TYPE_BUILD, cmd, cmdResult)
-            project.performedWork(work)
-            project.setBuilt(True)
-
-            # Update Context w/ Results
-            if cmdResult.state != CMD_STATE_SUCCESS:
-                reason = REASON_BUILD_FAILED
-                if cmdResult.state == CMD_STATE_TIMED_OUT:
-                    reason = REASON_BUILD_TIMEDOUT
-                project.changeState(STATE_FAILED, reason)
-
-            else:
-                # For now, things are going good...
-                project.changeState(STATE_SUCCESS)
-
-    def getNuGetCommand(self, project):
+    def get_command(self, project, _language):
         """ Return the command object for a <nuget entry """
         nuget = project.nuget
 
-        # Where to run this:
-        basedir = nuget.getBaseDirectory() or project.getBaseDirectory()
-
-        # Optional 'timeout'
-        if nuget.hasTimeout():
-            timeout = nuget.getTimeout()
-        else:
-            timeout = setting.TIMEOUT
-
-        cmd = Cmd(self.run.env.get_nuget_command(),
-                  'buildscript_' + project.getModule().getName() + '_' + \
-                  project.getName(), basedir, timeout=timeout)
+        cmd = get_command_skeleton(project, self.run.env.get_nuget_command(), nuget)
         cmd.addParameter(nuget.getCommand())
-        cmd.addParameters(getArgs(nuget))
+        cmd.addParameters(get_args(nuget))
         if nuget.hasSolution():
             cmd.addParameter(nuget.getSolution())
 
         return cmd
-
-    def preview(self, project, _languageHelper, _stats):
-        """
-        Preview what this would do
-        """
-        command = self.getNuGetCommand(project)
-        command.dump()

Modified: gump/live/python/gump/core/build/script.py
URL: http://svn.apache.org/viewvc/gump/live/python/gump/core/build/script.py?rev=1766555&r1=1766554&r2=1766555&view=diff
==============================================================================
--- gump/live/python/gump/core/build/script.py (original)
+++ gump/live/python/gump/core/build/script.py Tue Oct 25 16:43:21 2016
@@ -16,93 +16,31 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-__revision__  = "$Rev: 36667 $"
-__date__      = "$Date: 2004-08-20 08:55:45 -0600 (Fri, 20 Aug 2004) $"
-__copyright__ = "Copyright (c) 1999-2004 Apache Software Foundation"
-__license__   = "http://www.apache.org/licenses/LICENSE-2.0"
-
-
 """
-
+    The script builder runs a (platform specific) script
 """
 
 import os.path
 
-from gump import log
-from gump.core.run.gumprun import RunSpecific
-from gump.core.config import setting
-from gump.core.model.state import REASON_BUILD_FAILED, REASON_BUILD_TIMEDOUT, STATE_FAILED,\
-    STATE_SUCCESS
-from gump.util.process.command import CMD_STATE_SUCCESS, CMD_STATE_TIMED_OUT, Cmd, Parameters
-from gump.util.process.launcher import execute
-from gump.util.work import CommandWorkItem, WORK_TYPE_BUILD
+from gump.core.build.basebuilder import BaseBuilder, get_args, get_command_skeleton
 
 
 ###############################################################################
-# Functions
-###############################################################################
-def getArgs(script):
-    """ Get command line args for a script builder (or other arg supporters) """
-    args = Parameters()
-    for arg in script.getProperties():
-        if arg.name.startswith('--') or not arg.name.startswith('-'):
-            if arg.value and arg.value != "*Unset*": # TODO: fix this properly. Ugly!
-                args.addNamedParameter(arg.name, arg.value, '=')
-            else:
-                args.addParameter(arg.name)
-        else:
-            args.addParameter(arg.name)
-            args.addParameter(arg.value)
-    return args
-
-###############################################################################
 # Classes
 ###############################################################################
 
-class ScriptBuilder(RunSpecific):
+class ScriptBuilder(BaseBuilder):
+    """
+    The script builder runs a (platform specific) script
+    """
 
     def __init__(self, run):
         """
         A script 'builder'
         """
-        RunSpecific.__init__(self, run)
-
-    def buildProject(self, project, languageHelper, stats):
-        """
-        Run a project's script (a .bat or a .sh as appropriate)
-        """
+        BaseBuilder.__init__(self, run, 'Project (as a script)')
 
-        workspace = self.run.getWorkspace()
-
-        log.info('Run Project (as a script): #[' + `project.getPosition()` +\
-                 '] : ' + project.getName())
-
-        #
-        # Get the appropriate build command...
-        #
-        cmd = self.getScriptCommand(project, languageHelper)
-
-        if cmd:
-            # Execute the command ....
-            cmdResult = execute(cmd, workspace.tmpdir)
-
-            # Update Context
-            work = CommandWorkItem(WORK_TYPE_BUILD, cmd, cmdResult)
-            project.performedWork(work)
-            project.setBuilt(True)
-
-            # Update Context w/ Results
-            if cmdResult.state != CMD_STATE_SUCCESS:
-                reason = REASON_BUILD_FAILED
-                if cmdResult.state == CMD_STATE_TIMED_OUT:
-                    reason = REASON_BUILD_TIMEDOUT
-                project.changeState(STATE_FAILED, reason)
-
-            else:
-                # For now, things are going good...
-                project.changeState(STATE_SUCCESS)
-
-    def getScriptCommand(self, project, languageHelper):
+    def get_command(self, project, language):
         """ Return the command object for a <script entry """
         script = project.script
 
@@ -128,25 +66,9 @@ class ScriptBuilder(RunSpecific):
             scriptfile = os.path.abspath(os.path.join(basedir, scriptfullname))
 
         # Needed for (at least) a compiler...
-        (classpath, bootclasspath) = languageHelper.getClasspaths(project)
+        (classpath, _bootclasspath) = language.getClasspaths(project)
 
-        # Optional 'timeout'
-        if script.hasTimeout():
-            timeout = script.getTimeout()
-        else:
-            timeout = setting.TIMEOUT
-
-        cmd = Cmd(scriptfile,
-                  'buildscript_'+project.getModule().getName()+'_'+project.getName(),
-                  basedir, {'CLASSPATH':classpath}, timeout)
-
-        cmd.addParameters(getArgs(script))
+        cmd = get_command_skeleton(project, scriptfile, script, {'CLASSPATH' : classpath})
+        cmd.addParameters(get_args(script))
 
         return cmd
-
-    def preview(self, project, languageHelper, stats):
-        """
-        Preview what this would do
-        """
-        cmd = self.getScriptCommand(project, languageHelper) 
-        cmd.dump()



Mime
View raw message