aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-05-31 11:08:39 +0000
committerGerrit Code Review <review@openstack.org>2016-05-31 11:08:39 +0000
commitd860c7d4ba972fcb4ad49a4a76181833663173a4 (patch)
tree239e598f6f753565a4c247744b900ddd94886c43
parent9bd4058bb67f5bb0b8c61aea6a9b8773a39a49fb (diff)
parent18ae114e7557ecc0a5692ea3a22b418df7bba52f (diff)
downloadkolla-d860c7d4ba972fcb4ad49a4a76181833663173a4.tar.gz
kolla-d860c7d4ba972fcb4ad49a4a76181833663173a4.zip
Merge "Fix kolla-build return codes"
-rwxr-xr-xkolla/cmd/build.py10
-rw-r--r--tests/test_build.py2
2 files changed, 10 insertions, 2 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py
index bbd9788ad..18ff68503 100755
--- a/kolla/cmd/build.py
+++ b/kolla/cmd/build.py
@@ -737,7 +737,7 @@ class KollaWorker(object):
return queue
-def main():
+def run_build():
conf = cfg.ConfigOpts()
common_config.parse(conf, sys.argv[1:], prog='kolla-build')
@@ -791,5 +791,13 @@ def main():
return kolla.get_image_statuses()
+def main():
+ bad_results, good_results, unmatched_results = run_build()
+ if len(bad_results):
+ return 1
+ else:
+ return 0
+
+
if __name__ == '__main__':
main()
diff --git a/tests/test_build.py b/tests/test_build.py
index 521f26c16..f2e802bf6 100644
--- a/tests/test_build.py
+++ b/tests/test_build.py
@@ -43,7 +43,7 @@ class BuildTest(object):
def runTest(self):
with patch.object(sys, 'argv', self.build_args):
LOG.info("Running with args %s", self.build_args)
- bad_results, good_results, unmatched_results = build.main()
+ bad_results, good_results, unmatched_results = build.run_build()
failures = 0
for image, result in six.iteritems(bad_results):