platform_build/tools
Tao Bao c6bd70a5e6 releasetools: Raise on image building errors.
The image building functions in build_image.py have been returning
(success, result) or special values to indicate the validity of the
result. The same logic can be better expressed by raising exceptions
instead, because
 a) using a special value relies on caller to check for that magic
    value;
 b) exceptions can carry additional messages other than a boolean does,
    e.g. the output from the failing command;
 c) caller can have cleaner code flow without explicitly checking for
    the validity of the result.

This CL changes such functions to raise on errors. The majority of these
functions are internal to build_image.py only, except for BuildImage()
that has a few callers in add_img_to_target_files.py (which all die upon
error anyway).

Test: `m dist`
Test: python -m unittest test_build_image
Test: python -m unittest test_add_img_to_target_files
Test: python -m unittest test_validate_target_files
Test: Inject an error to the depended binaries (e.g. avbtool), and check
      that build_image.py exits with error messages.
Change-Id: Ibe4d51e267756bb1a00fa9238a213f9d55fd9b58
2018-10-03 11:31:44 -07:00
..
acp Use -Werror in build/make 2017-10-03 13:53:13 -07:00
apicheck Convert apicheck tool build to Soong. 2018-05-15 11:38:44 +09:00
atree Use -Werror in build/make 2017-10-03 13:53:13 -07:00
docker Add USER to the docker environment 2018-04-12 16:41:17 -07:00
droiddoc Merge "Remove make/tools/droiddoc/test/stubs/Android.mk" am: 2fb914c56b 2018-04-16 16:45:52 -07:00
fs_config Split up fs_config_* modules per partition. 2018-06-27 11:15:59 +01:00
fs_get_stats Use -Werror in build/make 2017-10-03 13:53:13 -07:00
libhost Fix / suppress warnings for clang+mingw 2017-11-29 20:54:33 -08:00
makeparallel Add -lm to the default libs for Linux & Darwin 2017-09-26 20:26:11 -07:00
releasetools releasetools: Raise on image building errors. 2018-10-03 11:31:44 -07:00
signapk Move signapk to a dedicated "host" target 2018-09-12 08:19:49 +01:00
signtos Make host targets use non-repackaged targets 2018-07-23 13:00:32 +01:00
zipalign Fix print format error. 2018-08-11 11:33:43 -07:00
ziptime Use -Werror in build/make 2017-10-03 13:53:13 -07:00
Android.mk Remove the need to find Android.mk files via directory symlinks 2017-08-07 14:21:20 -07:00
OWNERS Use multiple globs/emails in per-file syntax 2018-08-20 14:16:04 -07:00
auto_gen_test_config.py Default test to AndroidJUnitTest for auto-generated test config. 2018-02-21 11:31:06 -08:00
auto_gen_test_config_test.py Default test to AndroidJUnitTest for auto-generated test config. 2018-02-21 11:31:06 -08:00
brillo-clang-format Include Brillo's cannonical .clang-format file. 2016-02-16 14:29:45 -08:00
buildinfo.sh Add PLATFORM_MIN_SUPPORTED_TARGET_SDK_VERSION 2017-12-11 10:45:45 +00:00
buildinfo_common.sh Standardize parition build props. 2018-08-27 22:37:15 +01:00
check_builds.sh Replace build/tools with build/make/tools 2017-12-06 16:12:40 -08:00
check_link_type.py Fix link_type checking 2016-09-15 14:40:39 -07:00
check_radio_versions.py
checkowners.py Use multiple globs/emails in per-file syntax 2018-08-20 14:16:04 -07:00
compare_fileslist.py
dump-package-stats Ignore zip comments in dump-package-stats 2017-10-03 18:57:18 -07:00
event_log_tags.py
fat16copy.py fat16copy: Allow to copy files to an existing directory. 2017-02-13 16:00:07 +00:00
fileslist_util.py build: tools: Add json collection of installed files with hashes. 2016-10-20 10:07:13 -07:00
filter-product-graph.py
findleaves.py findleaves: Fix typo for --dir argument 2018-08-16 02:30:45 +02:00
fixlinebreaks.sh
generate-enforce-rro-android-manifest.py Enforce RROs for all the build-time ROs 2017-03-30 10:43:38 +09:00
generate-notice-files.py Include /product_services software in NOTICE. 2018-08-28 18:06:39 +01:00
java-event-log-tags.py Allow converting logtags to java without merged logtags file 2017-11-16 14:58:05 -08:00
java-layers.py
merge-event-log-tags.py
mktarball.sh
normalize_path.py
parsedeps.py
post_process_props.py Merge "Allow ro. properties to have arbitrary lengths" 2017-10-17 22:42:04 +00:00
print_module_licenses.sh
product_debug.py
soong_to_convert.py Add java modules to soong_to_convert.txt 2017-12-06 15:38:52 -08:00
uuidgen.py Build image for super partition 2018-07-27 13:45:43 -07:00
warn.py Recognize -Wimplicit-fallthrough. 2018-08-31 16:19:19 -07:00