diff options
author | Botao Sun <botao.sun@linaro.org> | 2014-10-17 03:50:58 +1100 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2014-10-20 15:47:52 +0000 |
commit | 36ff2da38614162510a906c0e5d9f2fe7c26130b (patch) | |
tree | cdb2469352407a716816fbcb26d12ae3880413b6 /android | |
parent | f46ae26134c910e742fb333fa312ff1a339b0717 (diff) |
tjbench.sh, tjbenchstart.sh and tjbenchparse.sh: POSIX Compliant Update.
This change is to make the test script to be POSIX compliant.
Original patch comes from:
Lucas Dutra Nunes <ldnunes@ossystems.com.br>
Signed-off by: Botao Sun <botao.sun@linaro.org>
Change-Id: I80980308bef8bb5b2d3790baa99b9cae01f48da7
Diffstat (limited to 'android')
-rwxr-xr-x | android/scripts/tjbench/tjbench.sh | 14 | ||||
-rwxr-xr-x | android/scripts/tjbench/tjbenchparse.sh | 38 | ||||
-rwxr-xr-x | android/scripts/tjbench/tjbenchstart.sh | 17 |
3 files changed, 33 insertions, 36 deletions
diff --git a/android/scripts/tjbench/tjbench.sh b/android/scripts/tjbench/tjbench.sh index 110498d..a7b2395 100755 --- a/android/scripts/tjbench/tjbench.sh +++ b/android/scripts/tjbench/tjbench.sh @@ -2,7 +2,7 @@ # # tjbench.sh # -# Copyright (C) 2013, Linaro Limited. +# Copyright (C) 2010 - 2014, Linaro Limited. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -15,12 +15,12 @@ # 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 +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # +# Author: Harigopal Gollamudi <harigopal.gollamudi@linaro.org> +# Maintainer: Botao Sun <botao.sun@linaro.org> -tjbench $1 95 -rgb -quiet $2 $3 &> tjbench.txt -sh $PWD/android/scripts/tjbench/tjbenchparse.sh $2 $3 +tjbench $1 95 -rgb -quiet $2 $3 > tjbench.txt 2>&1 +sh $PWD/tjbenchparse.sh $2 $3 rm -rf tjbench.txt diff --git a/android/scripts/tjbench/tjbenchparse.sh b/android/scripts/tjbench/tjbenchparse.sh index a0bdf04..531fc01 100755 --- a/android/scripts/tjbench/tjbenchparse.sh +++ b/android/scripts/tjbench/tjbenchparse.sh @@ -2,7 +2,7 @@ # # tjbenchparse.sh # -# Copyright (C) 2013, Linaro Limited. +# Copyright (C) 2010 - 2014, Linaro Limited. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -15,34 +15,34 @@ # 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 +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # +# Author: Harigopal Gollamudi <harigopal.gollamudi@linaro.org> +# Maintainer: Botao Sun <botao.sun@linaro.org> while read line do - echo $line|sed -n '/RGB/p' >> tmp.txt + 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)" + 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 - 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)" - 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' + 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 index c4aae14..5505a4a 100755 --- a/android/scripts/tjbench/tjbenchstart.sh +++ b/android/scripts/tjbench/tjbenchstart.sh @@ -2,7 +2,7 @@ # # tjbenchstart.sh # -# Copyright (C) 2013, Linaro Limited. +# Copyright (C) 2010 - 2014, Linaro Limited. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License @@ -15,15 +15,12 @@ # 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. +# 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 +# Author: Harigopal Gollamudi <harigopal.gollamudi@linaro.org> +# Maintainer: Botao Sun <botao.sun@linaro.org> 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 +sh $PWD/tjbench.sh $PWD/nightshot_iso_100.ppm scale 1/2 +sh $PWD/tjbench.sh $PWD/nightshot_iso_100.ppm |