diff options
author | Senthil Kumaran <senthil.kumaran@linaro.org> | 2013-04-22 14:32:18 +0530 |
---|---|---|
committer | Senthil Kumaran <senthil.kumaran@linaro.org> | 2013-04-22 14:32:18 +0530 |
commit | 36d487ba57ec28ec8c68e278bef148a7f4949c17 (patch) | |
tree | f2ce20915a4046ab35d842ec35bae4225ee56300 /android/scripts/skia.sh | |
parent | 786b7e40f098452c08b79deb9f3558ab584e5d39 (diff) |
Add skia test to android - Fix bug #1170629
Contributed by: harigopal-gollamudi
Diffstat (limited to 'android/scripts/skia.sh')
-rwxr-xr-x | android/scripts/skia.sh | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/android/scripts/skia.sh b/android/scripts/skia.sh new file mode 100755 index 0000000..736d04c --- /dev/null +++ b/android/scripts/skia.sh @@ -0,0 +1,60 @@ +#!/system/bin/sh +# +# Skia test. +# +# Copyright (C) 2012, Linaro Limited. +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Author: Fahad Kunnathadi <fahad.k@linaro.org> +# Author: HariGopal <harigopal.gollamudi@linaro.org> + +skia_test_exec(){ + + logcat -c + + DIRECTORY=$1 + if [ ! -d "$DIRECTORY" ]; then + mkdir $DIRECTORY; + fi + + SKIA_TEST=$2 + if [ -e "$DIRECTORY/$SKIA_TEST.txt" ]; then + #echo "File exists for $SKIA_TEST" + rm -f $DIRECTORY/$SKIA_TEST.txt + else + touch "$DIRECTORY/$SKIA_TEST.txt" + fi + + touch "$DIRECTORY/tmp.txt" + OPTIONS=$3 + + #echo "skia test executing: $SKIA_TEST" + skia_bench -repeat $OPTIONS -timers w -config 565 -match $SKIA_TEST + #echo "skia writing into $DIRECTORY/$SKIA_TEST.txt" + + logcat -d | grep "running bench" |tr -s " "|cut -d \ -f 8,9,10,12,14 + #logcat -d -s "skia:*" > $DIRECTORY/tmp.txt + #awk -F':' '{print $2 $3}' $DIRECTORY/tmp.txt > $DIRECTORY/$SKIA_TEST.txt + +} + +DEFAULT_PATH="/data/skia" + +logcat -c + +skia_test_exec $DEFAULT_PATH rects 1000 +skia_test_exec $DEFAULT_PATH bitmap 1000 +skia_test_exec $DEFAULT_PATH repeat 1000 |