summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Zhuoyao Zhang <zhuoyao@google.com> 2024-06-10 18:28:25 +0000
committer Zhuoyao Zhang <zhuoyao@google.com> 2024-06-10 18:28:25 +0000
commitf02aadfd274f1f0571f76af7d142df9b0271c0e8 (patch)
tree1025e8f153c20802b01c768b4b890254c753f3b5
parentbfcac4a398ad8e625ec0d9c9df1b83d7caf50cef (diff)
Support tool event logging for fastboot
This is part of the adte team's effort to collect metrics that help understand the bottlenecks in the Android local testing workflow. Added a fastboot function in build/envsetup.sh which wraps the actual fastboot binary with the logging script Bug: 346363374 Test: source build/envsetup.sh && lunch aosp_cf_x86_64_phone-trunk_staging-userdebug && fastboot --version tested in both bash and zsh Change-Id: Ia8d29b4323b64f9f853ee096728993096d7babe9
-rw-r--r--envsetup.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/envsetup.sh b/envsetup.sh
index 0ccb63172c..06dadd3f38 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -865,6 +865,16 @@ function adb() {
run_tool_with_logging "ADB" $ADB "${@}"
}
+function fastboot() {
+ local FASTBOOT=$(command which fastboot)
+ if [ -z "$FASTBOOT" ]; then
+ echo "Command fastboot not found; try lunch (and building) first?"
+ return 1
+ fi
+ # Support tool event logging for fastboot command.
+ run_tool_with_logging "FASTBOOT" $FASTBOOT "${@}"
+}
+
# communicate with a running device or emulator, set up necessary state,
# and run the hat command.
function runhat()