Lines Matching +full:simulation +full:- +full:local +full:- +full:host
3 # Use of this source code is governed by a BSD-style license that can be
63 """Common error class for servod console-back control failures."""
91 return '%s -- StatusLine=%s' % (self.when, self.line)
110 @param strerror: OS-provided description ("connection reset by peer")
121 msgv.append('--')
133 servo-specific versions, and extracting exception info from xmlrplib.Fault.
266 tar_cmd = 'tar xf %s -C %s %s' % (tarball, dest_dir, image)
277 """Class to provide board-specific power operations.
297 # Delay in seconds needed between asserting and de-asserting
313 logging.info('Servo setup does not support power-state operations. '
314 'All power-state calls will lead to error.TestFail')
348 This asserts, then de-asserts the 'warm_reset' signal.
490 # The UART stream may contain non-printable characters, and servo
515 control of various partner devices. Servo's features include the simulation
516 of pressing the power button, closing the lid, and pressing Ctrl-d. This
518 process. It provides both high-level functions for common servo tasks and
519 low-level functions for directly setting and reading gpios.
537 # Maximum number of times to re-read power button on release.
554 # Time between an usb disk plugged-in and detected in the system.
564 # extract firmware on the lab host machines (b/149419503).
582 the host running servod.
625 The power state controller provides board-independent
626 interfaces for reset, power-on, power-off operations.
661 servo=self, description='initialize_dut()->hwinit()'):
672 # SBU voltages wrt servo-hw/dut-hw
692 logging.info('Cold-reset for DUT requested, but servo '
697 servo=self, description='initialize_dut()->get_version()'):
706 True if local hosted; otherwise, False.
713 lsb_release_content = self.system_output('cat /etc/lsb-release',
721 # TODO: use system_output once servod --sversion prints to stdout
723 result = self._servo_host.run('servod --sversion 2>&1')
727 result = self._servo_host.run('servod --version 2>&1')
733 # servod v1.0.816-ff8e966 // the extended version with git hash
734 # 2020-04-08 01:10:29 // the time of the latest commit
735 # chromeos-ci-legacy-us-central1-b-x32-55-u8zc // builder information
739 sversion = sversion.decode("utf-8")
833 time_left = time_left - self.SHORT_DELAY
851 time_left = time_left - self.SHORT_DELAY
881 """Simulate Ctrl-d simultaneous button presses.
890 """Simulate Ctrl-r simultaneous button presses.
898 """Simulate Ctrl-s simultaneous button presses.
907 """Simulate Ctrl-u simultaneous button presses.
916 """Simulate Ctrl-enter simultaneous button presses.
1018 """Boot a dev-mode device that is powered off."""
1024 """Pass through boot screens in dev-mode."""
1092 description='has_control(%s)->doc()' % ctrl_name):
1104 @returns: [|prefix|.]ctrl_name depending on whether prefix is non-empty.
1142 retry_count -= 1
1183 """Probe the USB disk device plugged-in the servo from the host side.
1203 @param image_path: Path on the host to the recovery image.
1220 # The servod control automatically sets up the host in the host
1249 """Boot host DUT in recovery mode.
1254 # This call has a built-in delay to ensure that we wait a timeout
1287 @param image_path: Path on the host to the recovery image.
1303 """Copy image to the servo host.
1306 located on the host to which the servo device is connected. Sometimes
1307 servo is controlled by a remote host, in this case the image needs to
1308 be transferred to the remote host. This adds the servod port number, to
1311 directory shall be copied to the host as well.
1332 """Execute the passed in command on the servod host.
1338 logging.info('Will execute on servo host: %s', command)
1344 """Execute the passed in command on the servod host, return stdout.
1349 @param ignore_status a Boolean, if true - ignore command's nonzero exit
1368 servo=self, description='get_servo_version()->get_version()'):
1391 """Return the servo_v4_type (such as 'type-c'), or None if not v4."""
1400 """True if the servo is v4 and type-a, else False."""
1401 return self.get_servo_v4_type() == 'type-a'
1404 """True if the servo is v4 and type-c, else False."""
1405 return self.get_servo_v4_type() == 'type-c'
1409 return self.get_servo_type().split('_with_')[-1].split('_and_')[0]
1423 return servo_type.split('_with_')[-1].split('_and_')[-1]
1536 @param fake_image: True to return a fake zero-filled image instead.
1541 # Ignore extracting EC image and re-programming if not a Chrome EC
1544 logging.warning('Not a Chrome EC, ignore re-programming it')
1581 # Create a small (25% of original size) zero-filled binary to
1609 'image-%s.bin' % model,
1613 bios_image_candidates.append('image-dratini.bin')
1618 bios_image_candidates.append('image-%s.bin' % fw_target)
1623 bios_image_candidates.append('image-%s.bin' % board)
1642 """Connect USB flash stick to either host or DUT, or turn USB port off.
1645 connection between the USB port J3 and either host or DUT side. It
1648 @param usb_state: A string, one of 'dut', 'host', or 'off'.
1649 'dut' and 'host' indicate which side the
1654 'host', or 'off'.
1662 elif usb_state == 'host':
1669 # - the port is power cycled if it is changing directions
1670 # - the port ends up in a powered state after this call
1671 # - if facing the host side, the call only returns once a usb block
1682 @return: A string, one of 'dut', 'host', or 'off'.
1689 return 'host'
1749 # Only servo v4 type-c supports this feature.
1751 logging.info('PD controls require a servo v4 type-c.')
1765 # Only servo v4 type-c supports this feature.
1840 @returns: fw version for non-ccd devices, cr50 version for ccd device
1871 # a future v-whatever as well.