From 3544b716d23dc103e8e6949b101db749b36852c1 Mon Sep 17 00:00:00 2001 From: Sascha Bischoff Date: Fri, 8 Dec 2017 10:36:47 +0000 Subject: [PATCH] workloads/dhrystone: do initialize/finalize once per run Add in the "once" decorator for the initialize and finalize methods to ensure that they only run once per run. --- wa/workloads/dhrystone/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wa/workloads/dhrystone/__init__.py b/wa/workloads/dhrystone/__init__.py index 26120bd5..11abae51 100644 --- a/wa/workloads/dhrystone/__init__.py +++ b/wa/workloads/dhrystone/__init__.py @@ -19,6 +19,7 @@ import os import re from wa import Workload, Parameter, ConfigError, Executable +from wa.utils.exec_control import once class Dhrystone(Workload): @@ -71,6 +72,7 @@ class Dhrystone(Workload): '''), ] + @once def initialize(self, context): resource = Executable(self, self.target.abi, 'dhrystone') host_exe = context.resolver.get(resource) @@ -143,6 +145,7 @@ class Dhrystone(Workload): context.add_metric('total DMIPS', total_dmips) context.add_metric('total score', total_score) + @once def finalize(self, context): self.target.uninstall('dhrystone')