1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-21 20:38:57 +00:00

Execution: Added a clean_up global config to delete WA files from devices

Adds a WA configuration point `clean_up` that will delete the WA binaries
directory  and the WA working directory from a device at the end of a WA run.
This commit is contained in:
Sebastian Goscik 2016-08-26 17:13:57 +01:00
parent 0a2afdfd84
commit 7713f02252
3 changed files with 9 additions and 0 deletions

View File

@ -54,6 +54,9 @@ retry_on_status = ['FAILED', 'PARTIAL']
# How many times a job will be re-run before giving up # How many times a job will be re-run before giving up
max_retries = 3 max_retries = 3
# If WA should delete its files from the device after the run is completed
clean_up = False
#################################################################################################### ####################################################################################################
######################################### Device Settings ########################################## ######################################### Device Settings ##########################################
#################################################################################################### ####################################################################################################

View File

@ -481,6 +481,7 @@ class RunConfiguration(object):
RunConfigurationItem('flashing_config', 'dict', 'replace'), RunConfigurationItem('flashing_config', 'dict', 'replace'),
RunConfigurationItem('retry_on_status', 'list', 'replace'), RunConfigurationItem('retry_on_status', 'list', 'replace'),
RunConfigurationItem('max_retries', 'scalar', 'replace'), RunConfigurationItem('max_retries', 'scalar', 'replace'),
RunConfigurationItem('clean_up', 'scalar', 'replace'),
] ]
# Configuration specified for each workload spec. "workload_parameters" # Configuration specified for each workload spec. "workload_parameters"

View File

@ -344,6 +344,11 @@ class Executor(object):
runner = self._get_runner(result_manager) runner = self._get_runner(result_manager)
runner.init_queue(self.config.workload_specs) runner.init_queue(self.config.workload_specs)
runner.run() runner.run()
if getattr(self.config, "clean_up", False):
self.logger.info('Clearing WA files from device')
self.device.delete_file(self.device.binaries_directory)
self.device.delete_file(self.device.working_directory)
self.execute_postamble() self.execute_postamble()
def execute_postamble(self): def execute_postamble(self):