summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2022-09-08 14:35:57 -0700
committerYabin Cui <yabinc@google.com>2022-09-08 14:36:21 -0700
commite82c2a0ebe8c0cb5135cc936dca5505dad5ec127 (patch)
tree6eeea42f10c8008e0fc464531465f08c0d9b7cf4
parentab19bc5b97685cab637f22f645e9fc156151a7fa (diff)
downloadsimpleperf-e82c2a0ebe8c0cb5135cc936dca5505dad5ec127.tar.gz
simpleperf: add proto files in prebuilts.
It's to release proto files in NDK. So users don't need to copy them. Bug: none Test: run update.py Change-Id: If69c037f7d935f138d5c673b9a258448a9699d49
-rwxr-xr-xupdate.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/update.py b/update.py
index e8cdd23..7a0de88 100755
--- a/update.py
+++ b/update.py
@@ -145,7 +145,7 @@ def commit(branch, build, add_paths):
def list_prebuilts() -> List[str]:
"""List all prebuilts in current directory."""
result = []
- for d in ['app_api', 'bin', 'doc', 'inferno', 'purgatorio', 'test', 'testdata']:
+ for d in ['app_api', 'bin', 'doc', 'inferno', 'proto', 'purgatorio', 'test', 'testdata']:
if os.path.isdir(d):
result.append(d)
result += glob.glob('*.py') + glob.glob('*.js')
@@ -208,6 +208,13 @@ def unzip_simpleperf_scripts(zip_path: str):
remove('inferno/Android.bp')
remove('CONTRIBUTING.md')
+ # Move proto files.
+ proto_dir = Path('proto')
+ proto_dir.mkdir()
+ for sub_path in Path.cwd().iterdir():
+ if sub_path.suffix == '.proto':
+ shutil.move(sub_path, proto_dir)
+
# Build testdata.
testdata_dir = Path('test/testdata')
testdata_dir.mkdir()
@@ -217,6 +224,7 @@ def unzip_simpleperf_scripts(zip_path: str):
remove(source_dir)
remove(testdata_dir / 'Android.bp')
+
def install_repo_prop(branch, build):
"""Installs the repo.prop from the build for auditing."""
# We took everything from the same build number, so we only need the