-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild-vts.sh
executable file
·78 lines (65 loc) · 1.87 KB
/
build-vts.sh
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
# Build Android
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
export ANDROID_MANIFEST_URL="https://android.googlesource.com/platform/manifest"
#export MANIFEST_BRANCH="android-vts-9.0_r5"
export MANIFEST_BRANCH="android-vts-9.0_r9"
#export TOOLCHAIN="clang-r346389c"
export TOOLCHAIN="clang-r353983c"
export LUNCH_TARGET="aosp_arm64-userdebug"
export nproc=9
export latest=0
while [ "$1" != "" ]; do
case $1 in
-t | --toolchain ) shift
export TOOLCHAIN=$1
;;
-b | --branch) shift
export MANIFEST_BRANCH=$1
;;
-s | --skipdownloads ) export skipdownloads=1
;;
-l | --latest ) export latest=1
;;
-h | --help ) usage
exit
;;
* ) usage
exit 1
esac
shift
done
echo "Default Branch for vts build is $MANIFEST_BRANCH"
rm -rf out/
if [ "$skipdownloads" = "1" ]; then
# repo sync -j"$(nproc)" -c
echo skip
else
repo init -u ${ANDROID_MANIFEST_URL} -b ${MANIFEST_BRANCH}
repo sync -j"$(nproc)" -c
mkdir -p pub
repo manifest -r -o pub/pinned-manifest.xml
fi
#if [ -n "$PATCHSETS" ]; then
# rm -rf android-patchsets
# git clone --depth=1 https://android-git.linaro.org/git/android-patchsets.git
# for i in $PATCHSETS; do
# sh ./android-patchsets/$i
# done
#fi
source build/envsetup.sh
lunch ${LUNCH_TARGET}
if [ "$latest" = "1" ]; then
if [ "$skipdownloads" != "1" ]; then
cd external/ltp
git checkout master
cd ../..
cd system/core
git cherry-pick c3d4e7226a74c3c4092480606ef07e0d30a2d42d
cd ../..
# cd external/ltp/
# android/tools/gen_android_build.sh
cd ../..
fi
fi
make -j"$(nproc)" vts
make -j"$(nproc)" adb