[elbe-devel] [PATCH 08/12] soapclient: make wait_busy check for build success and exit if not

Torben Hohn torben.hohn at linutronix.de
Thu Sep 26 15:33:28 CEST 2019


wait_busy would treat a build failure identical to a success. If
the build was not busy anymore, it would return success.

After the build is not busy anymore, use the newly added get_project()
method on the soap interface, to actually check the status, and return
an error code, upon failure.

Signed-off-by: Torben Hohn <torben.hohn at linutronix.de>
---
 elbepack/soapclient.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index edcffe763..fa5627626 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -607,6 +607,15 @@ class WaitProjectBusyAction(ClientAction):
 
             print(msg)
 
+        # exited the while loop -> the project is not busy anymore,
+        # check, whether everything is ok.
+
+        prj = client.service.get_project(builddir)
+        if prj.status != "build_done":
+            print("Project build was not successful, current status: "
+                  "%s" % prj.status, file=sys.stderr)
+            sys.exit(10)
+
 ClientAction.register(WaitProjectBusyAction)
 
 
-- 
2.20.1




More information about the elbe-devel mailing list