1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-01-19 04:21:17 +00:00

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.
This commit is contained in:
Sascha Bischoff 2017-12-08 10:36:47 +00:00 committed by marcbonnici
parent 4069e37f6b
commit 3544b716d2

View File

@ -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')