def _UpdateStdOut(self, call : ExtAppCall): self.stderr = call.get_stderr() self.stdout = call.get_stdout() self.allStdOut += self.stdout #Remove expected error messages stderr = self.stderr stderr = stderr.replace("Xlib: extension \"RANDR\" missing on display \":1\".","").strip() #Expected error from xvfb if len(stderr) != 0: raise SdkStdErrNotEmpty("STDERR not empty:\n<includes expected errors!>\n" + self.stderr) if call.get_exit_code() != 0: raise SdkExitCodeNotZero("Command exited with code {}".format(call.get_exit_code()))
def _RunVivado(self, workDir : str, args : str): #Windows if sys.platform.startswith("win"): vivadoCmd = "bin/vivado.bat" #Other OS not yet supported elif sys.platform.startswith("linux"): vivadoCmd = "bin/vivado" else: raise Exception("OS Not Supported") call = ExtAppCall(workDir, "{}/{} -mode batch {}".format(self._vivado_path, vivadoCmd, args)) call.run_sync() self.stderr = call.get_stderr() self.stdout = call.get_stdout() if len(self.stderr) != 0: raise Exception("STDERR not empty\n" + self.stderr) if call.get_exit_code() != 0: raise Exception("Command exited with code {}".format(call.get_exit_code()))