diff options
author | Senthil Kumaran <senthil.kumaran@linaro.org> | 2013-05-10 15:04:04 +0530 |
---|---|---|
committer | Senthil Kumaran <senthil.kumaran@linaro.org> | 2013-05-10 15:04:04 +0530 |
commit | 26b56fbb27de352676f2631db84baa5fcc9fe710 (patch) | |
tree | e75877c5be5b85d8e6be8ebe3ef70cebd472f28f /android/scripts/tjbench | |
parent | e1e6ae27eca5675ee381284ebe473270c80fbac7 (diff) |
Initial bits for tjbench test.
Diffstat (limited to 'android/scripts/tjbench')
-rwxr-xr-x | android/scripts/tjbench/tjbench.sh | 26 | ||||
-rwxr-xr-x | android/scripts/tjbench/tjbenchparse.sh | 48 | ||||
-rwxr-xr-x | android/scripts/tjbench/tjbenchstart.sh | 29 |
3 files changed, 103 insertions, 0 deletions
diff --git a/android/scripts/tjbench/tjbench.sh b/android/scripts/tjbench/tjbench.sh new file mode 100755 index 0000000..110498d --- /dev/null +++ b/android/scripts/tjbench/tjbench.sh @@ -0,0 +1,26 @@ +#!/system/bin/sh +# +# tjbench.sh +# +# Copyright (C) 2013, 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. +# +# owner: harigopal.gollamudi@linaro.org +# + +tjbench $1 95 -rgb -quiet $2 $3 &> tjbench.txt +sh $PWD/android/scripts/tjbench/tjbenchparse.sh $2 $3 +rm -rf tjbench.txt diff --git a/android/scripts/tjbench/tjbenchparse.sh b/android/scripts/tjbench/tjbenchparse.sh new file mode 100755 index 0000000..a0bdf04 --- /dev/null +++ b/android/scripts/tjbench/tjbenchparse.sh @@ -0,0 +1,48 @@ +#!/system/bin/sh +# +# tjbenchparse.sh +# +# Copyright (C) 2013, 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. +# +# owner: harigopal.gollamudi@linaro.org +# + +while read line +do + echo $line|sed -n '/RGB/p' >> tmp.txt +done < tjbench.txt + +while read inputline +do + bmp_format="$(echo $inputline | cut -d' ' -f1)" + jpg_subsamp="$(echo $inputline | cut -d' ' -f3)" + jpg_qual="$(echo $inputline | cut -d' ' -f4)" + + test_def_comp_perf=$bmp_format'_'$jpg_subsamp'_'$jpg_qual'_comp_perf'$1$2 + test_def_comp_ratio=$bmp_format'_'$jpg_subsamp'_'$jpg_qual'_comp_ratio'$1$2 + test_def_decomp_perf=$bmp_format'_'$jpg_subsamp'_'$jpg_qual'_decomp_perf'$1$2 + + comp_perf="$(echo $inputline | cut -d' ' -f7)" + comp_ratio="$(echo $inputline | cut -d' ' -f8)" + decomp_perf="$(echo $inputline | cut -d' ' -f9)" + + echo $test_def_comp_perf 'pass' $comp_perf 'Mpixels/sec' + echo $test_def_comp_ratio 'pass' $comp_ratio '%' + echo $test_def_decomp_perf 'pass' $decomp_perf 'Mpixels/sec' + +done < tmp.txt +rm -rf tmp.txt diff --git a/android/scripts/tjbench/tjbenchstart.sh b/android/scripts/tjbench/tjbenchstart.sh new file mode 100755 index 0000000..c4aae14 --- /dev/null +++ b/android/scripts/tjbench/tjbenchstart.sh @@ -0,0 +1,29 @@ +#!/system/bin/sh +# +# tjbenchstart.sh +# +# Copyright (C) 2013, 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. +# +# owner: harigopal.gollamudi@linaro.org +# + +netcfg eth0 dhcp +setprop net.dns1 8.8.8.8 + +wget http://testdata.validation.linaro.org/tjbench/nightshot_iso_100.ppm +sh $PWD/android/scripts/tjbench/tjbench.sh $PWD/nightshot_iso_100.ppm scale 1/2 +sh $PWD/android/scripts/tjbench/tjbench.sh $PWD/nightshot_iso_100.ppm |