Skip to content

Commit

Permalink
Add a keys argument to tapas
Browse files Browse the repository at this point in the history
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
  • Loading branch information
colincross committed Jan 28, 2022
1 parent 9072177 commit 7f49a67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,9 @@ function tapas()
local arch="$(echo $* | xargs -n 1 echo | \grep -E '^(arm|x86|arm64|x86_64)$' | xargs)"
local variant="$(echo $* | xargs -n 1 echo | \grep -E '^(user|userdebug|eng)$' | xargs)"
local density="$(echo $* | xargs -n 1 echo | \grep -E '^(ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)"
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)"
local keys="$(echo $* | xargs -n 1 echo | \grep -E '^(devkeys)$' | xargs)"
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)"


if [ "$showHelp" != "" ]; then
$(gettop)/build/make/tapasHelp.sh
Expand All @@ -772,13 +774,21 @@ function tapas()
echo "tapas: Error: Multiple densities supplied: $density"
return
fi
if [ $(echo $keys | wc -w) -gt 1 ]; then
echo "tapas: Error: Multiple keys supplied: $keys"
return
fi

local product=aosp_arm
case $arch in
x86) product=aosp_x86;;
arm64) product=aosp_arm64;;
x86_64) product=aosp_x86_64;;
esac
if [ -n "$keys" ]; then
product=${product/aosp_/aosp_${keys}_}
fi;

if [ -z "$variant" ]; then
variant=eng
fi
Expand Down
2 changes: 1 addition & 1 deletion tapasHelp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SCRIPT_DIR="${PWD}"
cd ../..
TOP="${PWD}"

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

0 comments on commit 7f49a67

Please sign in to comment.