Remove the hard-coded path of build_verity_metadata.py.
build_image.py used to invoke build_verity_metadata.py with a hard-coded
path of 'system/extras/verity/build_verity_metadata.py', which makes it
hard to run unittests from non-$(ANDROID_BUILD_TOP) directory.
This CL adds the dependency on the tool, so that it gets installed to
$(HOST_OUT_EXECUTABLES), then removes the hard-coded path.
Bug: 74544459
Bug: 76015688
Test: `m dist`
Test: python -m unittest test_validate_target_files
Change-Id: I0dcf4eb067a0db6f099cb589eb99a151a05c7f2b
diff --git a/tools/releasetools/test_validate_target_files.py b/tools/releasetools/test_validate_target_files.py
index bae648f..d62ea95 100644
--- a/tools/releasetools/test_validate_target_files.py
+++ b/tools/releasetools/test_validate_target_files.py
@@ -14,21 +14,7 @@
# limitations under the License.
#
-"""Unittests for validate_target_files.py.
-
-Note: This file calls functions in build_image.py that hard-code the path in
-relative to ANDROID_BUILD_TOP (e.g.
-system/extras/verity/build_verity_metadata.py). So the test needs to be
-triggered under ANDROID_BUILD_TOP or the top-level OTA tools directory (i.e.
-the one after unzipping otatools.zip).
-
- (from ANDROID_BUILD_TOP)
- $ PYTHONPATH=build/make/tools/releasetools python -m unittest \\
- test_validate_target_files
-
- (from OTA tools directory)
- $ PYTHONPATH=releasetools python -m unittest test_validate_target_files
-"""
+"""Unittests for validate_target_files.py."""
from __future__ import print_function