def testExecuteRemoteHBuild( self ): name = 'buildscript.py' path = 'admin' location = 'git:git://github.com/KDAB/Make-O-Matic.git' remote = RemoteBuilder( 'HEAD', location = location, path = path, script = name ) # run remote.invokeBuild( args = [ '-vv', '-t', 'H', '-s', 'disable-test,disable-create-docs'] )
def testFetchRemoteBuildscript( self ): name = 'buildscript.py' path = 'admin' location = 'git://github.com/KDAB/Make-O-Matic.git' remote = RemoteBuilder( 'HEAD', location = location, path = path, script = name ) # run path, temps = remote.fetchBuildScript() self.assertTrue( os.path.exists( path ) ) del temps
def execute( self ): # mApp().debugN( self, 2, 'now invoking the build script {0} with options {1}'.format( # self.getParameters().getBuildscriptName(), # ' '.join( self.getParameters().getBuildScriptOptions() ) ) ) remote = RemoteBuilder( revision = self.getParameters().getRevision(), location = self.getParameters().getUrl(), path = self.getParameters().getPath(), script = self.getParameters().getBuildscriptName() ) # FIXME add a timeout? runner = remote.invokeBuild( self.getParameters().getBuildScriptOptions() ) if runner.getStdOut(): print( runner.getStdOutAsString() ) self.registerReturnCode( runner.getReturnCode() )
def execute( self ): location = self.getParameters().getScmLocation() or self.__location branch = self.getParameters().getBranch() or self.__branch tag = self.getParameters().getTag() or self.__tag builder = RemoteBuilder( location = location, branch = branch, tag = tag, path = self.__path, script = self.__script, rootTrunk = self.__rootTrunk ) builder.setRevision( self.getParameters().getRevision() ) options = sys.argv[1:] # if location, branch or tag parameters are not specified on the command line, add the settings from # the invoking script to the arguments: if not self.getParameters().getScmLocation() and location: options = [ '-u', location] + options if not self.getParameters().getBranch() and branch: options = [ '--branch', branch ] + options if not self.getParameters().getTag() and tag: options = [ '--tag', tag] + options mode = self.getSettings().get( Settings.ScriptRunMode ) if mode == Settings.RunMode_Print and self.doBranchBuilds(): command = self.getParameters().getArgs()[2] options = self.getParameters().getArgs()[3:] builder.getRevisionsSinceForBranchBuilds( command, options, location, branch, tag ) else: runner = builder.invokeBuild( options ) rc = runner.getReturnCode() self.registerReturnCode( rc )