blob: 606dfdef168e3034e91046d8d3b7448ed269b7bb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
#!/bin/bash
. $PWD/setup-android.sh
set -e
export flags="-B NATIVE_COVERAGE=true ART_COVERAGE=true"
source build/envsetup.sh
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
fi
TEST_ART_COMMAND="test-art-host-gtest"
TEST_ART_OUTPUT_DIR=$WORKSPACE/$TEST_ART_COMMAND/
export GTEST_OUTPUT=xml:$TEST_ART_OUTPUT_DIR
MAKE_TARGETS=$TEST_ART_COMMAND
mkdir -p $WORKSPACE/$TEST_ART_COMMAND/
source build/envsetup.sh
lunch aosp_arm64-userdebug
./art/tools/buildbot-build.sh -j8 --host
export ART_TEST_FULL=false
export ART_TEST_INTERPRETER=true
export ART_TEST_KEEP_GOING=true
export ART_TEST_OPTIMIZING=true
export ART_TEST_RUN_TEST_2ND_ARCH=false
export ART_TEST_RUN_TEST_DEBUG=false
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
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
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))
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))
done
ccache -s
|