Ejemplo n.º 1
0
def getInteractiveActionClasses():
    classes = [ShowMigrationNotes, ShowChangeLogs, ShowVersions, AboutTextTest]
    for fileName in plugins.findDataPaths(["*.txt"], dataDirName="doc"):
        classes.append(
            plugins.Callable(TextFileDisplayDialog,
                             os.path.basename(fileName)))
    return classes
Ejemplo n.º 2
0
    def submitSlave(self, submitter, cmdArgs, slaveEnv, *args):
        jobId = self.getNextJobId()
        self.remoteProcessInfo[jobId] = None, None
        if not self.thread.isAlive():
            if self.startMethod:
                self.diag.info(
                    "Starting EC2 instance with private IP address '" +
                    self.ip + "'...")
                try:
                    self.startMethod()
                except Exception as e:
                    sys.stderr.write(
                        "WARNING: failed to start instance with private IP address '"
                        + self.ip + "'\n" + str(e))
                    return
                self.startMethod = self.waitForStart

            self.thread.start()
        argsWithEnv = self.getCommandArgsWithEnvironment(cmdArgs, slaveEnv)
        remoteCmdArgs = self.app.getCommandArgsOn(self.fullMachine,
                                                  argsWithEnv,
                                                  agentForwarding=True)
        self.queue.put(
            (jobId, plugins.Callable(submitter, remoteCmdArgs, slaveEnv,
                                     *args)))
        return jobId
Ejemplo n.º 3
0
 def _getFromApps(self, method, *args, **kwargs):
     callables = [plugins.Callable(method, app, *args) for app in self.apps]
     aggregator = plugins.ResponseAggregator(callables)
     try:
         return aggregator(**kwargs)
     except plugins.AggregationError, e:
         app = self.apps[e.index]
         plugins.printWarning("GUI configuration '" + "::".join(args) +\
                              "' differs between applications, ignoring that from " + repr(app) + "\n" + \
                              "Value was " + repr(e.value2) + ", change from " + repr(e.value1), stdout=True)
         return e.value1
Ejemplo n.º 4
0
                try:
                    self.startMethod()
                except Exception, e:
                    sys.stderr.write(
                        "WARNING: failed to start instance with private IP address '"
                        + self.ip + "'\n" + str(e))
                    return
                self.startMethod = self.waitForStart

            self.thread.start()
        argsWithEnv = self.getCommandArgsWithEnvironment(cmdArgs, slaveEnv)
        remoteCmdArgs = self.app.getCommandArgsOn(self.fullMachine,
                                                  argsWithEnv,
                                                  agentForwarding=True)
        self.queue.put(
            (jobId, plugins.Callable(submitter, remoteCmdArgs, slaveEnv,
                                     *args)))
        return jobId

    def killRemoteProcess(self, jobId, sig):
        if self.synchProc:
            self.errorMessage = "Terminated test during file synchronisation"
            self.synchProc.send_signal(signal.SIGTERM)
            return True, None
        if self.startWaitCounter:
            self.errorMessage = "Terminated test while waiting for instance to start up"
            return True, None
        # ssh doesn't forward signals to remote processes.
        # We need to find it ourselves and send it explicitly. Can assume python exists remotely, but not much else.
        localPid, remotePid = self.waitForRemoteProcessId(jobId)
        if remotePid:
            cmdArgs = [