1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-09-06 05:12:36 +01:00

fw/config: Add additional run_completed reboot policy

Add an additional `run_completed` reboot policy for when a run
has finished.
This complements the `initial` reboot policy and aims to leave
the device in a fresh state after WA has finished executing.
This commit is contained in:
Marc Bonnici
2020-12-08 12:19:18 +00:00
committed by setrofim
parent 91b791665a
commit ae1bc2c031
2 changed files with 12 additions and 1 deletions

View File

@@ -537,6 +537,9 @@ class Runner(object):
self.pm.process_run_output(self.context)
self.pm.export_run_output(self.context)
self.pm.finalize(self.context)
if self.context.reboot_policy.reboot_on_run_completion:
self.logger.info('Rebooting target on run completion.')
self.context.tm.reboot(self.context)
signal.disconnect(self._error_signalled_callback, signal.ERROR_LOGGED)
signal.disconnect(self._warning_signalled_callback, signal.WARNING_LOGGED)