mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-18 20:11:20 +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:
parent
4069e37f6b
commit
3544b716d2
@ -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')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user