1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-06 19:01:15 +01:00
Commit Graph

360 Commits

Author SHA1 Message Date
Vasilis Flouris
afa2b11975 Adds copyright header to energy model instrument 2015-06-03 18:07:40 +01:00
Vasilis Flouris
1a604ac2e3 Fixes a bug in energy model instrument 2015-06-03 18:04:51 +01:00
Vasilis Flouris
d60034f7d7 Allows running the energy instrument without hotplugging 2015-06-03 18:04:45 +01:00
Sergei Trofimov
8980304e56 Adding a note about cpuidle module to cpustates. 2015-06-03 16:33:45 +01:00
Sergei Trofimov
02af02f0cb Adding cpustates result processor (and script) 2015-06-03 16:20:48 +01:00
Sergei Trofimov
e9b21e2ef3 Adding a generic trace-cmd paraser. 2015-06-03 16:20:48 +01:00
Sergei Trofimov
5cfecf8068 show command: minor fix to parameter rendering
Make sure default of 'False' is reported for boolean values.
2015-06-03 16:20:48 +01:00
Sergei Trofimov
ecb1a9f1f9 Adding /proc/cmdline to pulled metadata 2015-06-02 15:05:52 +01:00
setrofim
22b3fe1ac8 Merge pull request #23 from vflouris/pull-request
Pull request: minor fixes for energy model generation and a device interace for Chrome OS test image devices.
2015-06-02 13:07:57 +01:00
Vasilis Flouris
953783dc2b Adds the generic_chromeos device. 2015-06-02 13:05:08 +01:00
Sergei Trofimov
8f972322a5 Updating documentation for generic device interfaces 2015-06-02 12:58:04 +01:00
Vasilis Flouris
1fa93c04d2 fixes a few minor bugs. 2015-06-02 10:53:20 +01:00
Sergei Trofimov
ebe6202e22 push/pull commands always raise DeviceError + handle error on pulling a property file.
Previosuly, they raised CalledProcessError/DeviceError based on
implementation. Making it consistent to facillitated handling in calling
code.
2015-06-01 17:25:59 +01:00
Sergei Trofimov
b4971d76d6 pull more stuff during run initialization
added more paths to pull by default when device.get_properties is
invoked during run initialization. Also moved the LinuxDevice
implementation into BaseLinuxDevice, so that AndroidDevice tires to pull
the same files (on top of the Android-specific stuff).
2015-06-01 16:41:33 +01:00
Sergei Trofimov
ead0be2763 Fixing merge_lists to work for list_or_* types 2015-06-01 16:18:13 +01:00
Sergei Trofimov
29aa81a694 Adding a couple of unit tests for some of the more interesting types. 2015-06-01 15:46:14 +01:00
Sergei Trofimov
f59da723fb list_or: chaniging how list_or_* functions work and adding a generic list_or
list_or_* functions (e.g. list_or_string) will now always return a list,
however will accept lists or indivitual values. Also added a list_or()
generator function, similar to what already exists for list_of().
2015-06-01 15:31:25 +01:00
Sergei Trofimov
a9ab67990a sysbench: updating to work on unrooted Android devices. 2015-06-01 12:21:51 +01:00
Sergei Trofimov
adefbb7b2c android devices: updating executable install/uninstall work on unrooted devices 2015-06-01 12:19:54 +01:00
Sergei Trofimov
578dfb3d99 telemetry: fixing "test" parameter description. 2015-06-01 10:08:26 +01:00
Sergei Trofimov
f49287cf09 Fixes for Emacs
- Do not try to use a pager if it explicitly disabled with PAGER='' in
  the environment.
- If terminal size is identified as (0, 0), fall back to default (80,
  25).
2015-06-01 10:05:23 +01:00
Sergei Trofimov
777003ed51 Adding instrument_is_enabled function
As instrumentation can be enabled/disabled for a specfic workload
execution, it is sometimes not enough to verify that an instrument has
been installed for the run; one might need to check whether it is
currently enabled.
2015-05-28 10:13:50 +01:00
Sergei Trofimov
a254a44f0e adding abi property to LinuxDevice 2015-05-28 09:08:46 +01:00
Sergei Trofimov
506ed57ca6 fix: telemetry: ignore all return codes
Telemetry seems to return random values as return code, so completely
ignore them and don't treat any values as errors.
2015-05-27 17:25:17 +01:00
Sergei Trofimov
c31d4ec8a3 ssh: fixing timeout behavior
Since a command would still be running on time out, it would prevent
issuing subsequent commands in the same SSH shell, make it look like
the device has become unresponsive.

If a timeout condition is his, send ^C to kill the current foreground
process and make the shell available for subsequent commands.
2015-05-27 09:13:03 +01:00
Sergei Trofimov
9e822c4b18 dvfs: fix active_cpus --> online_cpus rename 2015-05-26 12:30:15 +01:00
Sergei Trofimov
260616711f removing unused variable. 2015-05-26 09:29:59 +01:00
Sergei Trofimov
b9a8f6155c telemetry: remove obsolete metrics. 2015-05-15 14:09:53 +01:00
Sergei Trofimov
a450957b9a Fixing locally defined instruments erroneously propagating into global instrumentation 2015-05-15 10:01:26 +01:00
Sergei Trofimov
512bacc1be Adding classifiers to metrics and updating csv and telemetry to take advantage of them
- Adding "classifiers" field to Metric objects. This is a dict mapping
  classifier names (arbitrary strings) to corresponding values for that
  specific metrics. This is to allow extensions to add
  extension-specific annotations to metric that could be handled in a
  generic way (e.g. by result processors).
- Updating telemetry workload to add classifiers for the url and internal
  iteration (or "time") for a particular result.
- Updating csv result processor with the option to use classifiers to
  add columns to results.csv (either using all classifiers found, or
  only for the specific ones listed).
2015-05-14 15:15:32 +01:00
Sergei Trofimov
782d4501cd revent: fix resource resolution when dependency location does not exist. 2015-05-14 14:34:41 +01:00
Sergei Trofimov
26dfe97ffd ssh: fix: do not attempt to check mode of keyfile if it has not been specified. 2015-05-14 11:27:50 +01:00
Sergei Trofimov
ee63cbde62 telemetry: automatically download if necessary
If run_benchmark_path isn't specified, Telemetry zip archive will be
downloaded and extracted into dependencies.
2015-05-13 14:33:13 +01:00
Sergei Trofimov
e7b58c72ac telemetry: added fps extraction
Also fixed text that mistakenly referred to "run_benchmarks" (plural) as
the name of the script.
2015-05-13 14:05:15 +01:00
Sergei Trofimov
9b16e3f282 linux device: removing (keyfile or password) validation check
It may be possible to connect to a device without either, so it
should not be invalid to not specifiy either in the device config.
2015-05-13 08:46:10 +01:00
Sergei Trofimov
4e9601d905 config_example: disabled summary_csv and added status result processor
Made status result processor enabled by default on new WA installations
and disabled summary_csv by default.
2015-05-12 16:18:08 +01:00
Sergei Trofimov
48cced2ff9 antutu: robustness fixes for v5 multi-times executions
- added slight delays to ensure more precise navigation
- handle dialogs that occasionally pop up when re-running tests
2015-05-12 14:29:24 +01:00
Sergei Trofimov
57d3b80e85 power_loadtest: kill any already-running autotest instances during setup 2015-05-12 14:27:04 +01:00
Sergei Trofimov
cbd2c6727f Adding ChromeOS power_LoadTest 2015-05-12 11:34:30 +01:00
Sergei Trofimov
5daa9014a8 Adding "agruments" type
This type represents arguments that are passed on a command line to an
application. It has both string and list representations.
2015-05-12 11:34:30 +01:00
Sergei Trofimov
b2981a57bc ssh: ensure keyfile has the right permissions
The key file must only be readable by the owner. If the specified key
file has different access permissions, create a temporary copy with the
right permissions and use that.
2015-05-12 11:34:30 +01:00
Sergei Trofimov
98b259be33 energy_model: fix np.vectorize on ImportError
np.vectorize was being unconditionally invoked at top level. On an
ImportError, np as set to None, so this was resuling in an
AttributeError when loading the module if one of the dependent libraries
was not present on the host system. This moves the invocation into the
try block with the imports to avoid an error when energy_model module is
loaded by the extension is not used.
2015-05-12 11:34:30 +01:00
Sergei Trofimov
b30d702f22 minor fixes to cpufreq APIs
- adding missing cpu id conversion to set_cpu_min_freq
- adding "exact" parameter to set_cpu_frequency; only produce an error
  when the specified frequency is not supported by the cpu if "axact"
  is set; (otherwise let cpufreq decide what the actual frequency will
  be).
2015-05-12 11:34:30 +01:00
Sergei Trofimov
40bd32280a minor fixes to cpufreq APIs
- adding missing cpu id conversion to set_cpu_min_freq
- adding "exact" parameter to set_cpu_frequency; only produce an error
  when the specified frequency is not supported by the cpu if "axact"
  is set; (otherwise let cpufreq decide what the actual frequency will
  be).
2015-05-11 12:12:41 +01:00
Sergei Trofimov
fbde403f6f pep8 2015-05-11 12:12:41 +01:00
Sergei Trofimov
4b210e7aab energy_model: adjusting sysbench setup based on feed back from power team. 2015-05-11 12:12:41 +01:00
Vasilis Flouris
2929106049 Energy model: fixing sysbench taskset failure
Make sure when migrating sshd to root cgroup also migrate their
children, including the bash for the wa session. So the subsequent
processes kicked off from that shell can be taskset to any cluster.
2015-05-11 12:12:41 +01:00
Sergei Trofimov
485ba419b3 energy_model: set matplotlib backent to AGG
Matplotlib defautls to the GTK backend. This can cause problems when
running in a headless session (e.g. over SSH). Since energy_model
istrument generates PNG plots, rather than rendering directly to UI, it
doesn't actually need GTK; set backend to AGG so that energy_model works
in headless environments.
2015-05-11 12:12:41 +01:00
Sergei Trofimov
0e751bdd73 Handling duplicate prompt in pxssh in a slightly differnt way. 2015-05-11 12:12:41 +01:00
Sergei Trofimov
556bc84023 energy_model: fix for when running as a sudo user (rather than root) 2015-05-11 12:12:41 +01:00
Sergei Trofimov
715438e486 Adding missing documentation for module. 2015-05-11 12:12:41 +01:00
Sergei Trofimov
68ae8b9277 energy_model: added energy_metric
It is now possible to specify energy_metric instead of power_metric for
cases where continuous power is not available but energy can be
measured.
2015-05-11 12:12:41 +01:00
Sergei Trofimov
c5b884cf81 casless_string: added format() method 2015-05-11 12:12:41 +01:00
Sergei Trofimov
a4bff161aa idle: updated to work on Linux devices. 2015-05-11 12:12:41 +01:00
Sergei Trofimov
950f0851bf Fix: implementing get_pid_of() and ps() for linux devices.
Existing implementation relied on android version of ps.
2015-05-11 12:12:41 +01:00
Sergei Trofimov
49d7072440 Fix: cpuidle check directory name when numerating idle states
Do not assume that all directories under cpuidle/ represent states;
check that the directory name starts with "state" before trying to parse
it.
2015-05-11 12:12:41 +01:00
Sergei Trofimov
9d5e0cdc00 Fixing pylint false positives in energy_model
The new  version of pylint is throwing up a couple of new
false positives that the earlier versions did not seem to flag.
2015-05-11 12:12:41 +01:00
Sergei Trofimov
841bd784d9 Fix: correctly set measured/measuring cores. 2015-05-11 12:12:41 +01:00
Sergei Trofimov
47ce9db383 Updating energy model instrument to be able to accumulate multiple power rails for each cluster. 2015-05-11 12:12:40 +01:00
Sergei Trofimov
c52d562411 Adding energy_model instrument.
This instrument can be used to generate an energy model for a device
based on collected power and performance measurments. The instrument
produces a C file with an energy model and an accompanying HTML report.

This instrument is very different from other instrumentation, as it
actually generates the run queue on the fly based on the operating
frequencies and idle states it discovers on the device. The agenda needs
only to contain the single "base" spec that defines the workload to be
used for performance measurement.
2015-05-11 12:12:40 +01:00
Sergei Trofimov
6b041e6822 Added cgroups device module.
cgroups  modules allows query and manipulation of cgroups controllers on
a Linux device. Currently, only cpusets controller is implemented.
2015-05-11 12:12:40 +01:00
Sergei Trofimov
c82dd87830 Adding cpuidle modules and refactoring Device cpufreq APIs.
cpuidle module implements cpuidle state discovery, query and
manipulation for a Linux device. This replaces the more primitive
get_cpuidle_states method of LinuxDevice.

Renamed APIs (and added a couple of new ones) to be more consistent:

"core" APIs take a core name as the parameter (e.g. "a15") or whatever
is listed in core_names for that device.
"cluster" APIs take a numeric cluster ID (eg. 0) as the parameter. These
get mapped using core_clusters for that device.
"cpu" APIs take a cpufreq cpu ID as a parameter. These could be
integers, e.g. 0, or full string id, e.g. "cpu0".
2015-05-11 12:12:40 +01:00
Sergei Trofimov
b002505ac2 Updated Parameter to automatically convert int and boot kinds to integer and boolean respectively.
integer and boolen are defined in wlauto.utils.types; they perform more
intuitive conversions from other types, particularly strings, so are
more suitable than int and bool for parameters. If, for whatever reason,
native types are in fact desired for a Parameter, this behavior can be
supressed by specifying convert_types=False when defining the parameter.
2015-05-11 12:12:40 +01:00
Sergei Trofimov
09aa9e6792 Adding some conversion functions to misc utils.
- list_to_range and range_to_list convert between lists of integers
  and corresponding range strings, e.g. between [0,1,2,4] and '0-2,4'
- list_to_mask and mask_to_list convert between lists of integers and
  corresponding integer masks, e.g. between [0,1,2,4] and 0x17

Conflicts:
	wlauto/utils/misc.py
2015-05-11 12:12:40 +01:00
Sergei Trofimov
108928c6a5 Added copy() method to WorkloadRunSpec. 2015-05-11 12:12:40 +01:00
Sergei Trofimov
3112eb0a9b Adding new types and updating device parameters to use them.
- added caseless_string type. This behaves exactly like a string, except
  this ignores case in comparisons. It does, however, preserve case. E.g.

	>>> s = caseless_string('Test')
	>>> s == 'test'
	True
	>>> print s
	Test

- added list_of type generating function. This allows to dynamically
  generate type-safe list types based on an existing type. E.g.

	>>> list_of_bool = list_of(bool)
	>>> list_of_bool(['foo', 0, 1, '', True])
	[True, False, True, False, True]

- Update core_names Device Parameter to be of type caseless_string
2015-05-11 12:12:40 +01:00
Sergei Trofimov
070b2230c9 updated ExecutionContext to keep a reference to the runner.
This will enable Extenstions to do things like modify the job queue.
2015-05-11 12:12:40 +01:00
Sergei Trofimov
958a8a09da daq instrument updated to report energy. 2015-05-11 12:12:40 +01:00
Sergei Trofimov
62593987f4 sysbench workload updates.
- added the ability to run based on time, rather than number of
  requests.
- added a parameter to taskset to specific core(s).

Conflicts:
	wlauto/workloads/sysbench/__init__.py
2015-05-11 12:12:40 +01:00
Sergei Trofimov
e422ccc509 show command: remove duplicat output. 2015-05-07 12:18:59 +01:00
Sergei Trofimov
6ccca6d4c0 show command: handle bad PAGER
If show command finds a PAGER defined in the user's environment but is
unable to use it, fall back to dumping output directly to STDOUT.
2015-05-07 12:02:03 +01:00
Sergei Trofimov
57972a56af geekbench: upping run time out.
Run timeout was been hit on very slow systems.
2015-05-07 11:55:37 +01:00
Sergei Trofimov
67ad4a63e4 antutu: multi-times playback fix [part 2]
A "please rate me" dialog occasionally pops but when returning to the
initial screen (when re-running the test). The check to dismiss it
wasn't being done at the right time, so it was still preventing
mutli-times execution. This commit resolves that issue.
2015-05-07 10:48:26 +01:00
Sergei Trofimov
7a86a1b17f hwmon: move sensor discovery into initialize()
It only needs to be done once per run.
2015-05-07 09:39:33 +01:00
Vasilis Flouris
f504fc8791 A fix for spec2000 to align with device API changes 2015-05-06 17:02:48 +01:00
Sergei Trofimov
09d0736d3b antutu: fixing multi-times playback for v5
"times" parameter didn't work properly for version 5 because an extra
back button press was required due to UI changes from previous versions.
This commit adds the button press.
2015-05-06 12:56:58 +01:00
Sergei Trofimov
6824f045fd telemetry: adding support for Android devices
Also, adding missing copyright header.
2015-05-05 12:24:53 +01:00
Sergei Trofimov
e57c5fccb3 sysfile_extractor: ignore exit code when removing directory at the end of the run.
On some systems the temporary directory may still be "busy" after WA is
don't with it. Since it's just an empty dir and it will be reused on the
subsequent runs; do check if rm -rf succeeded.
2015-05-05 09:32:40 +01:00
Sergei Trofimov
a6ef53291b ssh: making execute() thread safe. 2015-05-05 09:09:57 +01:00
Sergei Trofimov
1993007d49 telemetry: relaxing the initial validation check
It seems valid install may return values other than 0xff00. Relaxing the
check to consider anything above 0xff to be valid.
2015-05-05 08:17:43 +01:00
Sergei Trofimov
8b606dd5f9 config: fixing an issue introduced by previous config fix...
When the merging logic was updated to preserve duplicates within the
same list, it inadvertently broke the logic that removed items marked
for removal with a '~'. This commit rectifies that.

Note to self: merging functions are doing *way* to much; they should be
refactored into several individual function and config should be
resolved in distinct stages.
2015-04-30 13:34:21 +01:00
Sergei Trofimov
799558d201 Fix: lists with duplicate entries in parameter values
If list parameter values contained duplicates, those got removed when
merging parameter values from different sources. This commit fixes that
behavor, so that duplcates that appear within the *same* list are
preserved.
2015-04-30 08:46:24 +01:00
Sergei Trofimov
bb5d5cba8e daq: make EnumEntry picklable to support multiprocessing invocation 2015-04-29 12:32:15 +01:00
Vasilis Flouris
82fed172d5 fix for leaked file descriptors in daq 2015-04-29 11:41:19 +01:00
Vasilis Flouris
cd6babeab1 adding device_entry parameter to energy probe instrument 2015-04-29 10:42:44 +01:00
Sergei Trofimov
e87e4c582c Fix: properly handle carriage return stripping in ssh. 2015-04-28 12:46:21 +01:00
Sergei Trofimov
97efd11b86 Fix: properly handle core_names and core_clusters in the agenda
Keep duplicates in lists when merging device_config dict from agenda
with the rest of the config; This will ensure that core_name sand
core_clusters aren't reduced to just unique elements.
2015-04-28 12:44:08 +01:00
Sergei Trofimov
bb6421b339 Fixing file_exists on linux devices. 2015-04-28 10:29:47 +01:00
Sergei Trofimov
50c8c4da34 pep8: minor fixes in hackbench and ebizzy 2015-04-28 08:30:43 +01:00
setrofim
dcea921907 Merge pull request #17 from lisatn/ebizzy-workload
Add ebizzy workload
2015-04-28 08:27:08 +01:00
setrofim
0beb3fc3a2 Merge pull request #18 from lisatn/hackbench_workload
Hackbench workload
2015-04-28 08:26:58 +01:00
Lisa Nguyen
1633d91331 hackbench: Clean regex code and add run_timeout parameter
Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-04-27 14:42:25 -07:00
Lisa Nguyen
d126d56e98 Add ebizzy workload
Add ebizzy to allow users to run a workload resembling common
web server application workloads.

Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-04-27 12:53:17 -07:00
Sergei Trofimov
5ceb093f3c Improving agenda validation
- raise an error if an agenda contains duplicate keys (by default PyYAML
  will silently ignore this)
- raise an error if config section in an agenda is not dict-like
  (before, this was allowed to propagate and relsulted an a traceback
  further down the line).
2015-04-27 16:36:30 +01:00
Sergei Trofimov
698240b6e0 telemetry: copy generated trace files into WA output
If trace files have been generated during a telemetry run (e.g.
--profiler=trace was enabled), copy them into wa_output and extract
them.
2015-04-27 15:50:59 +01:00
Sergei Trofimov
101d6a37ce Fix: correctly handle non-identifier alias names
Update ExtensionLoader to index aliases by their identifier'd name.
2015-04-27 11:57:34 +01:00
Lisa Nguyen
4cff2a52c0 Add hackbench workload
Add hackbench to run tests on the Linux scheduler.

Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-04-26 13:12:08 -07:00
Sergei Trofimov
f906cbd851 Sent INITIAL_BOOT signal in hard reset path during intial boot 2015-04-24 17:51:55 +01:00
Sergei Trofimov
97a397d5c8 ipython utils: handle ancient versions of IPython
Very old versions of IPython do not have IPython.version_info attribute
that the ultls module relied on. This commit changes it to use the more
standard __version__ attriute that is present in all versions.
2015-04-24 10:56:23 +01:00
Sergei Trofimov
54e89a2118 Fix to initial ~/.workload_automation deployment when sudoing
Only attempt to chown ~/.workload_automation to SUDO_USER if the
effective user is root.
2015-04-24 10:05:13 +01:00
Sergei Trofimov
704324ca77 Adding missing descriptions for modules. 2015-04-22 17:02:27 +01:00
Sergei Trofimov
aef7f52f96 telemetry: ignore errors in dividuation subtests.
check_output will ignore error code 1 returned by telemetry execution,
as this happens when individiual sub-tests and partial results may, and
should, still be extracted.
2015-04-21 15:12:48 +01:00
Sergei Trofimov
5035fe6f44 Adding ignore parameter to check_output
Adding a parater to wlauto.utils.misc.check_output to specify that it
should ignore certain error codes when they are returned by the
subprocess and not raise them as errors.
2015-04-21 15:01:15 +01:00
Sergei Trofimov
399c9f82c3 telemetry: handle scalar values correctly.
The result regex in telemetry workload has been updated to capture lines
reproting single value results.
2015-04-21 13:19:21 +01:00
Sergei Trofimov
ff0d08cc8e All using idetifier version of non-identifier named instruments in configuration.
E.g. refering to "trace-cmd" as "trace_cmd" in the instrumentation list.
2015-04-20 09:18:49 +01:00
setrofim
7655007f8a Merge pull request #13 from JaviMerino/ipynb_exporter_with_ipython_3
Make the ipynb_exporter result processor work with ipython version 3
2015-04-20 09:11:07 +01:00
Javi Merino
8d3f9362fb Fix trace-cmd after 2276ae0c5b
Commit 2276ae0c5b ("Fixing config processing for extensions with
non-identifier names.") broke customizing the trace-cmd instrumentation
from the agenda.  With an agenda like:

config:
  instrumentation: [trace-cmd, delay]
  trace_events: ['thermal*']
  trace_buffer_size: 28000

trace_events and trace_buffer_size get added to the RunConfiguration's
_raw_config under the trace-cmd name, but then when it's looked up in
_finalize_config_list(), the dictionary is actually looked up using
identifier(extname), i.e. 'trace_cmd'.  Fix this by adding the user's
configuration using identifier(name) as well.
2015-04-17 20:10:25 +01:00
Javi Merino
e30386ce4a Add ipython version 3 support for the generic ipython support 2015-04-17 19:00:55 +01:00
Javi Merino
d12f5c65e1 Factor out the parsing of a valid cell run in the generic ipython implementation
run_cell() becomes more complicated when we add ipython version 3
support which upsets pylint because there are "too many
branches (15/12)".  Factor out part of the function to make pylint
happy.
2015-04-17 18:56:57 +01:00
Javi Merino
2b04cb38d9 Don't break prematurely when running a cell on an ipython kernel
The kernel may go idle before it processes the next input, which break
the while=True loop in run_cell() early.  Wait for an acknowledgement
of the input we've sent to the kernel before considering an idle
message to mean that the cell has been parsed.
2015-04-17 18:56:57 +01:00
setrofim
0faa5ae455 Merge pull request #11 from JaviMerino/ipynb_exp_improvs
Generic Ipynb_exporter improvements to ease ipython 3 support
2015-04-17 18:23:04 +01:00
Javi Merino
3bf04735c1 Factor out ipython nbconvert in ipynb_exporter results processor
ipython nbconvert CLI changes between ipython 2 and 3, so keep the
string separate so that we can update when we add ipython version 3 support.
2015-04-17 17:52:07 +01:00
Javi Merino
f54bb0981f Don't use shell_channel in ipynb_exporter result processor
It's not needed for IPython 2 and it breaks in IPython 3
2015-04-17 17:52:07 +01:00
Javi Merino
f41be396fa Use notebook format 3 for ipynb_exporter
The file assumes format 3 throughout the code, so explicitly import that
format instead of the generic "current" format.
2015-04-17 17:52:07 +01:00
Javi Merino
d31a5c3c48 Factor out the ipython implementation in ipynb_exporter
The internal ABI for ipython has changed between ipython version 2 and
3.  In its current state, the result processor only works with IPython
version 2, so fail if the user wants to use the result processor with
the wrong version.

Abstract the ipython interface to a file so that we can make it support
versions 2 and 3 at the same time.
2015-04-17 17:52:07 +01:00
Sergei Trofimov
314fecfcd4 Fixing get_meansd for numbers < 1 2015-04-17 17:27:47 +01:00
Sergei Trofimov
497b5febc3 Fixing buffer_size_file in trace-cmd for non-Android devices
The default value for buffer_size_file contained a path under "/d/",
which is an Android-specific alias for "/sys/kernel/debug". This commit
updates the default value to use the system-agnostic path.
2015-04-17 16:06:12 +01:00
Sergei Trofimov
2276ae0c5b Fixing config processing for extensions with non-identifier names.
Internally, WA expects extension names to be valid Python identifiers.
When this is not the case, conversion takes place when loading
configuration for the extension (e.g. "trace-cmd" gets converted to
"trace_cmd").

The conversion is intended to be transparent to the user, so
configuration stores values as they are provided by the user, however it
needs to perform the conversion internally, e.g. when querying
ExtensionLoader. This conversion was missing when performing a lookup of
one of the internal structures, which was causing earlier-collected
settings to not be propagated into the final config.
2015-04-17 15:56:28 +01:00
Sergei Trofimov
53f2eafd16 Fixing key-based authentication for SSH. 2015-04-17 11:59:46 +01:00
setrofim
a26a50941b Merge pull request #10 from JaviMerino/notify2
Use notify2 as it's available in pypi
2015-04-16 13:13:53 +01:00
Sergei Trofimov
075712d940 Fixing format string in ipynb_exporter 2015-04-16 13:06:00 +01:00
Sergei Trofimov
c0bb30e12d Fixing overall score generation in telemetry
Updating overall score generation function to handle zero values.
2015-04-16 13:00:59 +01:00
Javi Merino
dd199a6893 Move the notify results processor to notify2
pynotify is not in pypi.
2015-04-16 11:43:49 +01:00
setrofim
d627c778e5 Merge pull request #9 from JaviMerino/add_notify
Add a notify result processor
2015-04-16 08:43:47 +01:00
Sergei Trofimov
ee626fd36e Adding telemetry workload.
This workload executes tests from Google's Telemetry browser test
framework. Currently, only ChromeOS devices are supported.
2015-04-15 18:40:30 +01:00
Sergei Trofimov
315fecdf71 Updating XE503C12 device adapter.
- Setting platfrom to "chromeos"
- Changing the default binaries_directory (/usr/bin is not writable).
2015-04-15 18:40:30 +01:00
Sergei Trofimov
b198e131ee SyfsExtractor: added use_tmpfs parameter
Updating SysfsExtractor with a parameter to explicitly enable/disable
tempfs caching. Previously, this was determined entirely by whether the
device is rooted.
2015-04-15 18:40:30 +01:00
Sergei Trofimov
3e6b927cde Updating screen on instrument to support periodic polling. 2015-04-15 17:54:07 +01:00
Sergei Trofimov
fcc970db3f Adding screenon instrument 2015-04-15 16:34:24 +01:00
Javi Merino
a96088de9c Add a notify result processor
This result processor displays a desktop notification when the run
finishes.  It's useful when you are running a long agenda in WA and want
to be notified when the results are available.
2015-04-15 15:14:23 +01:00
Javi Merino
86f543cb72 Fix pep8 errors in ipynb_exporter
I ran first pep8 and then pylint, so I missed the pep8 errors introduced
by me shutting up pylint 😇
2015-04-15 14:34:23 +01:00
Javi Merino
8e09795c95 Add an ipython notebook exporter results_processor 2015-04-15 14:21:54 +01:00
Sergei Trofimov
5bf9f05c4b Updating result object to track their output directories.
Also, context.result will no result in context.run_result when
not executing a job.
2015-04-14 14:38:59 +01:00
Sergei Trofimov
8e340e456d Added open_file to misc utils.
A function to open a file using an associated launcher in an OS-agnostic
way.
2015-04-14 14:18:10 +01:00
Sergei Trofimov
61b834e52c Removing unnecessary comment form sqlite result processor documentation. 2015-04-14 12:02:24 +01:00
Javi Merino
1807f3e3d7 Fix Param documentation
The param documentation states that for a boolean, "kind" should be
"as_bool" from wlauto.utils.misc, but there is no "as_bool".  Currently,
workload automation automatically converts native python types like bool
and int to workload automation specific ones.  Remove this bit from the
documentation as it's not true any more.

Change-Id: I0100708530bcf67556eda386c39bc444a3e0f2b2
2015-04-13 22:42:25 +01:00
Sergei Trofimov
e03686f961 Improve error repoting when loading extensions
The error message will now contain the offending extension (either
package name or full path to extension file) if a Python error occurs
when ExtensionLoader attempts to load it.
2015-04-13 08:25:56 +01:00
Sergei Trofimov
c5d3c2bd62 Fixing reboot on Linux devices [part 2]
- connect() to device before issuing the initial reboot, as soft reset
  requires a device connection.
- boot() has been implemented to wait properly for the device to reboot
  after reset.
- port now defaults to 22 rather than being left unset, as need
  something to connect to when polling for device after reboot.
- Only use -P option for scp when port is *not* 22; as that option
  appears to cause intermittent issues with default scp on Ubuntu 12.04
2015-04-10 17:04:22 +01:00
Sergei Trofimov
d838caadd5 Adding XE503C12 device.
Adding a device interface for Samsung XE503C12 Chromebooks.
2015-04-10 09:37:40 +01:00
Sergei Trofimov
086f03730b ssh: pep8 fix 2015-04-10 09:36:55 +01:00
Sergei Trofimov
fea32de3d3 Parameterizing password prompt for sudo in Ssh interface.
On some devices, sudo presents a different prompt when asking for a
password. All the prompt to be specified in device configruation to
handle such cases.
2015-04-10 09:03:48 +01:00
Lisa Nguyen
e37bf90da7 sysbench: Fix spelling, descriptions, and error message
Make the WorkloadError() message clearer if the sysbench
binary cannot be found on the device and host.

Also make trivial fixes to improve descriptions and fix
spelling errors.

Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-04-10 08:22:01 +01:00
Sergei Trofimov
544f5f0b92 Fixing terminalsize import error.
terminalsize was loaded from a location added to sys.path during
bootstrap. This appeared to be causing import issues. There is no longer
a good reason for terminalsize to be loaded that way, so just moved it
under wlauto.utils so that it can be loaded normally.
2015-04-09 08:32:02 +01:00
setrofim
73f889b45b Merge pull request #3 from freedomtan/master
typo: s/SKD/SDK/
2015-04-07 09:47:51 +01:00
Sergei Trofimov
7b5f5e2ed0 Fixing Linux device reset.
_is_ready was being set to False before invoking execute("reboot")
causing a device not ready error.
2015-04-07 09:09:13 +01:00
Koan-Sin Tan
cd4790dd4b s/SKD/SDK/ 2015-04-07 09:23:24 +08:00
Lisa Nguyen
a7895a17bf common/linux/device.py: Create binaries_directory path if it doesn't exist
Some Linux devices may run on minimal root file systems
(e.g. buildroot) where /usr/local/bin path doesn't exist. Create
the binaries_directory if it doesn't exist instead of letting WA
quit and return errors such as:

INFO     Runner: Skipping the rest of the iterations for this spec.
ERROR    Runner: Error while running memcpy
ERROR    Runner: CalledProcessError("Command 'sshpass
                  -p '<password>' /usr/bin/scp -r
                  /usr/local/lib/python2.7/dist-packages/
                  wlauto-2.3.0-py2.7.egg/wlauto/workloads/memcpy
                  /memcpy root@192.168.x.x:/usr/local/bin/memcpy'
                  returned non-zero exit status 1")
ERROR    Runner: Got:
ERROR    Runner:
ERROR    Runner: scp: /usr/local/bin/memcpy:
                  No such file or directory

Signed-off-by: Lisa Nguyen <lisa.nguyen@linaro.org>
2015-04-01 08:05:11 +01:00
Sergei Trofimov
925c354551 Fix hotplugging all cores on a cluster.
When attempting to set number of cores on a cluster to 0, make
sure at least one core is enabled on the other cluster beforehand.
2015-03-27 12:54:26 +00:00
Sergei Trofimov
adb5ea9a30 Fixing UEFI entry creation for Juno
- UEFI config can be specified as a device_config parameter
- The same config is used to create a missing UEFI entry, and
  to re-create the entry when flashing. UEFI config now wholy
  resides within the device and is not specified for vexpress
  flasher.
2015-03-26 10:42:55 +00:00
Vasilis Flouris
5c48b75375 Adding dumpsys window output to __meta 2015-03-25 17:56:58 +00:00
Sergei Trofimov
678efa72e1 Fixing sysbench workload
- Updated sysbench binary to a statically linked verison
- Added missing LICENSE file for the sysbench binary
- Removed Android browser launch and shutdown from workload (now runs on both
  Linux and Android)
- Updated update_result to work with the new binary
- Added missing descriptions for parameters
- Added file_test_mode parameter -- this is a mandatory argumet if test is
  fileio
- Added cmd_params parameter to pass options directily to sysbench invocation
2015-03-25 10:31:02 +00:00
Vasilis Flouris
01d4126cc8 Fix for 64 bit revent [part 2]
The struct used to read events is being padded when built for 64
bit platforms. The padding has been made explicit in the struct, and
matching padding was added when writing the events during recording.
2015-03-23 18:59:54 +00:00
Kevin Hilman
bf12d18457 common/linux/device.py: don't require sudo if already root user
On generic_linux devices, one might ssh as the root user, in which
case there is no need to use sudo.

In addition, some root filesystems may not have sudo (e.g. minimal
buildroot/busybox).

This patch attempts to detect the root user using 'id -u' and, if it
detects the root user, avoids the use of sudo for running commands as
well.

Cc: Lisa Nguyen <lisa.nguyen@linaro.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
(setrofim: modified to only test once)
2015-03-23 10:18:32 +00:00
Sergei Trofimov
ee7f22e902 Fixing 64bit revent
Then number of input event files was being written as a size_t but read
as an int by revent. These types have different sizes with 64bit GCC,
causing revent not being able to replay recorded files. This comint
updates revent to use size_t when both reading and writing.
2015-03-20 09:25:57 +00:00
Sergei Trofimov
6a77ac656f Updated fps instrumentat to generate detailed FPS traces as well as report average FPS. 2015-03-19 17:15:36 +00:00
Sergei Trofimov
aa74e1e8f5 Minor fix to rst table generation.
Updated format_simple_table to take headers into account when
calculating column widths. Also updated docs where it currently used.
2015-03-18 10:47:07 +00:00
Sergei Trofimov
3e0c8aa83b glb_corporate: clear logcat in Monitor's __init__ to prevent getting results from previous run. 2015-03-16 09:36:32 +00:00
Rocky Zhang
aca08cf74d Update __init__.py
The boot monitor seems to have some buffer overrun issue while loading the latest Linaro android images.
The behavior is after loading the initrd, the kernel loading will fail, very likely to due command line buffer overrun.
the new initrd in the Linaro image is 3 times larger than the previous version, which could cause the issue.
putting a dummy enter between loading initrd and the kernel could resolve the issue.
2015-03-16 11:26:58 +08:00
Sergei Trofimov
529a1d3b95 Fixing initialization of ~/.workload_automation. 2015-03-13 10:25:31 +00:00
Sergei Trofimov
a747ec7e4c Initial commit of open source Workload Automation. 2015-03-10 13:09:31 +00:00