From 68fefe853208e097dbb87f34f6de6465e211527b Mon Sep 17 00:00:00 2001 From: Sebastian Goscik Date: Mon, 1 Feb 2016 14:12:54 +0000 Subject: [PATCH] manual: Fixed trying to logcat on non linux devices --- wlauto/workloads/manual/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wlauto/workloads/manual/__init__.py b/wlauto/workloads/manual/__init__.py index 344a71fb..8edeefd6 100644 --- a/wlauto/workloads/manual/__init__.py +++ b/wlauto/workloads/manual/__init__.py @@ -59,7 +59,7 @@ class ManualWorkload(Workload): Parameter('view', default='SurfaceView', description="""Specifies the View of the workload. This enables instruments that require a View to be specified, such as the ``fps`` instrument."""), - Parameter('enable_logcat', kind=boolean, default=True, + Parameter('enable_logcat', kind=boolean, description='If ``True``, ``manual`` workload will collect logcat as part of the results.'), ] @@ -103,3 +103,7 @@ class ManualWorkload(Workload): if not self.user_triggered and not self.duration: raise ConfigError('Either user_triggered must be ``True`` or duration must be > 0.') + if self.enable_logcat is None: + self.enable_logcat = self.device.platform == "android" + elif self.enable_logcat and self.device.platform != "android": + raise ConfigError("The `enable_logcat` parameter can only be used on Android devices")