diff options
author | Fabien Sanglard <sanglardf@google.com> | 2023-11-14 11:25:59 -0800 |
---|---|---|
committer | Fabien Sanglard <sanglardf@google.com> | 2023-11-14 16:11:45 -0800 |
commit | 05398b39c5803ac7040106707af5c491e0a52d6b (patch) | |
tree | c305c95dec87dc23894d0c1ad9cc6648344ff7c7 | |
parent | f8bc0c6b83d33b551131517b9468947a362f6631 (diff) | |
download | adb-05398b39c5803ac7040106707af5c491e0a52d6b.tar.gz |
Fix benchmark_device
If user has not set its environment there are no instructions on how
to fix it.
Test: NA
Bug: 310747667
Change-Id: I43ab2416991399ea6383a88b384532a9dba2894c
-rwxr-xr-x | benchmark_device.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/benchmark_device.py b/benchmark_device.py index 4d0cf49a..4a543480 100755 --- a/benchmark_device.py +++ b/benchmark_device.py @@ -18,9 +18,15 @@ import os import statistics import subprocess +import sys import tempfile import time +# Make sure environment is setup, otherwise "adb" module is not available. +if os.getenv("ANDROID_BUILD_TOP") is None: + print("Run source/lunch before running " + sys.argv[0]) + sys.exit() + import adb def lock_min(device): |