Example #1
0
 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))
Example #2
0
 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))
Example #3
0
 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")
Example #4
0
 def download_file(self, source, destination):
     logger.info("Downloading...")
     self.__connector.download_file(source, destination)
     logger.info("File was downloaded.")
Example #5
0
 def upload_file(self, source, destination):
     logger.info("Uploading...")
     self.__connector.upload_file(source, destination)
     logger.info("File was uploaded.")
Example #6
0
 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")
Example #7
0
 def download_file(self, source, destination):
     logger.info("Downloading...")
     self.__connector.download_file(source, destination)
     logger.info("File was downloaded.")
Example #8
0
 def upload_file(self, source, destination):
     logger.info("Uploading...")
     self.__connector.upload_file(source, destination)
     logger.info("File was uploaded.")
Example #9
0
from please.log import logger

logger.debug('DEBUG')
logger.info('INFO')
logger.warning('WARNING')
logger.error('ERROR')
logger.critical('CRITICAL')