1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-02-20 20:09:11 +00:00

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.
This commit is contained in:
setrofim 2015-06-02 13:07:57 +01:00
commit 22b3fe1ac8
3 changed files with 57 additions and 3 deletions

View File

@ -1018,7 +1018,7 @@ class LinuxDevice(BaseLinuxDevice):
result = []
for line in lines:
parts = line.split()
parts = re.split('\s+', line, maxsplit=8)
if parts:
result.append(PsEntry(*(parts[0:1] + map(int, parts[1:5]) + parts[5:])))

View File

@ -0,0 +1,54 @@
# Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from wlauto import LinuxDevice, Parameter
from wlauto.utils.misc import convert_new_lines
import re
class ChromeOsDevice(LinuxDevice):
name = "chromeos_test_image"
description = """
Chrome OS test image device. Use this if you are working on a Chrome OS device with a test
image. An off the shelf device will not work with this device interface.
More information on how to build a Chrome OS test image can be found here:
https://www.chromium.org/chromium-os/developer-guide#TOC-Build-a-disk-image-for-your-board
"""
platform = 'chromeos'
abi = 'armeabi'
has_gpu = True
default_timeout = 100
parameters = [
Parameter('core_names', default=[], override=True),
Parameter('core_clusters', default=[], override=True),
Parameter('username', default='root', override=True),
Parameter('password', default='test0000', override=True),
Parameter('password_prompt', default='Password:', override=True),
Parameter('binaries_directory', default='/usr/local/bin', override=True),
Parameter('working_directory', default='/home/root/wa-working', override=True),
]
def initialize(self, context, *args, **kwargs):
self.uninstall('busybox') # busybox that comes with chromeos is missing some usefull utilities
super(ChromeOsDevice, self).initialize(context, *args, **kwargs)

View File

@ -634,7 +634,7 @@ class EnergyModelInstrument(Instrument):
spec.id = '{}_{}_{}'.format(cluster, num_cpus, freq)
spec.label = 'freq_{}_{}'.format(cluster, spec.label)
spec.workload_parameters['taskset_mask'] = list_to_mask(self.get_cpus(cluster))
spec.workload_parameters['num_threads'] = len(num_cpus)
spec.workload_parameters['num_threads'] = num_cpus
# max_requests set to an arbitrary high values to make sure
# sysbench runs for full duriation even on highly
# performant cores.
@ -649,7 +649,7 @@ class EnergyModelInstrument(Instrument):
return new_specs
def disable_thermal_management(self):
if self.device.file_exists('/sys/class/thermal'):
if self.device.file_exists('/sys/class/thermal/thermal_zone0'):
tzone_paths = self.device.execute('ls /sys/class/thermal/thermal_zone*')
for tzpath in tzone_paths.strip().split():
mode_file = '{}/mode'.format(tzpath)