def validate(self, test_filename, test_num): logger.info("Start validation on test #%d" % test_num) if self.__well_done: outcome, errors = self.__well_done.check(test_filename, fix_inplace=False) if outcome == well_done.CRASH: raise PleaseException("Well done test failed on %s" % " ".join(errors)) if self.__validator: invoke_info, stdout, stderr = validator_runner.validate( self.__validator, test_filename) if invoke_info.verdict == "FNF": raise PleaseException("Validator %s not found" % validator_src) if invoke_info.verdict == "OK": logger.info("Validator said OK") else: raise PleaseException( form_error_output.process_err_exit("Validator has crashed", invoke_info.verdict, invoke_info.return_code, stdout, stderr))
def validate(self, test_filename, test_num): logger.info("Start validation on test #%d" % test_num) if self.__well_done: outcome, errors = self.__well_done.check(test_filename, fix_inplace=False) if outcome == well_done.CRASH: raise PleaseException("Well done test failed on %s" % " ".join(errors)) if self.__validator: invoke_info, stdout, stderr = validator_runner.validate( self.__validator, test_filename) if invoke_info.verdict == "FNF": raise PleaseException("Validator %s not found" % validator_src) if invoke_info.verdict == "OK": logger.info("Validator said OK") else: raise PleaseException( form_error_output.process_err_exit( "Validator has crashed", invoke_info.verdict, invoke_info.return_code, stdout, stderr))
def run_command(self, command): logger.info( "Connecting to server and running the command: {}".format(command)) self.__connector.run_command(command) logger.info("Command executed")
def download_file(self, source, destination): logger.info("Downloading...") self.__connector.download_file(source, destination) logger.info("File was downloaded.")
def upload_file(self, source, destination): logger.info("Uploading...") self.__connector.upload_file(source, destination) logger.info("File was uploaded.")
def run_command(self, command): logger.info("Connecting to server and running the command: {}".format(command)) self.__connector.run_command(command) logger.info("Command executed")
from please.log import logger logger.debug('DEBUG') logger.info('INFO') logger.warning('WARNING') logger.error('ERROR') logger.critical('CRITICAL')