summaryrefslogtreecommitdiffstats
path: root/vndk
diff options
context:
space:
mode:
authorLogan Chien <loganchien@google.com>2018-12-26 21:24:08 +0800
committerLogan Chien <loganchien@google.com>2019-03-05 10:45:25 +0800
commit5428fe5f1e647661b3b2dfa6466e7d8d99501660 (patch)
tree3129422c7ce42e2f60fd29627a1baa70c3da78f8 /vndk
parente74a73a610f031992ad5796813e06a839e8892a7 (diff)
downloadandroid_development-5428fe5f1e647661b3b2dfa6466e7d8d99501660.tar.gz
android_development-5428fe5f1e647661b3b2dfa6466e7d8d99501660.tar.bz2
android_development-5428fe5f1e647661b3b2dfa6466e7d8d99501660.zip
Always collect lsdump paths from lsdump_paths.txt
This commit removes the code path that searches lsdump files by traversing the directory. Instead, always read the lsdump paths from lsdump_paths.txt so that `create_reference_dumps.py` won't copy stale lsdump files. Bug: 121986692 Test: create_reference_dumps.py --llndk -lib libvulkan Change-Id: I8c81dc1fd51d146da19a894c32e0df35907ba604
Diffstat (limited to 'vndk')
-rwxr-xr-xvndk/tools/header-checker/utils/create_reference_dumps.py18
-rw-r--r--vndk/tools/header-checker/utils/utils.py2
2 files changed, 3 insertions, 17 deletions
diff --git a/vndk/tools/header-checker/utils/create_reference_dumps.py b/vndk/tools/header-checker/utils/create_reference_dumps.py
index e25ec6135..c39718d4c 100755
--- a/vndk/tools/header-checker/utils/create_reference_dumps.py
+++ b/vndk/tools/header-checker/utils/create_reference_dumps.py
@@ -35,13 +35,7 @@ class Target(object):
self.cpu_variant = build_vars[3]
-def get_lsdump_paths(product, libs):
- if libs is None:
- return get_lsdump_paths_from_out(product)
- return search_for_lsdump_paths(SOONG_DIR, libs)
-
-
-def get_lsdump_paths_from_out(product):
+def get_lsdump_paths(product):
build_vars_to_fetch = ['OUT_DIR', 'TARGET_DEVICE']
build_vars = get_build_vars_for_product(build_vars_to_fetch, product)
lsdump_paths_file = os.path.join(
@@ -163,14 +157,6 @@ def add_to_path_dict(path, dictionary, libs=tuple()):
dictionary[libname].append(path)
-def search_for_lsdump_paths(soong_dir, libs):
- lsdump_paths = collections.defaultdict(list)
- for root, _, files in os.walk(soong_dir):
- for file in files:
- add_to_path_dict(os.path.join(root, file), lsdump_paths, libs)
- return lsdump_paths
-
-
def create_source_abi_reference_dumps(args, product,
chosen_vndk_version, lsdump_paths,
targets):
@@ -226,7 +212,7 @@ def create_source_abi_reference_dumps_for_all_products(args):
make_libs_for_product(args.libs, args.llndk, product,
args.build_variant)
- lsdump_paths = get_lsdump_paths(product, args.libs)
+ lsdump_paths = get_lsdump_paths(product)
num_processed += create_source_abi_reference_dumps(
args, product, chosen_vndk_version, lsdump_paths, targets)
diff --git a/vndk/tools/header-checker/utils/utils.py b/vndk/tools/header-checker/utils/utils.py
index db08558e1..c63cb7dd5 100644
--- a/vndk/tools/header-checker/utils/utils.py
+++ b/vndk/tools/header-checker/utils/utils.py
@@ -147,7 +147,7 @@ def make_tree(product, variant):
def make_targets(targets, product, variant):
- make_cmd = ['build/soong/soong_ui.bash', '--make-mode', '-j',
+ make_cmd = ['build/soong/soong_ui.bash', '--make-mode', '-j', 'findlsdumps',
'TARGET_PRODUCT=' + product, 'TARGET_BUILD_VARIANT=' + variant]
make_cmd += targets
subprocess.check_call(make_cmd, cwd=AOSP_DIR, stdout=subprocess.DEVNULL,