From 705ce9ae40a42f1f59dfa2695a1c2919ea45fb32 Mon Sep 17 00:00:00 2001 From: Sergei Trofimov Date: Thu, 22 Oct 2015 11:26:43 +0100 Subject: [PATCH] rt_app: added an option to force install. Userful when the target device already has rt-app on it, but you want to replace it with the version from your host. --- wlauto/workloads/rt_app/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/wlauto/workloads/rt_app/__init__.py b/wlauto/workloads/rt_app/__init__.py index cb3d04a5..6d1407c8 100644 --- a/wlauto/workloads/rt_app/__init__.py +++ b/wlauto/workloads/rt_app/__init__.py @@ -137,6 +137,12 @@ class RtApp(Workload): If set to ``True``, rt-app binary will be uninstalled from the device at the end of the run. """), + Parameter('force_install', kind=bool, default=False, + description=""" + If set to ``True``, rt-app binary will always be deployed to the + target device at the begining of the run, regardless of whether it + was already installed there. + """), ] def initialize(self, context): @@ -210,7 +216,7 @@ class RtApp(Workload): def _deploy_rt_app_binary_if_necessary(self): # called from initialize() so gets invoked once per run - if not self.device.is_installed(BINARY_NAME): + if self.force_install or not self.device.is_installed(BINARY_NAME): if not self.host_binary: message = '''rt-app is not installed on the device and could not be found in workload resources'''