mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-20 17:50:49 +01:00
wa/commands: pep8 fixes
This commit is contained in:
parent
6afd710bd1
commit
c6ec7af665
@ -202,11 +202,13 @@ def create_template_workload(path, name, kind, class_name):
|
|||||||
with open(source_file, 'w') as wfh:
|
with open(source_file, 'w') as wfh:
|
||||||
wfh.write(render_template('{}_workload'.format(kind), {'name': name, 'class_name': class_name}))
|
wfh.write(render_template('{}_workload'.format(kind), {'name': name, 'class_name': class_name}))
|
||||||
|
|
||||||
|
|
||||||
def create_uiautomator_template_workload(path, name, kind, class_name):
|
def create_uiautomator_template_workload(path, name, kind, class_name):
|
||||||
uiauto_path = os.path.join(path, 'uiauto')
|
uiauto_path = os.path.join(path, 'uiauto')
|
||||||
create_uiauto_project(uiauto_path, name)
|
create_uiauto_project(uiauto_path, name)
|
||||||
create_template_workload(path, name, kind, class_name)
|
create_template_workload(path, name, kind, class_name)
|
||||||
|
|
||||||
|
|
||||||
def create_uiauto_project(path, name):
|
def create_uiauto_project(path, name):
|
||||||
package_name = 'com.arm.wa.uiauto.' + name.lower()
|
package_name = 'com.arm.wa.uiauto.' + name.lower()
|
||||||
|
|
||||||
@ -247,6 +249,7 @@ create_funcs = {
|
|||||||
'apkuiauto': create_uiautomator_template_workload,
|
'apkuiauto': create_uiautomator_template_workload,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
# Utility functions
|
# Utility functions
|
||||||
def render_template(name, params):
|
def render_template(name, params):
|
||||||
filepath = os.path.join(TEMPLATES_DIR, name)
|
filepath = os.path.join(TEMPLATES_DIR, name)
|
||||||
@ -260,6 +263,7 @@ def get_class_name(name, postfix=''):
|
|||||||
name = identifier(name)
|
name = identifier(name)
|
||||||
return ''.join(map(capitalize, name.split('_'))) + postfix
|
return ''.join(map(capitalize, name.split('_'))) + postfix
|
||||||
|
|
||||||
|
|
||||||
def touch(path):
|
def touch(path):
|
||||||
with open(path, 'w') as _:
|
with open(path, 'w') as _:
|
||||||
pass
|
pass
|
||||||
|
@ -231,6 +231,7 @@ class RecordCommand(Command):
|
|||||||
|
|
||||||
return output_path, file_name
|
return output_path, file_name
|
||||||
|
|
||||||
|
|
||||||
class ReplayCommand(Command):
|
class ReplayCommand(Command):
|
||||||
|
|
||||||
name = 'replay'
|
name = 'replay'
|
||||||
|
@ -110,8 +110,9 @@ def get_rst_from_target(target):
|
|||||||
def get_rst_for_global_config():
|
def get_rst_for_global_config():
|
||||||
text = underline('Global Configuration')
|
text = underline('Global Configuration')
|
||||||
text += 'These parameters control the behaviour of WA/run as a whole, they ' \
|
text += 'These parameters control the behaviour of WA/run as a whole, they ' \
|
||||||
'should be set inside a config file (either located in $WA_USER_DIRECTORY/config.yaml ' \
|
'should be set inside a config file (either located in ' \
|
||||||
'or one which is specified with -c), or into config/global section of the agenda.\n\n'
|
'$WA_USER_DIRECTORY/config.yaml or one which is specified with -c), ' \
|
||||||
|
'or into config/global section of the agenda.\n\n'
|
||||||
|
|
||||||
cfg_points = MetaConfiguration.config_points + RunConfiguration.config_points
|
cfg_points = MetaConfiguration.config_points + RunConfiguration.config_points
|
||||||
text += get_params_rst(cfg_points)
|
text += get_params_rst(cfg_points)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user