From 119106b7a616b8313843d330e0ea58cef9b56e33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20D=C3=ADaz?= Date: Fri, 11 Dec 2015 17:00:00 -0600 Subject: acov: Reindent. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2f211be7fc7b2e55e3dba421991f11279576fab7 Signed-off-by: Daniel Díaz --- acov.sh | 116 +++++++++++++++++++++++++++++++--------------------------------- 1 file changed, 57 insertions(+), 59 deletions(-) diff --git a/acov.sh b/acov.sh index 81efadd..606dfde 100755 --- a/acov.sh +++ b/acov.sh @@ -9,9 +9,9 @@ lunch aosp_arm64-eng acov --clean if [[ ! -e ./art/tools/buildbot-build.sh ]]; then -wget https://android-git.linaro.org/gitweb/platform/art.git/blob_plain/refs/heads/master:/tools/buildbot-build.sh -O ./art/tools/buildbot-build.sh -sed -i "s/build-art-host-tests/build-art-host/g" ./art/tools/buildbot-build.sh -chmod a+x ./art/tools/buildbot-build.sh + wget https://android-git.linaro.org/gitweb/platform/art.git/blob_plain/refs/heads/master:/tools/buildbot-build.sh -O ./art/tools/buildbot-build.sh + sed -i "s/build-art-host-tests/build-art-host/g" ./art/tools/buildbot-build.sh + chmod a+x ./art/tools/buildbot-build.sh fi TEST_ART_COMMAND="test-art-host-gtest" @@ -33,72 +33,70 @@ export ART_TEST_RUN_TEST_NDEBUG=true export ART_USE_OPTIMIZING_COMPILER=true make -j8 $MAKE_TARGETS -for target in "ARM" "x86" "mips" -do -if [[ $target = "ARM" ]]; then -lunch aosp_arm64-eng -out_dir=generic_arm64 -elif [[ $target = "mips" ]]; then -lunch aosp_mips64-eng -out_dir=generic_mips64 -else -lunch aosp_x86_64-eng -out_dir=generic_x86_64 -fi +for target in "ARM" "x86" "mips"; do + if [[ $target = "ARM" ]]; then + lunch aosp_arm64-eng + out_dir=generic_arm64 + elif [[ $target = "mips" ]]; then + lunch aosp_mips64-eng + out_dir=generic_mips64 + else + lunch aosp_x86_64-eng + out_dir=generic_x86_64 + fi -make $flags -j$jcpu_count dex2oatd dex2oat -for mode in Quick Optimizing -do -sed -i "s/\$(COMPILED_CLASSES_FLAGS)/\$(COMPILED_CLASSES_FLAGS) --compiler-backend=$mode/g" build/core/dex_preopt_libart_boot.mk -for arch in 32 64 -do -if [[ $arch = 64 && $target = "ARM" ]]; then -libdir="arm64" -elif [[ $arch = 32 && $target = "ARM" ]]; then -libdir="arm" -elif [[ $arch = 64 && $target = "mips" ]]; then -libdir="mips64" -if [[ $mode = Quick ]]; then -continue -fi -elif [[ $arch = 32 && $target = "mips" ]]; then -libdir="mips" -if [[ $mode = Optimizing ]]; then -continue -fi -elif [[ $arch = 64 && $target = "x86" ]]; then -libdir="x86_64" -else -libdir="x86" -fi -make -j$jcpu_count $flags out/target/product/$out_dir/system/framework/$libdir/boot.art > logs.txt 2>&1 -cat logs.txt -cat logs.txt | grep "dex2oatd --runtime-arg" > cmd.txt -sed -i "s/.*out\/host\/linux-x86\/bin\/dex2oatd/out\/host\/linux-x86\/bin\/dex2oat/g" cmd.txt -`cat cmd.txt` -done -cd build/core -git reset --hard -cd - -done + make $flags -j$jcpu_count dex2oatd dex2oat + for mode in Quick Optimizing; do + sed -i "s/\$(COMPILED_CLASSES_FLAGS)/\$(COMPILED_CLASSES_FLAGS) --compiler-backend=$mode/g" build/core/dex_preopt_libart_boot.mk + for arch in 32 64; do + if [[ $arch = 64 && $target = "ARM" ]]; then + libdir="arm64" + elif [[ $arch = 32 && $target = "ARM" ]]; then + libdir="arm" + elif [[ $arch = 64 && $target = "mips" ]]; then + libdir="mips64" + if [[ $mode = Quick ]]; then + continue + fi + elif [[ $arch = 32 && $target = "mips" ]]; then + libdir="mips" + if [[ $mode = Optimizing ]]; then + continue + fi + elif [[ $arch = 64 && $target = "x86" ]]; then + libdir="x86_64" + else + libdir="x86" + fi + + make -j$jcpu_count $flags out/target/product/$out_dir/system/framework/$libdir/boot.art > logs.txt 2>&1 + cat logs.txt + cat logs.txt | grep "dex2oatd --runtime-arg" > cmd.txt + sed -i "s/.*out\/host\/linux-x86\/bin\/dex2oatd/out\/host\/linux-x86\/bin\/dex2oat/g" cmd.txt + `cat cmd.txt` + done + + cd build/core + git reset --hard + cd - + done done + export EXTRA_ARGS=--gcov-tool=/usr/bin/gcov-4.6 mkdir $WORKSPACE/gcov-results lcov -c -b $ANDROID_BUILD_TOP -d $ANDROID_HOST_OUT -o $WORKSPACE/gcov-results/results $EXTRA_ARGS -genhtml -q -o $WORKSPACE/gcov-results/ $WORKSPACE/gcov-results/results +genhtml -q -o $WORKSPACE/gcov-results/ $WORKSPACE/gcov-results/results acovscore=`grep " %" $WORKSPACE/gcov-results/index.html | sed -e "s/.*\">//g" | sed -e "s/%.*//g"` var=1 -for score in $acovscore -do -echo "YVALUE=$score" > $WORKSPACE/overall_$var.txt -var=$((var+1)) +for score in $acovscore; do + echo "YVALUE=$score" > $WORKSPACE/overall_$var.txt + var=$((var+1)) done acovscore=`grep " %" $WORKSPACE/gcov-results/art/compiler/optimizing/index.html | sed -e "s/.*\">//g" | sed -e "s/%.*//g"` var=1 -for score in $acovscore -do -echo "YVALUE=$score" > $WORKSPACE/optimizing_$var.txt -var=$((var+1)) +for score in $acovscore; do + echo "YVALUE=$score" > $WORKSPACE/optimizing_$var.txt + var=$((var+1)) done ccache -s -- cgit v1.2.3