• Home
  • Raw
  • Download

Lines Matching full:machine

6 """Machine Manager module."""
40 """Raised when cannot find/access the machine locks directory."""
48 """The machine class."""
86 command, machine=self.name, chromeos_root=self.chromeos_root)
129 # TODO yunlian: when the machine in rebooting, it will not return
133 command, machine=self.name, chromeos_root=self.chromeos_root)
134 assert ret == 0, 'Could not get meminfo from machine: %s' % self.name
141 command, machine=self.name, chromeos_root=self.chromeos_root)
142 assert ret == 0, 'Could not get cpuinfo from machine: %s' % self.name
160 command, machine=self.name, chromeos_root=self.chromeos_root)
168 command, machine=self.name, chromeos_root=self.chromeos_root)
178 assert 0, 'Could not get machine_id from machine: %s' % self.name
198 runs within the same experiment from trying to use the same machine at the
240 def GetChromeVersion(self, machine): argument
245 cmd, machine=machine.name, chromeos_root=self.chromeos_root)
248 "Couldn't get Chrome version from %s." % machine.name)
254 def ImageMachine(self, machine, label): argument
257 if checksum and (machine.checksum == checksum):
267 '--remote=%s' % machine.name,
281 self.logger.LogOutput('Pushing image onto machine.')
292 cmd, machine=machine.name, chromeos_root=self.chromeos_root)
295 self.logger.LogOutput('Pushing image onto machine.')
300 raise RuntimeError("Could not image machine: '%s'." % machine.name)
303 machine.checksum = checksum
304 machine.image = label.chromeos_image
305 machine.label = label
308 label.chrome_version = self.GetChromeVersion(machine)
318 for machine in self.GetMachines(label):
319 # Make sure the machine's checksums are calculated.
320 if not machine.machine_checksum:
321 machine.SetUpChecksumInfo()
322 cs = machine.machine_checksum
323 # If this is the first machine we've examined, initialize
327 # Make sure this machine's checksum matches our 'common' checksum.
329 raise BadChecksum('Machine checksums do not match!')
338 for machine in self.GetMachines(label):
339 if machine.checksum_string:
340 self.machine_checksum_string[label.name] = machine.checksum_string
345 assert cros_machine, "Machine can't be None"
351 locked = file_lock_machine.Machine(cros_machine.name,
360 machine=cros_machine.name)
375 'Checking machine characteristics for %s' % machine_name)
384 res = file_lock_machine.Machine(machine_name,
387 self.logger.LogError("Could not unlock machine: '%s'." % machine_name)
416 machine.name for machine in machines))
424 machine for machine in self.GetAvailableMachines(label)
425 if not machine.locked
437 # This logic ensures that threads waiting on a machine will get a machine
464 def ReleaseMachine(self, machine): argument
467 if machine.name == m.name:
478 res = file_lock_machine.Machine(m.name, self.locks_dir).Unlock(True)
481 self.logger.LogError("Could not unlock machine: '%s'." % m.name)
491 header = stringify_fmt % ('Machine', 'Thread', 'Lock', 'Status',
508 return 'Machine Status:\n%s' % '\n'.join(table)
514 for machine in self._all_machines:
515 if machine.name in label.remote:
516 dic[machine.cpuinfo].append(label.name)
532 """Mock cros machine class."""
634 # In test, we assume "lumpy1", "lumpy2" are the same machine.
654 """Mock machine manager class."""
670 'Could not find checksum for machine %s' % machine_name)
672 # machine is unreachable, then its machine_checksum is None. Here we
678 def GetChromeVersion(self, machine): argument
682 for machine in self._all_machines:
683 if not machine.locked:
684 machine.locked = True
685 return machine
688 def ImageMachine(self, machine, label): argument
689 if machine or label:
693 def ReleaseMachine(self, machine): argument
694 machine.locked = False
707 for machine in self.GetMachines(label):
708 machine.machine_checksum = common_checksum