mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-01-19 04:21:17 +00:00
Imports: Updated Imports
Switch remaining wlauto imports to wa. Added other missing imports.
This commit is contained in:
parent
9899d1d51a
commit
e60e31ff8e
@ -18,9 +18,11 @@ import sys
|
|||||||
|
|
||||||
|
|
||||||
from wa import Command, settings
|
from wa import Command, settings
|
||||||
from wa.framework.configuration import RunConfiguration
|
from wa.framework import pluginloader
|
||||||
|
from wa.framework.agenda import Agenda
|
||||||
from wa.framework.resource import Executable, NO_ONE, ResourceResolver
|
from wa.framework.resource import Executable, NO_ONE, ResourceResolver
|
||||||
from wa.utils.revent import ReventRecorder
|
from wa.framework.configuration import RunConfiguration
|
||||||
|
from wa.framework.workload import ApkUiautoWorkload
|
||||||
|
|
||||||
|
|
||||||
class RecordCommand(Command):
|
class RecordCommand(Command):
|
||||||
|
@ -12,8 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
from wlauto.core.configuration.configuration import (settings,
|
from wa.framework.configuration.core import (settings,
|
||||||
RunConfiguration,
|
RunConfiguration,
|
||||||
JobGenerator,
|
JobGenerator,
|
||||||
ConfigurationPoint)
|
ConfigurationPoint)
|
||||||
from wlauto.core.configuration.plugin_cache import PluginCache
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from wlauto.core.configuration.configuration import MetaConfiguration, RunConfiguration
|
from wa.framework.configuration.core import MetaConfiguration, RunConfiguration
|
||||||
from wlauto.core.configuration.plugin_cache import PluginCache
|
from wa.framework.configuration.plugin_cache import PluginCache
|
||||||
from wlauto.utils.serializer import yaml
|
from wa.utils.serializer import yaml
|
||||||
from wlauto.utils.doc import strip_inlined_text
|
from wa.utils.doc import strip_inlined_text
|
||||||
|
|
||||||
DEFAULT_INSTRUMENTS = ['execution_time',
|
DEFAULT_INSTRUMENTS = ['execution_time',
|
||||||
'interrupts',
|
'interrupts',
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
from wlauto.core.configuration import settings
|
from wa.framework.configuration.core import settings
|
||||||
|
|
||||||
def init_user_directory(overwrite_existing=False): # pylint: disable=R0914
|
def init_user_directory(overwrite_existing=False): # pylint: disable=R0914
|
||||||
"""
|
"""
|
||||||
|
@ -26,7 +26,7 @@ from itertools import chain
|
|||||||
from copy import copy
|
from copy import copy
|
||||||
|
|
||||||
from wa.framework.configuration.core import settings, ConfigurationPoint as Parameter
|
from wa.framework.configuration.core import settings, ConfigurationPoint as Parameter
|
||||||
from wa.framework.exception import (NotFoundError, PluginLoaderError,
|
from wa.framework.exception import (NotFoundError, PluginLoaderError, TargetError,
|
||||||
ValidationError, ConfigError, HostError)
|
ValidationError, ConfigError, HostError)
|
||||||
from wa.utils import log
|
from wa.utils import log
|
||||||
from wa.utils.misc import (ensure_directory_exists as _d, walk_modules, load_class,
|
from wa.utils.misc import (ensure_directory_exists as _d, walk_modules, load_class,
|
||||||
@ -430,7 +430,7 @@ class Plugin(object):
|
|||||||
|
|
||||||
get_module(name, owner, **kwargs)
|
get_module(name, owner, **kwargs)
|
||||||
|
|
||||||
and returns an instance of :class:`wlauto.core.plugin.Module`. If the
|
and returns an instance of :class:`wa.core.plugin.Module`. If the
|
||||||
module with the specified name is not found, the loader must raise an
|
module with the specified name is not found, the loader must raise an
|
||||||
appropriate exception.
|
appropriate exception.
|
||||||
|
|
||||||
@ -743,10 +743,10 @@ class PluginLoader(object):
|
|||||||
self.logger.warning('Got: {}'.format(e))
|
self.logger.warning('Got: {}'.format(e))
|
||||||
else:
|
else:
|
||||||
msg = 'Failed to load {}'
|
msg = 'Failed to load {}'
|
||||||
raise LoaderError(msg.format(filepath), sys.exc_info())
|
raise PluginLoaderError(msg.format(filepath), sys.exc_info())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
message = 'Problem loading plugins from {}: {}'
|
message = 'Problem loading plugins from {}: {}'
|
||||||
raise LoaderError(message.format(filepath, e))
|
raise PluginLoaderError(message.format(filepath, e))
|
||||||
|
|
||||||
def _discover_in_module(self, module): # NOQA pylint: disable=too-many-branches
|
def _discover_in_module(self, module): # NOQA pylint: disable=too-many-branches
|
||||||
self.logger.debug('Checking module %s', module.__name__)
|
self.logger.debug('Checking module %s', module.__name__)
|
||||||
|
@ -231,7 +231,7 @@ def connect(handler, signal, sender=dispatcher.Any, priority=0):
|
|||||||
|
|
||||||
.. note:: There is nothing that prevents instrumentation from sending their
|
.. note:: There is nothing that prevents instrumentation from sending their
|
||||||
own signals that are not part of the standard set. However the signal
|
own signals that are not part of the standard set. However the signal
|
||||||
must always be an :class:`wlauto.core.signal.Signal` instance.
|
must always be an :class:`wa.core.signal.Signal` instance.
|
||||||
|
|
||||||
:sender: The handler will be invoked only for the signals emitted by this sender. By
|
:sender: The handler will be invoked only for the signals emitted by this sender. By
|
||||||
default, this is set to :class:`louie.dispatcher.Any`, so the handler will
|
default, this is set to :class:`louie.dispatcher.Any`, so the handler will
|
||||||
@ -270,7 +270,7 @@ def disconnect(handler, signal, sender=dispatcher.Any):
|
|||||||
|
|
||||||
:handler: The callback to be disconnected.
|
:handler: The callback to be disconnected.
|
||||||
:signal: The signal the handler is to be disconnected form. It will
|
:signal: The signal the handler is to be disconnected form. It will
|
||||||
be an :class:`wlauto.core.signal.Signal` instance.
|
be an :class:`wa.core.signal.Signal` instance.
|
||||||
:sender: If specified, the handler will only be disconnected from the signal
|
:sender: If specified, the handler will only be disconnected from the signal
|
||||||
sent by this sender.
|
sent by this sender.
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ def send(signal, sender=dispatcher.Anonymous, *args, **kwargs):
|
|||||||
|
|
||||||
Paramters:
|
Paramters:
|
||||||
|
|
||||||
:signal: Signal to be sent. This must be an instance of :class:`wlauto.core.signal.Signal`
|
:signal: Signal to be sent. This must be an instance of :class:`wa.core.signal.Signal`
|
||||||
or its subclasses.
|
or its subclasses.
|
||||||
:sender: The sender of the signal (typically, this would be ``self``). Some handlers may only
|
:sender: The sender of the signal (typically, this would be ``self``). Some handlers may only
|
||||||
be subscribed to signals from a particular sender.
|
be subscribed to signals from a particular sender.
|
||||||
|
@ -17,7 +17,8 @@ import os
|
|||||||
import time
|
import time
|
||||||
|
|
||||||
from wa.framework.plugin import TargetedPlugin
|
from wa.framework.plugin import TargetedPlugin
|
||||||
from wa.framework.resource import ApkFile, JarFile, ReventFile, NO_ONE
|
from wa.framework.resource import (ApkFile, JarFile, ReventFile, NO_ONE,
|
||||||
|
Executable)
|
||||||
from wa.framework.exception import WorkloadError
|
from wa.framework.exception import WorkloadError
|
||||||
|
|
||||||
from devlib.utils.android import ApkInfo
|
from devlib.utils.android import ApkInfo
|
||||||
|
@ -22,7 +22,7 @@ from unittest import TestCase
|
|||||||
|
|
||||||
from nose.tools import assert_equal
|
from nose.tools import assert_equal
|
||||||
|
|
||||||
from wlauto.instrumentation.misc import _diff_interrupt_files
|
from wa.instrumentation.misc import _diff_interrupt_files
|
||||||
|
|
||||||
|
|
||||||
class InterruptDiffTest(TestCase):
|
class InterruptDiffTest(TestCase):
|
||||||
|
@ -54,7 +54,7 @@ from devlib.utils.misc import (ABI_MAP, check_output, walk_modules,
|
|||||||
check_output_logger = logging.getLogger('check_output')
|
check_output_logger = logging.getLogger('check_output')
|
||||||
|
|
||||||
|
|
||||||
# Defined here rather than in wlauto.exceptions due to module load dependencies
|
# Defined here rather than in wa.exceptions due to module load dependencies
|
||||||
def diff_tokens(before_token, after_token):
|
def diff_tokens(before_token, after_token):
|
||||||
"""
|
"""
|
||||||
Creates a diff of two tokens.
|
Creates a diff of two tokens.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user