mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +00:00
Gem5Device: Move resize shell commands to own method
Moved the commands to resize the shell to their own method. They are now executed twice. Once as soon as the shell is connected, and a second time as part of initialize. This latter call takes place after the isntallation of busybox.
This commit is contained in:
parent
32cf5c0939
commit
d98bdac0be
@ -272,14 +272,7 @@ class BaseGem5Device(object):
|
||||
|
||||
self.sckt.setecho(False)
|
||||
self.sync_gem5_shell()
|
||||
|
||||
# Try and avoid line wrapping as much as possible. Don't check the error
|
||||
# codes from these command because some of them WILL fail.
|
||||
self.gem5_shell('stty columns 1024', check_exit_code=False)
|
||||
self.gem5_shell('{} stty columns 1024'.format(self.busybox), check_exit_code=False)
|
||||
self.gem5_shell('stty cols 1024', check_exit_code=False)
|
||||
self.gem5_shell('{} stty cols 1024'.format(self.busybox), check_exit_code=False)
|
||||
self.gem5_shell('reset', check_exit_code=False)
|
||||
self.resize_shell()
|
||||
|
||||
def get_properties(self, context): # pylint: disable=R0801
|
||||
""" Get the property files from the device """
|
||||
@ -622,6 +615,19 @@ class BaseGem5Device(object):
|
||||
self.sckt.expect([self.sckt.UNIQUE_PROMPT, self.sckt.PROMPT], timeout=self.delay)
|
||||
self.sckt.expect([self.sckt.UNIQUE_PROMPT, self.sckt.PROMPT], timeout=self.delay)
|
||||
|
||||
def resize_shell(self):
|
||||
"""
|
||||
Resize the shell to avoid line wrapping issues.
|
||||
|
||||
"""
|
||||
# Try and avoid line wrapping as much as possible. Don't check the error
|
||||
# codes from these command because some of them WILL fail.
|
||||
self.gem5_shell('stty columns 1024', check_exit_code=False)
|
||||
self.gem5_shell('{} stty columns 1024'.format(self.busybox), check_exit_code=False)
|
||||
self.gem5_shell('stty cols 1024', check_exit_code=False)
|
||||
self.gem5_shell('{} stty cols 1024'.format(self.busybox), check_exit_code=False)
|
||||
self.gem5_shell('reset', check_exit_code=False)
|
||||
|
||||
def move_to_temp_dir(self, source):
|
||||
"""
|
||||
Move a file to the temporary directory on the host for copying to the
|
||||
|
@ -204,3 +204,6 @@ class Gem5AndroidDevice(BaseGem5Device, AndroidDevice):
|
||||
# If we didn't manage to do the above, call the parent class.
|
||||
self.logger.warning("capture_screen: falling back to parent class implementation")
|
||||
AndroidDevice.capture_screen(self, filepath)
|
||||
|
||||
def initialize(self, context):
|
||||
self.resize_shell()
|
||||
|
@ -108,3 +108,6 @@ class Gem5LinuxDevice(BaseGem5Device, LinuxDevice):
|
||||
# If we didn't manage to do the above, call the parent class.
|
||||
self.logger.warning("capture_screen: falling back to parent class implementation")
|
||||
LinuxDevice.capture_screen(self, filepath)
|
||||
|
||||
def initialize(self, context):
|
||||
self.resize_shell()
|
||||
|
Loading…
x
Reference in New Issue
Block a user