mirror of
https://git.yoctoproject.org/poky
synced 2026-06-03 01:40:07 +00:00
bitbake: toaster: show progress of recipe parsing in recent builds area
Modify buildinfohelper and toasterui so that they record the recipe parse progress (from ParseProgress events in bitbake) on the Build object. Note that because the Build object is now created at the point when ParseStarted occurs, it is necessary to set the build name to the empty string initially (hence the migration). The build name can be set when the build properly starts, i.e. at the BuildStarted event. Then use this additional data to determine whether a Build is in a "Parsing" state, and report this in the JSON API. This enables the most recent builds area to show the recipe parse progress. Add additional logic to update the progress bar if the progress for a build object changes. [YOCTO #9631] (Bitbake rev: f33d51d46d70e73e04e325807c1bc4eb68462f7b) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
952ffb3e1f
commit
dd99cf957d
@@ -87,7 +87,7 @@ class XhrBuildRequest(View):
|
||||
br.save()
|
||||
|
||||
except BuildRequest.DoesNotExist:
|
||||
return error_response('No such build id %s' % i)
|
||||
return error_response('No such build request id %s' % i)
|
||||
|
||||
return error_response('ok')
|
||||
|
||||
@@ -256,6 +256,14 @@ class MostRecentBuildsView(View):
|
||||
build['id'] = build_obj.pk
|
||||
build['dashboard_url'] = dashboard_url
|
||||
|
||||
buildrequest_id = None
|
||||
if hasattr(build_obj, 'buildrequest'):
|
||||
buildrequest_id = build_obj.buildrequest.pk
|
||||
build['buildrequest_id'] = buildrequest_id
|
||||
|
||||
build['recipes_parsed_percentage'] = \
|
||||
int((build_obj.recipes_parsed / build_obj.recipes_to_parse) * 100)
|
||||
|
||||
tasks_complete_percentage = 0
|
||||
if build_obj.outcome in (Build.SUCCEEDED, Build.FAILED):
|
||||
tasks_complete_percentage = 100
|
||||
|
||||
Reference in New Issue
Block a user