From 18ae114e7557ecc0a5692ea3a22b418df7bba52f Mon Sep 17 00:00:00 2001 From: Will Miller Date: Wed, 25 May 2016 04:04:52 -0500 Subject: Fix kolla-build return codes Add a main wrapper function to return 1 if any images failed to build; otherwise, return 0. Rename the old main() to run_build(), which still returns image statuses, to avoid interfering with unit tests. Change-Id: I5817cc9cebb4f42dc13e0535223e5dc8931a3aab Co-Authored-By: Mark Goddard Closes-Bug: #1578404 --- tests/test_build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/test_build.py b/tests/test_build.py index f24e6a9fc..64c92dea8 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): -- cgit v1.2.3