summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/toastergui/views.py
diff options
context:
space:
mode:
authorElliot Smith <elliot.smith@intel.com>2016-07-12 15:54:46 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-19 08:56:51 +0100
commit4125da7763ffc70cc77578c677bb7e5fc7ebaf57 (patch)
tree3c303f0070365d73217950b96ef234cfe9bcc022 /bitbake/lib/toaster/toastergui/views.py
parente9808576daad137695bdedd0883ee0a35b7d870a (diff)
downloadpoky-4125da7763ffc70cc77578c677bb7e5fc7ebaf57.tar.gz
bitbake: toaster: attach kernel artifacts to targets
The bzImage and modules files were previously attached to a build, rather than to the target which produced them. This meant it was not possible to determine which kernel artifact produced by a build came from which target; which in turn made it difficult to associate existing kernel artifact with targets when those targets didn't produce artifacts (e.g. if the same machine + target combination was built again and didn't produce a bzImage or modules file because those files already existed). By associating kernel artifacts with the target (via a new TargetArtifactFile model), we make it possible to find all the artifacts for a given machine + target combination. Then, in cases where a build is completed but its targets don't produce any artifacts, we can find a previous Target object with the same machine + target and copy its artifacts to the targets for a just-completed build. Note that this doesn't cover SDK artifacts yet, which are still retrieved in toaster.bbclass and show up as "Other artifacts", lumped together for the whole build rather than by target. [YOCTO #8556] (Bitbake rev: 9b151416e428c2565a27d89116439f9a8d578e3d) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: bavery <brian.avery@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
-rwxr-xr-xbitbake/lib/toaster/toastergui/views.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index ad85fafb4d..0ec88d9a77 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -31,6 +31,7 @@ from django.shortcuts import render, redirect, get_object_or_404
31from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, LogMessage, Variable 31from orm.models import Build, Target, Task, Layer, Layer_Version, Recipe, LogMessage, Variable
32from orm.models import Task_Dependency, Recipe_Dependency, Package, Package_File, Package_Dependency 32from orm.models import Task_Dependency, Recipe_Dependency, Package, Package_File, Package_Dependency
33from orm.models import Target_Installed_Package, Target_File, Target_Image_File, BuildArtifact, CustomImagePackage 33from orm.models import Target_Installed_Package, Target_File, Target_Image_File, BuildArtifact, CustomImagePackage
34from orm.models import TargetArtifactFile
34from orm.models import BitbakeVersion, CustomImageRecipe 35from orm.models import BitbakeVersion, CustomImageRecipe
35from bldcontrol import bbcontroller 36from bldcontrol import bbcontroller
36from django.views.decorators.cache import cache_control 37from django.views.decorators.cache import cache_control
@@ -509,6 +510,8 @@ def builddashboard( request, build_id ):
509 targetHasNoImages = True 510 targetHasNoImages = True
510 elem[ 'imageFiles' ] = imageFiles 511 elem[ 'imageFiles' ] = imageFiles
511 elem[ 'targetHasNoImages' ] = targetHasNoImages 512 elem[ 'targetHasNoImages' ] = targetHasNoImages
513 elem['target_artifacts'] = t.targetartifactfile_set.all()
514
512 targets.append( elem ) 515 targets.append( elem )
513 516
514 ## 517 ##
@@ -2294,6 +2297,10 @@ if True:
2294 elif artifact_type == "buildartifact": 2297 elif artifact_type == "buildartifact":
2295 file_name = BuildArtifact.objects.get(build = build, pk = artifact_id).file_name 2298 file_name = BuildArtifact.objects.get(build = build, pk = artifact_id).file_name
2296 2299
2300 elif artifact_type == "targetartifactfile":
2301 target = TargetArtifactFile.objects.get(pk=artifact_id)
2302 file_name = target.file_name
2303
2297 elif artifact_type == "licensemanifest": 2304 elif artifact_type == "licensemanifest":
2298 file_name = Target.objects.get(build = build, pk = artifact_id).license_manifest_path 2305 file_name = Target.objects.get(build = build, pk = artifact_id).license_manifest_path
2299 2306