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:48 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-19 08:56:51 +0100
commit00c2c0be5ead435601a21a676401674b7045f6f0 (patch)
tree32295fe980f44dfae3353ed7bf58691aee356ecb /bitbake/lib/toaster/toastergui/views.py
parentf39ae146eadf92f650ed6340158e780a65d483b1 (diff)
downloadpoky-00c2c0be5ead435601a21a676401674b7045f6f0.tar.gz
bitbake: toaster: improve scan for SDK artifacts
SDK artifacts were previously picked up by toaster.bbclass and notified to buildinfohelper (via toasterui). The artifacts were then added to the Build object, so that it wasn't clear which artifact went with which target; we were also unable to attach SDK artifacts to a Build if they had already been attached to a previous build. Now, toaster.bbclass just notifies the TOOLCHAIN_OUTPUTNAME when a populate_sdk* target completes. The scan is moved to buildinfohelper, where we search the SDK deploy directory for files matching TOOLCHAIN_OUTPUTNAME and attach them to targets (not builds). If an SDK file is not produced by a target, we now look for a similar, previously-run target which did produce artifacts. If there is one, we clone the SDK artifacts from that target onto the current one. This all means that we can show SDK artifacts by target, and should always get artifacts associated with a target, regardless of whether it really build them. This requires an additional model, TargetSDKFile, which tracks the size and path of SDK artifact files with respect to Target objects. [YOCTO #8556] (Bitbake rev: 5e650c611605507e1e0d1588cd5eb6535c2d34fc) 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.py19
1 files changed, 12 insertions, 7 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py
index 0ec88d9a77..a82a261e0d 100755
--- a/bitbake/lib/toaster/toastergui/views.py
+++ b/bitbake/lib/toaster/toastergui/views.py
@@ -30,8 +30,8 @@ from django.db import IntegrityError, Error
30from django.shortcuts import render, redirect, get_object_or_404 30from 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, CustomImagePackage
34from orm.models import TargetArtifactFile 34from orm.models import TargetKernelFile, TargetSDKFile
35from orm.models import BitbakeVersion, CustomImageRecipe 35from orm.models import BitbakeVersion, CustomImageRecipe
36from bldcontrol import bbcontroller 36from bldcontrol import bbcontroller
37from django.views.decorators.cache import cache_control 37from django.views.decorators.cache import cache_control
@@ -510,7 +510,11 @@ def builddashboard( request, build_id ):
510 targetHasNoImages = True 510 targetHasNoImages = True
511 elem[ 'imageFiles' ] = imageFiles 511 elem[ 'imageFiles' ] = imageFiles
512 elem[ 'targetHasNoImages' ] = targetHasNoImages 512 elem[ 'targetHasNoImages' ] = targetHasNoImages
513 elem['target_artifacts'] = t.targetartifactfile_set.all() 513 elem['target_kernel_artifacts'] = t.targetkernelfile_set.all()
514
515 target_sdk_files = t.targetsdkfile_set.all()
516 elem['target_sdk_artifacts_count'] = target_sdk_files.count()
517 elem['target_sdk_artifacts'] = target_sdk_files
514 518
515 targets.append( elem ) 519 targets.append( elem )
516 520
@@ -2294,11 +2298,12 @@ if True:
2294 elif artifact_type == "imagefile": 2298 elif artifact_type == "imagefile":
2295 file_name = Target_Image_File.objects.get(target__build = build, pk = artifact_id).file_name 2299 file_name = Target_Image_File.objects.get(target__build = build, pk = artifact_id).file_name
2296 2300
2297 elif artifact_type == "buildartifact": 2301 elif artifact_type == "targetkernelartifact":
2298 file_name = BuildArtifact.objects.get(build = build, pk = artifact_id).file_name 2302 target = TargetKernelFile.objects.get(pk=artifact_id)
2303 file_name = target.file_name
2299 2304
2300 elif artifact_type == "targetartifactfile": 2305 elif artifact_type == "targetsdkartifact":
2301 target = TargetArtifactFile.objects.get(pk=artifact_id) 2306 target = TargetSDKFile.objects.get(pk=artifact_id)
2302 file_name = target.file_name 2307 file_name = target.file_name
2303 2308
2304 elif artifact_type == "licensemanifest": 2309 elif artifact_type == "licensemanifest":