Ejemplo n.º 1
0
    def setup(self, resultsDir, transfer_binaries):
        self.fullResultsDirPath = helper.create_result_dir(
            self.basePath, resultsDir)
        paramiko.util.log_to_file(
            os.path.join(self.fullResultsDirPath, 'paramiko.log'))
        self.createTargets()
        log.info("turning on all power outlets...")
        for target in itertools.chain(self.bridgeTargets.itervalues(),
                                      self.targets.itervalues()):
            if target.powerDevice is not None:
                if not target.powerDevice.switch(target.powerOutletNr, True):
                    log.info(
                        "Could not turn on power outlet for target {0} because the power outlet is not available"
                        .format(target.name))
                    return False

        if self.downloadFromCICache:
            for target in self.targets.itervalues():
                downloadSuccessful, version, commitCount = helper.download_tar_from_ci_cache(
                    self.gitCommitHash, target.buildJobName,
                    self.config.ciCacheUrl, self.basePath)
                if not downloadSuccessful:
                    return False
                target.ramsesVersion = version
                target.gitCommitCount = commitCount

        return self.setupTargets(transfer_binaries and (not self.noTransfer))
Ejemplo n.º 2
0
    def setup(self, resultsDir, transfer_binaries):
        self.fullResultsDirPath = helper.create_result_dir(self.basePath, resultsDir)
        paramiko.util.log_to_file(os.path.join(self.fullResultsDirPath, 'paramiko.log'))
        self.createTargets()
        log.info("turning on all power outlets...")
        for target in itertools.chain(self.bridgeTargets.values(), self.targets.values()):
            if target.powerDevice is not None:
                if not target.powerDevice.switch(target.powerOutletNr, True):
                    log.info("Could not turn on power outlet for target {0} because the power outlet is not available".format(target.name))
                    return False

        return self.setupTargets(transfer_binaries and (not self.noTransfer))
Ejemplo n.º 3
0
 def setup(self, resultsDir, transfer_binaries):
     self.fullResultsDirPath = helper.create_result_dir(self.basePath, resultsDir)
     self.createTargets()
     return self.setupTargets(transfer_binaries)