From f5d1a9e94a5f9ead977a7d33ff0d58fb94adbfd6 Mon Sep 17 00:00:00 2001 From: Marc Bonnici Date: Thu, 20 Jun 2019 10:55:58 +0100 Subject: [PATCH] fw/workload: Add the `uninstall` parameter to the base `workload` class In additional to being able to specify whether the APK should be uninstalled as part of a `APKWorkload`s teardown add the `uninstall` parameter to the base `workload` class in order to specify whether any binaries installed for a workload should be uninstalled again. --- wa/framework/workload.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wa/framework/workload.py b/wa/framework/workload.py index a9b7ce95..e9cabeb2 100644 --- a/wa/framework/workload.py +++ b/wa/framework/workload.py @@ -51,6 +51,12 @@ class Workload(TargetedPlugin): If ``True``, assets that are deployed or created as part of the workload will be removed again from the device. """), + Parameter('uninstall', kind=bool, + default=True, + description=""" + If ``True``, executables that are installed to the device + as part of the workload will be uninstalled again. + """), ] # Set this to True to mark that this workload poses a risk of exposing @@ -225,6 +231,7 @@ class ApkWorkload(Workload): """), Parameter('uninstall', kind=bool, default=False, + override=True, description=""" If ``True``, will uninstall workload\'s APK as part of teardown.' """),