mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-31 02:01:16 +00:00
commands/create: Add missing workload templates
This commit is contained in:
parent
66b40b25e5
commit
c34b219941
54
wa/commands/templates/apkrevent_workload
Normal file
54
wa/commands/templates/apkrevent_workload
Normal file
@ -0,0 +1,54 @@
|
||||
from wa import Parameter, ApkReventWorkload
|
||||
|
||||
|
||||
class ${class_name}(ApkReventWorkload):
|
||||
|
||||
name = '${name}'
|
||||
description = "This is an placeholder description"
|
||||
# Replace with a list of supported package names in the APK file(s).
|
||||
package_names = ['package_name']
|
||||
|
||||
parameters = [
|
||||
# Workload parameters go here e.g.
|
||||
Parameter('example_parameter', kind=int, allowed_values=[1,2,3],
|
||||
default=1, override=True, mandatory=False,
|
||||
description='This is an example parameter')
|
||||
]
|
||||
|
||||
def __init__(self, target, **kwargs):
|
||||
super(${class_name}, self).__init__(target, **kwargs)
|
||||
# Define any additional attiributes required for the workload
|
||||
|
||||
def init_resources(self, context):
|
||||
super(${class_name}, self).init_resources(context)
|
||||
# This method may be used to perform early resource discovery and
|
||||
# initialization. This is invoked during the initial loading stage and
|
||||
# before the device is ready, so cannot be used for any device-dependent
|
||||
# initialization. This method is invoked before the workload instance is
|
||||
# validated.
|
||||
|
||||
def initialize(self, context):
|
||||
super(${class_name}, self).initialize(context)
|
||||
# This method should be used to perform once-per-run initialization of a
|
||||
# workload instance.
|
||||
|
||||
def validate(self):
|
||||
super(${class_name}, self).validate()
|
||||
# Validate inter-parameter assumptions etc
|
||||
|
||||
def setup(self, context):
|
||||
super(${class_name}, self).setup(context)
|
||||
# Perform any necessary setup before starting the UI automation
|
||||
|
||||
def extract_results(self, context):
|
||||
super(${class_name}, self).extract_results(context)
|
||||
# Extract results on the target
|
||||
|
||||
def update_output(self, context):
|
||||
super(${class_name}, self).update_output(context)
|
||||
# Update the output within the specified execution context with the
|
||||
# metrics and artifacts form this workload iteration.
|
||||
|
||||
def teardown(self, context):
|
||||
super(${class_name}, self).teardown(context)
|
||||
# Perform any final clean up for the Workload.
|
54
wa/commands/templates/apkuiauto_workload
Normal file
54
wa/commands/templates/apkuiauto_workload
Normal file
@ -0,0 +1,54 @@
|
||||
from wa import Parameter, ApkUiautoWorkload
|
||||
|
||||
|
||||
class ${class_name}(ApkUiautoWorkload):
|
||||
|
||||
name = '${name}'
|
||||
description = "This is an placeholder description"
|
||||
# Replace with a list of supported package names in the APK file(s).
|
||||
package_names = ['package_name']
|
||||
|
||||
parameters = [
|
||||
# Workload parameters go here e.g.
|
||||
Parameter('example_parameter', kind=int, allowed_values=[1,2,3],
|
||||
default=1, override=True, mandatory=False,
|
||||
description='This is an example parameter')
|
||||
]
|
||||
|
||||
def __init__(self, target, **kwargs):
|
||||
super(${class_name}, self).__init__(target, **kwargs)
|
||||
# Define any additional attiributes required for the workload
|
||||
|
||||
def init_resources(self, context):
|
||||
super(${class_name}, self).init_resources(context)
|
||||
# This method may be used to perform early resource discovery and
|
||||
# initialization. This is invoked during the initial loading stage and
|
||||
# before the device is ready, so cannot be used for any device-dependent
|
||||
# initialization. This method is invoked before the workload instance is
|
||||
# validated.
|
||||
|
||||
def initialize(self, context):
|
||||
super(${class_name}, self).initialize(context)
|
||||
# This method should be used to perform once-per-run initialization of a
|
||||
# workload instance.
|
||||
|
||||
def validate(self):
|
||||
super(${class_name}, self).validate()
|
||||
# Validate inter-parameter assumptions etc
|
||||
|
||||
def setup(self, context):
|
||||
super(${class_name}, self).setup(context)
|
||||
# Perform any necessary setup before starting the UI automation
|
||||
|
||||
def extract_results(self, context):
|
||||
super(${class_name}, self).extract_results(context)
|
||||
# Extract results on the target
|
||||
|
||||
def update_output(self, context):
|
||||
super(${class_name}, self).update_output(context)
|
||||
# Update the output within the specified execution context with the
|
||||
# metrics and artifacts form this workload iteration.
|
||||
|
||||
def teardown(self, context):
|
||||
super(${class_name}, self).teardown(context)
|
||||
# Perform any final clean up for the Workload.
|
56
wa/commands/templates/revent_workload
Normal file
56
wa/commands/templates/revent_workload
Normal file
@ -0,0 +1,56 @@
|
||||
from wa import Parameter, ReventWorkload
|
||||
|
||||
|
||||
class ${class_name}(ReventWorkload):
|
||||
|
||||
name = '${name}'
|
||||
description = "This is an placeholder description"
|
||||
|
||||
parameters = [
|
||||
# Workload parameters go here e.g.
|
||||
Parameter('example_parameter', kind=int, allowed_values=[1,2,3],
|
||||
default=1, override=True, mandatory=False,
|
||||
description='This is an example parameter')
|
||||
]
|
||||
|
||||
def __init__(self, target, **kwargs):
|
||||
super(${class_name}, self).__init__(target, **kwargs)
|
||||
# Define any additional attiributes required for the workload
|
||||
|
||||
def init_resources(self, context):
|
||||
super(${class_name}, self).init_resources(context)
|
||||
# This method may be used to perform early resource discovery and
|
||||
# initialization. This is invoked during the initial loading stage and
|
||||
# before the device is ready, so cannot be used for any device-dependent
|
||||
# initialization. This method is invoked before the workload instance is
|
||||
# validated.
|
||||
|
||||
def initialize(self, context):
|
||||
super(${class_name}, self).initialize(context)
|
||||
# This method should be used to perform once-per-run initialization of a
|
||||
# workload instance.
|
||||
|
||||
def validate(self):
|
||||
super(${class_name}, self).validate()
|
||||
# Validate inter-parameter assumptions etc
|
||||
|
||||
def setup(self, context):
|
||||
super(${class_name}, self).setup(context)
|
||||
# Perform any necessary setup before starting the UI automation
|
||||
|
||||
def run(self, context):
|
||||
super(${class_name}, self).run(context)
|
||||
# Perform the main functionality of the workload
|
||||
|
||||
def extract_results(self, context):
|
||||
super(${class_name}, self).extract_results(context)
|
||||
# Extract results on the target
|
||||
|
||||
def update_output(self, context):
|
||||
super(${class_name}, self).update_output(context)
|
||||
# Update the output within the specified execution context with the
|
||||
# metrics and artifacts form this workload iteration.
|
||||
|
||||
def teardown(self, context):
|
||||
super(${class_name}, self).teardown(context)
|
||||
# Perform any final clean up for the Workload.
|
Loading…
x
Reference in New Issue
Block a user