1 #! /bin/bash 2 # 3 # Copyright 2017 The Android Open Source Project. 4 # 5 # Builds and runs signature APK tests. 6 7 if [ -z "$ANDROID_BUILD_TOP" ]; then 8 echo "Missing environment variables. Did you run build/envsetup.sh and lunch?" >&2 9 exit 1 10 fi 11 12 if [ $# -eq 0 ]; then 13 PACKAGES=" 14 CtsCurrentApiSignatureTestCases 15 CtsSystemCurrentApiSignatureTestCases 16 CtsAndroidTestMockCurrentApiSignatureTestCases 17 CtsAndroidTestRunnerCurrentApiSignatureTestCases 18 CtsLegacyTest26ApiSignatureTestCases 19 CtsApacheHttpLegacyCurrentApiSignatureTestCases 20 " 21 else 22 PACKAGES=${1+"$@"} 23 fi 24 25 cd $ANDROID_BUILD_TOP 26 make -j32 $PACKAGES 27 28 TMPFILE=$(mktemp) 29 trap "echo Removing temporary directory; rm -f $TMPFILE" EXIT 30 31 for p in $PACKAGES 32 do 33 echo cts -a arm64-v8a -m "$p" >> $TMPFILE 34 done 35 36 cts-tradefed run cmdfileAndExit $TMPFILE 37