mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-06-26 10:13:27 +01:00
Initial commit of open source Workload Automation.
This commit is contained in:
.gitignoreLICENSEMANIFEST.inREADME.rst
dev_scripts
doc
Makefilebuild_extension_docs.pybuild_instrumentation_method_map.py
source
_static
_templates
additional_topics.rstagenda.rstchanges.rstconf.pyconfiguration.rstcontributing.rstconventions.rstdaq_device_setup.rstdevice_setup.rstexecution_model.rstindex.rstinstallation.rstinstrumentation_method_map.rstinstrumentation_method_map.templateinvocation.rstquickstart.rstresources.rstrevent.rstwa-execution.pngwriting_extensions.rstextras
scripts
setup.pywlauto
__init__.pyagenda-example-biglittle.yamlagenda-example-tutorial.yaml
commands
common
config_example.pycore
__init__.pyagenda.pybootstrap.pycommand.pyconfiguration.pydevice.pyentry_point.pyexecution.pyextension.pyextension_loader.pyexttype.pyinstrumentation.pyresolver.pyresource.pyresult.pysignal.pyversion.pyworkload.py
devices
exceptions.pyexternal
README
bbench_server
daq_server
louie
LICENSE__init__.pydispatcher.pyerror.pyplugin.pyprioritylist.pyrobustapply.pysaferef.pysender.pysignal.py
test
__init__.pyconftest.pyfixture.pytest_dispatcher.pytest_plugin.pytest_prioritydispatcher.pytest_prioritylist.pytest_robustapply.pytest_saferef.py
version.pypmu_logger
readenergy
revent
terminalsize.pyuiauto
instrumentation
__init__.py
coreutil
daq
delay
dmesg
energy_probe
fps
hwmon
juno_energy
misc
perf
pmu_logger
streamline
trace_cmd
modules
resource_getters
result_processors
tests
README__init__.py
data
test_agenda.pytest_config.pytest_device.pytest_diff.pytest_execution.pytest_extension.pytest_extension_loader.pytest_instrumentation.pytest_results_manager.pytest_utils.pytools
utils
__init__.pyandroid.pycli.pycpuinfo.pydoc.pyformatter.pyhwmon.pylog.pymisc.pynetio.pyserial_port.pyssh.pytypes.pyuefi.py
workloads
__init__.py
andebench
angrybirds
angrybirds_rio
anomaly2
antutu
applaunch
audio
bbench
benchmarkpi
caffeinemark
cameracapture
camerarecord
castlebuilder
castlemaster
cfbench
citadel
cyclictest
dex2oat
dhrystone
dungeondefenders
facebook
geekbench
glbcorp
glbenchmark
gunbros2
homescreen
idle
ironman
krazykart
linpack
manual
memcpy
nenamark
peacekeeper
quadrant
real_linpack
realracing3
shellscript
skypevideo
smartbench
spec2000
sqlite
sysbench
templerun
thechase
truckerparking3d
vellamo
video
videostreaming
23
dev_scripts/README
Normal file
23
dev_scripts/README
Normal file
@ -0,0 +1,23 @@
|
||||
This directory contains scripts that aid the development of Workload Automation.
|
||||
They were written to work as part of WA development environment and are not
|
||||
guarnteed to work if moved outside their current location. They should not be
|
||||
distributed as part of WA releases.
|
||||
|
||||
Scripts
|
||||
-------
|
||||
|
||||
:clean_install: Performs a clean install of WA from source. This will remove any
|
||||
existing WA install (regardless of whether it was made from
|
||||
source or through a tarball with pip).
|
||||
|
||||
:clear_env: Clears ~/.workload_automation.
|
||||
|
||||
:get_apk_versions: Prints out a table of APKs and their versons found under the
|
||||
path specified as the argument.
|
||||
|
||||
:pep8: Runs pep8 code checker (must be installed) over wlauto with the correct
|
||||
settings for WA.
|
||||
|
||||
:pylint: Runs pylint (must be installed) over wlauto with the correct settings
|
||||
for WA.
|
||||
|
34
dev_scripts/clean_install
Executable file
34
dev_scripts/clean_install
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
import shutil
|
||||
import logging
|
||||
|
||||
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
|
||||
def get_installed_path():
|
||||
paths = [p for p in sys.path if len(p) > 2]
|
||||
for path in paths:
|
||||
candidate = os.path.join(path, 'wlauto')
|
||||
if os.path.isdir(candidate):
|
||||
return candidate
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
installed_path = get_installed_path()
|
||||
if installed_path:
|
||||
logging.info('Removing installed package from {}.'.format(installed_path))
|
||||
shutil.rmtree(installed_path)
|
||||
if os.path.isdir('build'):
|
||||
logging.info('Removing local build directory.')
|
||||
shutil.rmtree('build')
|
||||
logging.info('Removing *.pyc files.')
|
||||
for root, dirs, files in os.walk('wlauto'):
|
||||
for file in files:
|
||||
if file.lower().endswith('.pyc'):
|
||||
os.remove(os.path.join(root, file))
|
||||
|
||||
os.system('python setup.py install')
|
||||
|
3
dev_scripts/clear_env
Executable file
3
dev_scripts/clear_env
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
# Clear workload automation user environment.
|
||||
rm -rf ~/.workload_automation/
|
25
dev_scripts/get_apk_versions
Executable file
25
dev_scripts/get_apk_versions
Executable file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
|
||||
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
|
||||
|
||||
from wlauto.exceptions import WAError
|
||||
from wlauto.utils.misc import write_table
|
||||
from distmanagement.apk import get_aapt_path, get_apk_versions
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
aapt = get_aapt_path()
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('path', metavar='PATH', help='Location to look for APKs.')
|
||||
args = parser.parse_args()
|
||||
|
||||
versions = get_apk_versions(args.path, aapt)
|
||||
write_table([v.to_tuple() for v in versions], sys.stdout,
|
||||
align='<<<>>', headers=['path', 'package', 'name', 'version code', 'version name'])
|
||||
except WAError, e:
|
||||
logging.error(e)
|
||||
sys.exit(1)
|
22
dev_scripts/pep8
Executable file
22
dev_scripts/pep8
Executable file
@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
EXCLUDE=wlauto/external/,wlauto/tests
|
||||
EXCLUDE_COMMA=wlauto/core/bootstrap.py,wlauto/workloads/geekbench/__init__.py
|
||||
IGNORE=E501,E265,E266,W391
|
||||
|
||||
if ! hash pep8 2>/dev/null; then
|
||||
echo "pep8 not found in PATH"
|
||||
echo "you can install it with \"sudo pip install pep8\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ "$1" == "" ]]; then
|
||||
THIS_DIR="`dirname \"$0\"`"
|
||||
pushd $THIS_DIR/.. > /dev/null
|
||||
pep8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE wlauto
|
||||
pep8 --exclude=$EXCLUDE --ignore=$IGNORE,E241 $(echo "$EXCLUDE_COMMA" | sed 's/,/ /g')
|
||||
popd > /dev/null
|
||||
else
|
||||
pep8 --exclude=$EXCLUDE,$EXCLUDE_COMMA --ignore=$IGNORE $1
|
||||
fi
|
||||
|
47
dev_scripts/pylint
Executable file
47
dev_scripts/pylint
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
target=$1
|
||||
|
||||
compare_versions() {
|
||||
if [[ $1 == $2 ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
local IFS=.
|
||||
local i ver1=($1) ver2=($2)
|
||||
|
||||
for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)); do
|
||||
ver1[i]=0
|
||||
done
|
||||
|
||||
for ((i=0; i<${#ver1[@]}; i++)); do
|
||||
if [[ -z ${ver2[i]} ]]; then
|
||||
ver2[i]=0
|
||||
fi
|
||||
if ((10#${ver1[i]} > 10#${ver2[i]})); then
|
||||
return 1
|
||||
fi
|
||||
if ((10#${ver1[i]} < 10#${ver2[i]})); then
|
||||
return 2
|
||||
fi
|
||||
done
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
pylint_version=$(python -c 'from pylint.__pkginfo__ import version; print version')
|
||||
compare_versions $pylint_version "1.3.0"
|
||||
result=$?
|
||||
if [ "$result" == "2" ]; then
|
||||
echo "ERROR: pylint version must be at least 1.3.0; found $pylint_version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
THIS_DIR="`dirname \"$0\"`"
|
||||
if [[ "$target" == "" ]]; then
|
||||
pushd $THIS_DIR/.. > /dev/null
|
||||
pylint --rcfile extras/pylintrc wlauto
|
||||
popd > /dev/null
|
||||
else
|
||||
pylint --rcfile $THIS_DIR/../extras/pylintrc $target
|
||||
fi
|
Reference in New Issue
Block a user