Skip to content

Commit 7f49a67

Browse files
committed
Add a keys argument to tapas
Add a keys argument to tapas that allows specifying devkeys to use internal aosp_devkeys_* products that use the internal devkeys, which will allow building unbundled apps that use platform keys for testing. Bug: 216553104 Test: tapas CarMediaApp devkeys Change-Id: I2161be9e15f99713e11d22901d6eb7ad3c420093
1 parent 9072177 commit 7f49a67

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

envsetup.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,9 @@ function tapas()
753753
local arch="$(echo $* | xargs -n 1 echo | \grep -E '^(arm|x86|arm64|x86_64)$' | xargs)"
754754
local variant="$(echo $* | xargs -n 1 echo | \grep -E '^(user|userdebug|eng)$' | xargs)"
755755
local density="$(echo $* | xargs -n 1 echo | \grep -E '^(ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)"
756-
local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|arm|x86|arm64|x86_64|ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)"
756+
local keys="$(echo $* | xargs -n 1 echo | \grep -E '^(devkeys)$' | xargs)"
757+
local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|arm|x86|arm64|x86_64|ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi|devkeys)$' | xargs)"
758+
757759

758760
if [ "$showHelp" != "" ]; then
759761
$(gettop)/build/make/tapasHelp.sh
@@ -772,13 +774,21 @@ function tapas()
772774
echo "tapas: Error: Multiple densities supplied: $density"
773775
return
774776
fi
777+
if [ $(echo $keys | wc -w) -gt 1 ]; then
778+
echo "tapas: Error: Multiple keys supplied: $keys"
779+
return
780+
fi
775781

776782
local product=aosp_arm
777783
case $arch in
778784
x86) product=aosp_x86;;
779785
arm64) product=aosp_arm64;;
780786
x86_64) product=aosp_x86_64;;
781787
esac
788+
if [ -n "$keys" ]; then
789+
product=${product/aosp_/aosp_${keys}_}
790+
fi;
791+
782792
if [ -z "$variant" ]; then
783793
variant=eng
784794
fi

tapasHelp.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ SCRIPT_DIR="${PWD}"
66
cd ../..
77
TOP="${PWD}"
88

9-
message='usage: tapas [<App1> <App2> ...] [arm|x86|arm64|x86_64] [eng|userdebug|user]
9+
message='usage: tapas [<App1> <App2> ...] [arm|x86|arm64|x86_64] [eng|userdebug|user] [devkeys]
1010
1111
tapas selects individual apps to be built by the Android build system. Unlike
1212
"lunch", "tapas" does not request the building of images for a device.

0 commit comments

Comments
 (0)