mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-02 03:12:34 +01:00
revent: Various fixes.
revent: - Fixed 32-bit/64-bit compatibility by no longer "long" for timestamps - Removed superfluous code - SIGTERM is now handled only while waiting for a file not while processing one - Added '-s' to docs - Fixed path_buff size Record Command: - Removed timeout in command as -s is specified. - Previously the command would send SIGTERM to revent but not wait for it to terminate. This would result in the pulled recording missing its send. This has now been fixed. Replay Command: - Added more logging
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
|
||||
import os
|
||||
import sys
|
||||
import signal
|
||||
|
||||
from wlauto import ExtensionLoader, Command, settings
|
||||
from wlauto.common.resources import Executable
|
||||
@@ -114,13 +115,15 @@ class RecordCommand(Command):
|
||||
|
||||
self.logger.info("Press Enter when you are ready to record...")
|
||||
raw_input("")
|
||||
command = "{} record -t 100000 -s {}".format(self.target_binary, revent_file)
|
||||
command = "{} record -s {}".format(self.target_binary, revent_file)
|
||||
self.device.kick_off(command)
|
||||
|
||||
self.logger.info("Press Enter when you have finished recording...")
|
||||
raw_input("")
|
||||
self.device.killall("revent")
|
||||
|
||||
self.device.killall("revent", signal.SIGTERM)
|
||||
self.logger.info("Waiting for revent to finish")
|
||||
while self.device.get_pids_of("revent"):
|
||||
pass
|
||||
self.logger.info("Pulling files from device")
|
||||
self.device.pull_file(revent_file, args.output or os.getcwdu())
|
||||
|
||||
@@ -154,6 +157,7 @@ class ReplayCommand(RecordCommand):
|
||||
self.logger.info("Starting {}".format(args.package))
|
||||
self.device.execute('monkey -p {} -c android.intent.category.LAUNCHER 1'.format(args.package))
|
||||
|
||||
self.logger.info("Replaying recording")
|
||||
command = "{} replay {}".format(self.target_binary, revent_file)
|
||||
self.device.execute(command)
|
||||
self.logger.info("Finished replay")
|
||||
|
Reference in New Issue
Block a user