summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/orm/migrations
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/orm/migrations
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/orm/migrations')
-rw-r--r--bitbake/lib/toaster/orm/migrations/0008_refactor_artifact_models.py39
-rw-r--r--bitbake/lib/toaster/orm/migrations/0008_targetartifactfile.py23
2 files changed, 39 insertions, 23 deletions
diff --git a/bitbake/lib/toaster/orm/migrations/0008_refactor_artifact_models.py b/bitbake/lib/toaster/orm/migrations/0008_refactor_artifact_models.py
new file mode 100644
index 0000000000..3367582a81
--- /dev/null
+++ b/bitbake/lib/toaster/orm/migrations/0008_refactor_artifact_models.py
@@ -0,0 +1,39 @@
1# -*- coding: utf-8 -*-
2from __future__ import unicode_literals
3
4from django.db import migrations, models
5
6
7class Migration(migrations.Migration):
8
9 dependencies = [
10 ('orm', '0007_auto_20160523_1446'),
11 ]
12
13 operations = [
14 migrations.CreateModel(
15 name='TargetKernelFile',
16 fields=[
17 ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)),
18 ('file_name', models.FilePathField()),
19 ('file_size', models.IntegerField()),
20 ('target', models.ForeignKey(to='orm.Target')),
21 ],
22 ),
23 migrations.CreateModel(
24 name='TargetSDKFile',
25 fields=[
26 ('id', models.AutoField(auto_created=True, primary_key=True, verbose_name='ID', serialize=False)),
27 ('file_name', models.FilePathField()),
28 ('file_size', models.IntegerField()),
29 ('target', models.ForeignKey(to='orm.Target')),
30 ],
31 ),
32 migrations.RemoveField(
33 model_name='buildartifact',
34 name='build',
35 ),
36 migrations.DeleteModel(
37 name='BuildArtifact',
38 ),
39 ]
diff --git a/bitbake/lib/toaster/orm/migrations/0008_targetartifactfile.py b/bitbake/lib/toaster/orm/migrations/0008_targetartifactfile.py
deleted file mode 100644
index 9f1d9bf4ec..0000000000
--- a/bitbake/lib/toaster/orm/migrations/0008_targetartifactfile.py
+++ /dev/null
@@ -1,23 +0,0 @@
1# -*- coding: utf-8 -*-
2from __future__ import unicode_literals
3
4from django.db import migrations, models
5
6
7class Migration(migrations.Migration):
8
9 dependencies = [
10 ('orm', '0007_auto_20160523_1446'),
11 ]
12
13 operations = [
14 migrations.CreateModel(
15 name='TargetArtifactFile',
16 fields=[
17 ('id', models.AutoField(primary_key=True, serialize=False, auto_created=True, verbose_name='ID')),
18 ('file_name', models.FilePathField()),
19 ('file_size', models.IntegerField()),
20 ('target', models.ForeignKey(to='orm.Target')),
21 ],
22 ),
23 ]