diff options
author | Charles Baylis <charles.baylis@linaro.org> | 2016-04-28 16:05:29 +0100 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2016-05-16 10:44:11 +0000 |
commit | 297bd05ca3e3282de306b79c4a4d9a7be16ac126 (patch) | |
tree | 716202f9a10b7a394043656eea6cd3707b1a3e1b /lib/globals.sh | |
parent | c8cdeb4ced9d6c6eaa496cbcfac37b2db7c23b44 (diff) |
Add error handling for component_init.
The component_init function can return errors, but they are not propagated
at the call sites.
Also move build_failure, build_success and test_success to common.sh so that
they are available earlier in abe.sh.
Change-Id: Idc9b2e59a2a3bdbffaf53598b1eb0cd36201871b
Diffstat (limited to 'lib/globals.sh')
-rw-r--r-- | lib/globals.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/globals.sh b/lib/globals.sh index 2d4eaace..53bd9a42 100644 --- a/lib/globals.sh +++ b/lib/globals.sh @@ -216,6 +216,12 @@ import_manifest() esac component_init $i ${branch:+BRANCH=${branch}} ${revision:+REVISION=${revision}} ${url:+URL=${url}} ${filespec:+FILESPEC=${filespec}} ${srcdir:+SRCDIR=${srcdir}} ${builddir:+BUILDDIR=${builddir}} ${stage1_flags:+STAGE1=\"${stage1_flags}\"} ${stage2_flags:+STAGE2=\"${stage2_flags}\"} ${configure:+CONFIGURE=\"${configure}\"} ${makeflags:+MAKEFLAGS=\"${makeflags}\"} ${static:+STATICLINK=${static}} + if [ $? -ne 0 ]; then + error "component_init failed while parsing manifest" + build_failure + return 1 + fi + unset stage1_flags unset stage2_flags unset url |