1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2024-10-05 18:31:12 +01:00
Commit Graph

16 Commits

Author SHA1 Message Date
Sergei Trofimov
8878cc20d4 Update copyright headers.
- Add copyright headers to files that did not already have them
- Update the year to the last year the file was modified in files with
  existing headers.
2018-07-04 16:33:31 +01:00
Marc Bonnici
57ddf7845c tests: Update tests to work with python3 2018-07-04 11:54:17 +01:00
Marc Bonnici
107fdc203c tests/test_utils: Update behaviour of test
As part of commit #b3de85 porting to WA3, the behaviour of Enums changed
so that the attribute to be fetched is converted to lower case before
the lookup occurs. Due to the fact that 'names' is a predefined
attribute of the Enum class this clashes and will return the full list
of names instead of the individual entry. Update the test to use another
non reserved entry.
2018-07-04 11:54:17 +01:00
Sergei Trofimov
6ee40c2170 utils/types: implement __ne__ for level
This should have been handled by the @total_ordering decorator, but
isn't due to

        https://bugs.python.org/issue25732

(briefly, total_ordering is back-ported from Python 3, where the base
object provides the default implementation of __ne__ based on __eq__, so
total_ordering did not override it; this, however does not happen in
Python 2).

Also update unit tests to catch this edge case.
2018-06-14 15:04:56 +01:00
Sergei Trofimov
64f9cf79e4 utils/diff: fix diff_interrupt_files on Python 2
During Python 3 migration, the izip call inside diff_interrupt_files has
been replaced with a zip call (zip returning an iterator in Python 3).
Import zip from builtins to ensure that it also produces an iterator in
Python 2.

Also fix the associated unit test by importing the correct function.
2018-06-14 15:04:56 +01:00
Marc Bonnici
f73f502ecd tests/agenda_parser: Update agenda tests to the AgendaParser
The current test was designed to test the removed `Agenda` class, we now
use use an `AgendaParser` so update the tests to test its functionality
instead.
2018-05-24 11:49:10 +01:00
Marc Bonnici
2f02ee3b16 tests/test-agenda: Update to WA3 workloads
Update old WA2 only workloads to those present in WA3
2018-05-24 11:49:10 +01:00
Marc Bonnici
3efff81a5c utils/exec_control: Fix issue with once_per_instance decorator
Previously the `once_per_instance` used the output of `__repr__` to
identify the class of where the decorated method was called from. For
classes that override this method to produce the same output for
different instances of the same class this caused different instances to
be mistakenly treated as one. Now use the hash of the containing class
instead of the string representation and update the tests to catch this
error.
2018-05-22 17:18:40 +01:00
Marc Bonnici
041f4d93f7 tests/test_diff: Update instrumentation reference.
Update the import path for the test to use `instruments` instead of
`instrumentation`.
2018-05-21 10:26:28 +01:00
Marc Bonnici
707b5409e7 test/exec_control: Updated to test new @once functionality 2018-01-15 15:42:26 +00:00
Brendan Jackman
fd7ae4b95b tests: Update use of devlib cpufreq API
get_domain_cpus has been renamed get_related_cpus
2017-12-07 15:37:49 +00:00
Sergei Trofimov
a9959550af utils/types: better enum class member setting
- What used to be enum.values is now enum.levels.
- Add enum.names and enum.values that are lists of enum's levels' names
  and values respectively.
- Add a check on creation to make sure that provided level names do not
  conflict with the atomatically created members.
2017-08-09 15:59:20 +01:00
Sergei Trofimov
8d27b50a7c tests: add tests documenting enum behavior
Add tests that exercising various ways of creating and using WA enums.
2017-08-09 14:56:32 +01:00
Marc Bonnici
91c49d9e95 ExecControl: Fixes bug with inheritance
Previously there was no differentiation between the same method at different
inheritance levels, therefore using the once_per_instance_decorator with super call would
prevent the super call from executing as they were considered the same
instance.
2017-07-10 11:08:43 +01:00
Sergei Trofimov
5b3d7af62e types: make enum levels serializable
Add to/from_pod implementations to level, so that it may be serialized
properly. In order to make sure that serialization is a reversible
operation, ensure that the level value is numeric.
2017-06-26 09:13:30 +01:00
Sergei Trofimov
2bbe300dc2 tests: moved out of wa package
Tests now reside in the root of the repo, rather than in wa package.
This means they will no longer packaged and installed in user
deployments (they're only useful for developers).
2017-04-27 17:36:44 +01:00