def run_once(self, host=None):
     # For the entire duration of this server test (across crashes
     # and boots after crashes) we want to disable log rotation.
     log_pauser = cros_logging.LogRotationPauser(host)
     try:
         log_pauser.begin()
         self._run_while_paused(host)
     finally:
         log_pauser.end()
 def run_test(self, url, *args, **dargs):
     log_pauser = cros_logging.LogRotationPauser()
     passed = False
     try:
         log_pauser.begin()
         passed = base_client_job.run_test(self, url, *args, **dargs)
         if not passed:
             # Save the VM state immediately after the test failure.
             # This is a NOOP if the the test isn't running in a VM or
             # if the VM is not properly configured to save state.
             _group, testname = self.pkgmgr.get_package_name(url, 'test')
             now = datetime.now().strftime('%I:%M:%S.%f')
             checkpoint_name = '%s-%s' % (testname, now)
             utils.save_vm_state(checkpoint_name)
     finally:
         log_pauser.end()
     return passed
 def initialize(self):
     self._pauser = cros_logging.LogRotationPauser()
     self._pauser.begin()