[KERNEL][TEST][API] Implement screenshot taking

git-svn-id: svn://kolibrios.org@9256 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Magomed Kostoev (mkostoevr) 2021-11-05 11:53:13 +00:00
parent 5aafac98ba
commit b3fb622ac5

View File

@ -67,6 +67,9 @@ class Qemu:
for key in keys.split():
self.send_monitor_command(f"sendkey {key}")
def take_screenshot(self, fname):
self.send_monitor_command(f"screendump {fname}")
def send_monitor_command(self, command):
self.monitor_in.write(bytes(command + "\n", "utf-8"))
self.monitor_in.flush()