# Copyright (c) 2012 Linaro # Author: Linaro Validation Team # # This file is part of LAVA Android Test. # # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . """ Runs the skia benchmark to test 2D graphics performance. **URL:** https://sites.google.com/site/skiadocs/ **Default options:** None """ import re import lava_android_test.testdef test_name = 'skia' DEFAULT_OPTIONS = '1000' INSTALL_STEPS_ADB_PRE = [] # Skia can do many more benchmarks, but it becomes almost too much data # to make a nice chart for. The -match limits the ones we run ADB_SHELL_STEPS = ['logcat -c', 'skia_bench -repeat $(OPTIONS) -timers w -config 565 -match bitmap', 'skia_bench -repeat $(OPTIONS) -timers w -config 565 -match rects', 'skia_bench -repeat $(OPTIONS) -timers w -config 565 -match repeat', 'logcat -d -s "skia:*"'] class SkiaTestParser(lava_android_test.testdef.AndroidTestParser): def parse(self, result_filename=None, output_filename=None, test_name=test_name): pat_test = re.compile(r'running bench \[.*?\]\W+(?P\w+)\W+$') pat_type = re.compile( r'\d+\):\W+(?P\w+):\W+msecs =\W+(?P