Exemple #1
0
 def buildAll(self):
     rootPath = os.path.join(self.config["stageDir"], "trunk", "qooxdoo")
     
     if self.config["svnRevert"]:
         util.svnRevert(rootPath)
     
     if self.config["svnUpdate"]:
         util.svnUpdate(rootPath)
         self.log.info("Updated to revision %s" %util.getSvnVersion(rootPath))
     
     self.log.info("Building all configured targets.")
     for target in self.config["targets"]:
         self.buildApp(target)
Exemple #2
0
 def __getGeneratorResultDict(cls, job, path):
     result = {
       "job" : job,
       "path" : path,
       "command" : False, 
       "startDate" : util.getTimestamp(),
       "revision" : util.getSvnVersion(path),
       "host" : util.getHostName(),
       "stopDate" : False,
       "returncode" : False,
       "stdout" : False,
       "stderr" : False
     }
     return result
Exemple #3
0
 def __getGeneratorResultDict(cls, job, path):
     result = {
         "job": job,
         "path": path,
         "command": False,
         "startDate": util.getTimestamp(),
         "revision": util.getSvnVersion(path),
         "host": util.getHostName(),
         "stopDate": False,
         "returncode": False,
         "stdout": False,
         "stderr": False
     }
     return result
Exemple #4
0
    def buildApp(self, target):
        buildLog = None
        if "buildLogDir" in self.config:
            buildLog = self.prepareBuildLog(self.config["buildLogDir"], target)

        cmd = "%s -w %s %s" % (self.config["batbuild"],
                               self.config["stageDir"],
                               self.config["targets"][target])

        buildStatusFile = os.path.join(self.config["stageDir"], "trunk",
                                       "qooxdoo", "buildStatus.json")
        self.buildStatus = self.getBuildStatusFromFile(buildStatusFile)
        self.buildStatus[target] = {
            "SVNRevision":
            util.getSvnVersion(os.path.join(self.config["stageDir"], "trunk")),
            "BuildError":
            False,
            "BuildStarted":
            time.strftime(Builder.timeFormat),
            "BuildFinished":
            False
        }

        if "branch" in self.config:
            self.buildStatus[target]["branch"] = self.config["branch"]

        if (self.simulate):
            if buildLog:
                buildLog.write("Building target %s: %s" % (target, cmd))
                buildLog.close()
            return

        if (self.config["buildLogLevel"] == "debug" and buildLog):
            # Start build with full logging
            util.invokeLog(cmd, buildLog)
            buildLog.close()
            return

        # Start build, only log errors
        self.buildAppWithErrorLogging(target, cmd, buildLog)

        self.storeBuildStatus()
Exemple #5
0
 def buildApp(self, target):
     buildLog = None
     if "buildLogDir" in self.config:
         buildLog = self.prepareBuildLog(self.config["buildLogDir"], target)
         
     cmd = "%s -w %s %s" %(self.config["batbuild"], self.config["stageDir"], self.config["targets"][target])
     
     buildStatusFile = os.path.join(self.config["stageDir"], "trunk", "qooxdoo", "buildStatus.json")
     self.buildStatus = self.getBuildStatusFromFile(buildStatusFile)
     self.buildStatus[target] = {
       "SVNRevision" : util.getSvnVersion(os.path.join(self.config["stageDir"], "trunk")),
       "BuildError"  : False,
       "BuildStarted" : time.strftime(Builder.timeFormat),
       "BuildFinished" : False
     }
     
     if "branch" in self.config:
         self.buildStatus[target]["branch"] = self.config["branch"] 
     
     if (self.simulate):
         if buildLog:
             buildLog.write("Building target %s: %s" %(target, cmd))
             buildLog.close()
         return
       
       
     if (self.config["buildLogLevel"] == "debug" and buildLog):
         # Start build with full logging
         util.invokeLog(cmd, buildLog)
         buildLog.close()
         return
     
     # Start build, only log errors
     self.buildAppWithErrorLogging(target, cmd, buildLog)
     
     self.storeBuildStatus()
Exemple #6
0
        return buildStatus

        
    def buildAll(self):
        rootPath = os.path.join(self.config["stageDir"], "trunk", "qooxdoo")
        
        if self.config["svnRevert"]:
            try:
                util.svnRevert(rootPath)
            except Exception, e:
                self.log.error("Error reverting SVN: " + str(e))
        
        if self.config["svnUpdate"]:
            try:
                util.svnUpdate(rootPath)
                self.log.info("Updated to revision %s" %util.getSvnVersion(rootPath))
            except Exception, e:
                self.log.error("Error updating SVN: " + str(e))
        
        self.log.info("Building all configured targets.")
        for target in self.config["targets"]:
            self.buildApp(target)

    
    @classmethod
    def testGenerator(cls, config, logger):
        initialPath = os.getcwd()
        results = []
        for test in config:
            logger.debug("Changing working dir to " + test["path"])
            os.chdir(test["path"])
Exemple #7
0
        return buildStatus

    def buildAll(self):
        rootPath = os.path.join(self.config["stageDir"], "trunk", "qooxdoo")

        if self.config["svnRevert"]:
            try:
                util.svnRevert(rootPath)
            except Exception, e:
                self.log.error("Error reverting SVN: " + str(e))

        if self.config["svnUpdate"]:
            try:
                util.svnUpdate(rootPath)
                self.log.info("Updated to revision %s" %
                              util.getSvnVersion(rootPath))
            except Exception, e:
                self.log.error("Error updating SVN: " + str(e))

        self.log.info("Building all configured targets.")
        for target in self.config["targets"]:
            self.buildApp(target)

    @classmethod
    def testGenerator(cls, config, logger):
        initialPath = os.getcwd()
        results = []
        for test in config:
            logger.debug("Changing working dir to " + test["path"])
            os.chdir(test["path"])
            logger.info("Getting list of Generator jobs")