mysql migrations and unittests fixes
cover mysql migrations and unittests fixes
This series contains a clean up of the database migrations to fix the issue that was preventing Toaster from starting up when using mysql backend. See https://bugzilla.yoctoproject.org/show_bug.cgi?id=9116
After fixing these migrations and getting Toaster to start up properly using mysql backend a number of unittests failed due to differences in testing on sqlite.
To remove these differences I've changed the data that was in the setUp to be more agnostic and added .lower() where needed to make sure the orderby re-ordering in the same way. I also took this opportunitiy to convert the toastergui unit tests to use a django fixture making it easier to load the database state for testing.
Bugs fixed discovered by fixing the unit tests are:
- toaster: SoftwareRecipesTable apply default order_by
- toaster: toastergui Fix invalid char test and implementation
and one already reported
- toaster: PackagesTable show only installed packages
[note files deleted and added in this series]
Michael Wood (5):
toaster: orm migrations Sort out migrations mess
toaster: SoftwareRecipesTable apply default order_by
toaster: toastergui unit tests convert to use fixtures
toaster: PackagesTable show only installed packages
toaster: toastergui Fix invalid char test and implementation
bitbake/lib/toaster/orm/migrations/0001_initial.py | 26 -- .../orm/migrations/0002_auto_20151210_1209.py | 41 -- .../orm/migrations/0002_auto_20151223_1528.py | 27 -- .../orm/migrations/0002_customimagerecipe.py | 24 ++ .../orm/migrations/0003_customimagepackage.py | 2 +- bitbake/lib/toaster/orm/migrations/0004_merge.py | 15 - .../lib/toaster/orm/migrations/0004_provides.py | 27 ++ .../orm/migrations/0005_auto_20160118_1055.py | 19 - .../0006_customimagerecipe_last_updated.py | 19 - .../fixtures/toastergui-unittest-data.xml | 446 +++++++++++++++++++++ bitbake/lib/toaster/toastergui/tables.py | 5 +- bitbake/lib/toaster/toastergui/tests.py | 257 ++---------- bitbake/lib/toaster/toastergui/views.py | 7 +- 13 files changed, 550 insertions(+), 365 deletions(-) delete mode 100644 bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.py delete mode 100644 bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.py create mode 100644 bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py delete mode 100644 bitbake/lib/toaster/orm/migrations/0004_merge.py create mode 100644 bitbake/lib/toaster/orm/migrations/0004_provides.py delete mode 100644 bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.py delete mode 100644 bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py create mode 100644 bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml
Signature · 1 line
2.5.0
PATCH 1/5 toaster: orm migrations Sort out migrations mess
We messed up the migrations by squashing some of the image customisation model definitions into the initial migration which has meant some irreversible operations on mysql took place. This deletes, re-orders and fixes the migrations.
If your schema is up to date you may want to use ./manage migrate with --fake or --fake-initial to avoid re-applying migrations.
[YOCTO #9116]
--- bitbake/lib/toaster/orm/migrations/0001_initial.py | 26 -------------- .../orm/migrations/0002_auto_20151210_1209.py | 41 ---------------------- .../orm/migrations/0002_auto_20151223_1528.py | 27 -------------- .../orm/migrations/0002_customimagerecipe.py | 24 +++++++++++++ .../orm/migrations/0003_customimagepackage.py | 2 +- bitbake/lib/toaster/orm/migrations/0004_merge.py | 15 -------- .../lib/toaster/orm/migrations/0004_provides.py | 27 ++++++++++++++ .../orm/migrations/0005_auto_20160118_1055.py | 19 ---------- .../0006_customimagerecipe_last_updated.py | 19 ---------- 9 files changed, 52 insertions(+), 148 deletions(-) delete mode 100644 bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.py delete mode 100644 bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.py create mode 100644 bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py delete mode 100644 bitbake/lib/toaster/orm/migrations/0004_merge.py create mode 100644 bitbake/lib/toaster/orm/migrations/0004_provides.py delete mode 100644 bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.py delete mode 100644 bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py
bitbake/lib/toaster/orm/migrations/0001_initial.py +0 -26
@@ -58,13 +58,6 @@ class Migration(migrations.Migration): ], ), migrations.CreateModel( - name='CustomImageRecipe', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('name', models.CharField(max_length=100)), - ], - ), - migrations.CreateModel( name='HelpText', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
@@ -436,21 +429,6 @@ class Migration(migrations.Migration): field=models.ForeignKey(default=None, to='orm.LayerSource', null=True), ), migrations.AddField( - model_name='customimagerecipe', - name='base_recipe', - field=models.ForeignKey(to='orm.Recipe'), - ), - migrations.AddField( - model_name='customimagerecipe', - name='packages', - field=models.ManyToManyField(to='orm.Package'), - ), - migrations.AddField( - model_name='customimagerecipe', - name='project', - field=models.ForeignKey(to='orm.Project'), - ), - migrations.AddField( model_name='build', name='project', field=models.ForeignKey(to='orm.Project'),
@@ -520,10 +498,6 @@ class Migration(migrations.Migration): unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]), ), migrations.AlterUniqueTogether( - name='customimagerecipe', - unique_together=set([('name', 'project')]), - ), - migrations.AlterUniqueTogether( name='branch', unique_together=set([('layer_source', 'up_id'), ('layer_source', 'name')]), ),
bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.py deleted +0 -41
41 lines not on this page · raw message
bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.py deleted +0 -27
@@ -1,27 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('orm', '0001_initial'), - ] - - operations = [ - migrations.CreateModel( - name='Provides', - fields=[ - ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), - ('name', models.CharField(max_length=100)), - ('recipe', models.ForeignKey(to='orm.Recipe')), - ], - ), - migrations.AddField( - model_name='recipe_dependency', - name='via', - field=models.ForeignKey(null=True, default=None, to='orm.Provides'), - ), - ]
bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.py new file +24 -0
@@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('orm', '0001_initial'), + ] + + operations = [ + migrations.CreateModel( + name='CustomImageRecipe', + fields=[ + ('recipe_ptr', models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe')), + ('last_updated', models.DateTimeField(default=None, null=True)), + ('base_recipe', models.ForeignKey(related_name='based_on_recipe', to='orm.Recipe')), + ('project', models.ForeignKey(to='orm.Project')), + ], + bases=('orm.recipe',), + ), + ]
bitbake/lib/toaster/orm/migrations/0003_customimagepackage.py +1 -1
@@ -7,7 +7,7 @@ from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ - ('orm', '0002_auto_20151210_1209'), + ('orm', '0002_customimagerecipe'), ] operations = [
bitbake/lib/toaster/orm/migrations/0004_merge.py deleted +0 -15
@@ -1,15 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('orm', '0002_auto_20151223_1528'), - ('orm', '0003_customimagepackage'), - ] - - operations = [ - ]
bitbake/lib/toaster/orm/migrations/0004_provides.py new file +27 -0
@@ -0,0 +1,27 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('orm', '0003_customimagepackage'), + ] + + operations = [ + migrations.CreateModel( + name='Provides', + fields=[ + ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), + ('name', models.CharField(max_length=100)), + ('recipe', models.ForeignKey(to='orm.Recipe')), + ], + ), + migrations.AddField( + model_name='recipe_dependency', + name='via', + field=models.ForeignKey(null=True, default=None, to='orm.Provides'), + ), + ]
bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.py deleted +0 -19
@@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('orm', '0004_merge'), - ] - - operations = [ - migrations.AlterField( - model_name='customimagerecipe', - name='recipe_ptr', - field=models.OneToOneField(parent_link=True, auto_created=True, primary_key=True, serialize=False, to='orm.Recipe'), - ), - ]
bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.py deleted +0 -19
@@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('orm', '0005_auto_20160118_1055'), - ] - - operations = [ - migrations.AddField( - model_name='customimagerecipe', - name='last_updated', - field=models.DateTimeField(default=None, null=True), - ), - ]
Signature · 1 line
2.5.0
PATCH 2/5 toaster: SoftwareRecipesTable apply default order_by
In reply to Michael WoodMake sure the default orderby for the SoftwareRecipesTable is applied
--- bitbake/lib/toaster/toastergui/tables.py | 1 + 1 file changed, 1 insertion(+)
bitbake/lib/toaster/toastergui/tables.py +1 -0
@@ -617,6 +617,7 @@ class SoftwareRecipesTable(RecipesTable): super(SoftwareRecipesTable, self).setup_queryset(*args, **kwargs) self.queryset = self.queryset.filter(is_image=False) + self.queryset = self.queryset.order_by(self.default_orderby) def setup_columns(self, *args, **kwargs):
Signature · 1 line
2.5.0
PATCH 3/5 toaster: toastergui unit tests convert to use fixtures
In reply to Michael WoodInstead of having to manually write up in the setUp function all the different objects to create in the database, just specifiy them in a fixture and load it. This has the advantage that it can be used on a live server by using the ./manage.py loaddata command and can then be inspected.
--- .../fixtures/toastergui-unittest-data.xml | 446 +++++++++++++++++++++ bitbake/lib/toaster/toastergui/tests.py | 255 ++---------- 2 files changed, 488 insertions(+), 213 deletions(-) create mode 100644 bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml
bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xml new file +446 -0
@@ -0,0 +1,446 @@ +<?xml version="1.0" encoding="utf-8"?> +<django-objects version="1.0"> + <object pk="1" model="orm.project"> + <field type="CharField" name="name">a test project</field> + <field type="CharField" name="short_description"></field> + <field to="orm.bitbakeversion" name="bitbake_version" rel="ManyToOneRel">1</field> + <field to="orm.release" name="release" rel="ManyToOneRel">1</field> + <field type="DateTimeField" name="created">2016-02-15T18:46:20.098248+00:00</field> + <field type="DateTimeField" name="updated">2016-02-15T18:46:20.098392+00:00</field> + <field type="IntegerField" name="user_id"><None></None></field> + <field type="BooleanField" name="is_default">False</field> + </object> + <object pk="2" model="orm.project"> + <field type="CharField" name="name">z test project</field> + <field type="CharField" name="short_description"></field> + <field to="orm.bitbakeversion" name="bitbake_version" rel="ManyToOneRel">1</field> + <field to="orm.release" name="release" rel="ManyToOneRel">2</field> + <field type="DateTimeField" name="created">2016-02-15T18:46:20.107936+00:00</field> + <field type="DateTimeField" name="updated">2016-02-15T18:46:20.108066+00:00</field> + <field type="IntegerField" name="user_id"><None></None></field> + <field type="BooleanField" name="is_default">False</field> + </object> + <object pk="1" model="orm.ProjectVariable"> + <field to="orm.project" name="project" rel="ManyToOneRel">1</field> + <field type="CharField" name="name">machine</field> + <field type="TextField" name="value">qemux86</field> + </object> + <object pk="2" model="orm.ProjectVariable"> + <field to="orm.project" name="project" rel="ManyToOneRel">2</field> + <field type="CharField" name="name">machine</field> + <field type="TextField" name="value">qemux86</field> + </object> + <object pk="1" model="orm.build"> + <field to="orm.project" name="project" rel="ManyToOneRel">1</field> + <field type="CharField" name="machine">x12</field> + <field type="CharField" name="distro"></field> + <field type="CharField" name="distro_version"></field> + <field type="DateTimeField" name="started_on">2016-02-14T18:46:20.114530+00:00</field> + <field type="DateTimeField" name="completed_on">2016-02-14T18:46:20.114530+00:00</field> + <field type="IntegerField" name="outcome">0</field> + <field type="CharField" name="cooker_log_path"></field> + <field type="CharField" name="build_name">a</field> + <field type="CharField" name="bitbake_version"></field> + </object> + <object pk="2" model="orm.build"> + <field to="orm.project" name="project" rel="ManyToOneRel">1</field> + <field type="CharField" name="machine">raspberrypi2</field> + <field type="CharField" name="distro"></field> + <field type="CharField" name="distro_version"></field> + <field type="DateTimeField" name="started_on">2016-02-13T18:46:20.114530+00:00</field> + <field type="DateTimeField" name="completed_on">2016-02-13T18:46:20.114530+00:00</field> + <field type="IntegerField" name="outcome">0</field> + <field type="CharField" name="cooker_log_path"></field> + <field type="CharField" name="build_name">b</field> + <field type="CharField" name="bitbake_version"></field> + </object> + <object pk="3" model="orm.build"> + <field to="orm.project" name="project" rel="ManyToOneRel">1</field> + <field type="CharField" name="machine">qemux86</field> + <field type="CharField" name="distro"></field> + <field type="CharField" name="distro_version"></field> + <field type="DateTimeField" name="started_on">2016-02-12T18:46:20.114530+00:00</field> + <field type="DateTimeField" name="completed_on">2016-02-12T18:46:20.114530+00:00</field> + <field type="IntegerField" name="outcome">1</field> + <field type="CharField" name="cooker_log_path"></field> + <field type="CharField" name="build_name">c</field> + <field type="CharField" name="bitbake_version"></field> + </object> + <object pk="4" model="orm.build"> + <field to="orm.project" name="project" rel="ManyToOneRel">2</field> + <field type="CharField" name="machine">qemux86</field> + <field type="CharField" name="distro"></field> + <field type="CharField" name="distro_version"></field> + <field type="DateTimeField" name="started_on">2016-02-11T18:46:20.114530+00:00</field> + <field type="DateTimeField" name="completed_on">2016-02-11T18:46:20.114530+00:00</field> + <field type="IntegerField" name="outcome">0</field> + <field type="CharField" name="cooker_log_path"></field> + <field type="CharField" name="build_name">d</field> + <field type="CharField" name="bitbake_version"></field> + </object> + <object pk="1" model="orm.target"> + <field to="orm.build" name="build" rel="ManyToOneRel">1</field> + <field type="CharField" name="target">a image recipe</field> + <field type="CharField" name="task"><None></None></field> + <field type="BooleanField" name="is_image">False</field> + <field type="IntegerField" name="image_size">0</field> + <field type="CharField" name="license_manifest_path"><None></None></field> + </object> + <object pk="2" model="orm.target"> + <field to="orm.build" name="build" rel="ManyToOneRel">2</field> + <field type="CharField" name="target">z something</field> + <field type="CharField" name="task"><None></None></field> + <field type="BooleanField" name="is_image">False</field> + <field type="IntegerField" name="image_size">0</field> + <field type="CharField" name="license_manifest_path"><None></None></field> + </object> + <object pk="3" model="orm.target"> + <field to="orm.build" name="build" rel="ManyToOneRel">3</field> + <field type="CharField" name="target">h recipe</field> + <field type="CharField" name="task"><None></None></field> + <field type="BooleanField" name="is_image">False</field> + <field type="IntegerField" name="image_size">0</field> + <field type="CharField" name="license_manifest_path"><None></None></field> + </object> + <object pk="1" model="orm.package"> + <field to="orm.build" name="build" rel="ManyToOneRel">1</field> + <field to="orm.recipe" name="recipe" rel="ManyToOneRel">2</field> + <field type="CharField" name="name">b pkg</field> + <field type="CharField" name="installed_name"></field> + <field type="CharField" name="version"></field> + <field type="CharField" name="revision"></field> + <field type="TextField" name="summary"></field> + <field type="TextField" name="description"></field> + <field type="IntegerField" name="size">777</field> + <field type="IntegerField" name="installed_size">0</field> + <field type="CharField" name="section"></field> + <field type="CharField" name="license">a license</field> + </object> + <object pk="2" model="orm.package"> + <field to="orm.build" name="build" rel="ManyToOneRel">1</field> + <field to="orm.recipe" name="recipe" rel="ManyToOneRel">2</field> + <field type="CharField" name="name">f pkg</field> + <field type="CharField" name="installed_name"></field> + <field type="CharField" name="version"></field> + <field type="CharField" name="revision"></field> + <field type="TextField" name="summary"></field> + <field type="TextField" name="description"></field> + <field type="IntegerField" name="size">4</field> + <field type="IntegerField" name="installed_size">10</field> + <field type="CharField" name="section"></field> + <field type="CharField" name="license">z license</field> + </object> + <object pk="3" model="orm.package"> + <field to="orm.build" name="build" rel="ManyToOneRel"><None></None></field> + <field to="orm.recipe" name="recipe" rel="ManyToOneRel">1</field> + <field type="CharField" name="name">a custom image pkg</field> + <field type="CharField" name="installed_name"></field> + <field type="CharField" name="version"></field> + <field type="CharField" name="revision"></field> + <field type="TextField" name="summary"></field> + <field type="TextField" name="description"></field> + <field type="IntegerField" name="size">10</field> + <field type="IntegerField" name="installed_size">0</field> + <field type="CharField" name="section"></field> + <field type="CharField" name="license">h license</field> + </object> + <object pk="4" model="orm.package"> + <field to="orm.build" name="build" rel="ManyToOneRel"><None></None></field> + <field to="orm.recipe" name="recipe" rel="ManyToOneRel">2</field> + <field type="CharField" name="name">z custom image pkg</field> + <field type="CharField" name="installed_name"></field> + <field type="CharField" name="version"></field> + <field type="CharField" name="revision"></field> + <field type="TextField" name="summary"></field> + <field type="TextField" name="description"></field> + <field type="IntegerField" name="size">5</field> + <field type="IntegerField" name="installed_size">0</field> + <field type="CharField" name="section"></field> + <field type="CharField" name="license">z license</field> + </object> + <object pk="5" model="orm.package"> + <field to="orm.build" name="build" rel="ManyToOneRel">1</field> + <field to="orm.recipe" name="recipe" rel="ManyToOneRel">4</field> + <field type="CharField" name="name">a custom image pkg</field> + <field type="CharField" name="installed_name"></field> + <field type="CharField" name="version"></field> + <field type="CharField" name="revision"></field> + <field type="TextField" name="summary"></field> + <field type="TextField" name="description"></field> + <field type="IntegerField" name="size">2</field> + <field type="IntegerField" name="installed_size">0</field> + <field type="CharField" name="section"></field> + <field type="CharField" name="license">h licence</field> + </object> + <object pk="1" model="orm.target_installed_package"> + <field to="orm.target" name="target" rel="ManyToOneRel">1</field> + <field to="orm.package" name="package" rel="ManyToOneRel">1</field> + </object> + <object pk="2" model="orm.target_installed_package"> + <field to="orm.target" name="target" rel="ManyToOneRel">1</field> + <field to="orm.package" name="package" rel="ManyToOneRel">2</field> + </object> + <object pk="3" model="orm.target_installed_package"> + <field to="orm.target" name="target" rel="ManyToOneRel">1</field> + <field to="orm.package" name="package" rel="ManyToOneRel">3</field> + </object> + <!-- Note that these augment the existing orm.package of the same pk --> + <object pk="4" model="orm.customimagepackage"> + <field to="orm.customimagerecipe" name="recipe_includes" rel="ManyToManyRel"></field> + <field to="orm.customimagerecipe" name="recipe_excludes" rel="ManyToManyRel"></field> + <field to="orm.customimagerecipe" name="recipe_appends" rel="ManyToManyRel"><object pk="3"></object></field> + </object> + <object pk="5" model="orm.customimagepackage"> + <field to="orm.customimagerecipe" name="recipe_includes" rel="ManyToManyRel"></field> + <field to="orm.customimagerecipe" name="recipe_excludes" rel="ManyToManyRel"></field> + <field to="orm.customimagerecipe" name="recipe_appends" rel="ManyToManyRel"><object pk="3"></object></field> + </object> + <object pk="1" model="orm.recipe"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field type="CharField" name="name">z recipe</field> + <field type="CharField" name="version">5.2</field> + <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field> + <field type="TextField" name="summary">z recipe</field> + <field type="TextField" name="description">z recipe</field> + <field type="CharField" name="section">z section</field> + <field type="CharField" name="license">z license</field> + <field type="CharField" name="homepage"></field> + <field type="CharField" name="bugtracker"></field> + <field type="FilePathField" name="file_path"></field> + <field type="CharField" name="pathflags"></field> + <field type="BooleanField" name="is_image">False</field> + </object> + <object pk="2" model="orm.recipe"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field type="CharField" name="name">a recipe</field> + <field type="CharField" name="version">1.2</field> + <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">1</field> + <field type="TextField" name="summary">a recipe</field> + <field type="TextField" name="description">a recipe</field> + <field type="CharField" name="section">a section</field> + <field type="CharField" name="license">a license</field> + <field type="CharField" name="homepage"></field> + <field type="CharField" name="bugtracker"></field> + <field type="FilePathField" name="file_path">a_recipe.bb</field> + <field type="CharField" name="pathflags"></field> + <field type="BooleanField" name="is_image">False</field> + </object> + <object pk="3" model="orm.recipe"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field type="CharField" name="name">a custom recipe</field> + <field type="CharField" name="version"></field> + <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field> + <field type="TextField" name="summary"></field> + <field type="TextField" name="description"></field> + <field type="CharField" name="section"></field> + <field type="CharField" name="license"></field> + <field type="CharField" name="homepage"></field> + <field type="CharField" name="bugtracker"></field> + <field type="FilePathField" name="file_path">custr</field> + <field type="CharField" name="pathflags"></field> + <field type="BooleanField" name="is_image">False</field> + </object> + <object pk="4" model="orm.recipe"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field type="CharField" name="name">a image recipe</field> + <field type="CharField" name="version">1.2</field> + <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">1</field> + <field type="TextField" name="summary">one recipe</field> + <field type="TextField" name="description">recipe</field> + <field type="CharField" name="section">A</field> + <field type="CharField" name="license">A</field> + <field type="CharField" name="homepage"></field> + <field type="CharField" name="bugtracker"></field> + <field type="FilePathField" name="file_path">/one/</field> + <field type="CharField" name="pathflags"></field> + <field type="BooleanField" name="is_image">True</field> + </object> + <object pk="5" model="orm.recipe"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field type="CharField" name="name">z image recipe</field> + <field type="CharField" name="version">1.3</field> + <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field> + <field type="TextField" name="summary">two image recipe</field> + <field type="TextField" name="description">recipe two</field> + <field type="CharField" name="section">B</field> + <field type="CharField" name="license">Z</field> + <field type="CharField" name="homepage"></field> + <field type="CharField" name="bugtracker"></field> + <field type="FilePathField" name="file_path">/two/</field> + <field type="CharField" name="pathflags"></field> + <field type="BooleanField" name="is_image">True</field> + </object> + <object pk="6" model="orm.recipe"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field type="CharField" name="name">z custom recipe</field> + <field type="CharField" name="version"></field> + <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field> + <field type="TextField" name="summary"></field> + <field type="TextField" name="description"></field> + <field type="CharField" name="section"></field> + <field type="CharField" name="license"></field> + <field type="CharField" name="homepage"></field> + <field type="CharField" name="bugtracker"></field> + <field type="FilePathField" name="file_path">zzzz</field> + <field type="CharField" name="pathflags"></field> + <field type="BooleanField" name="is_image">False</field> + </object> + <object pk="1" model="orm.machine"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">1</field> + <field type="CharField" name="name">a machine</field> + <field type="CharField" name="description">a machine</field> + </object> + <object pk="2" model="orm.machine"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">2</field> + <field type="CharField" name="name">z machine</field> + <field type="CharField" name="description">z machine</field> + </object> + <object pk="3" model="orm.machine"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field to="orm.layer_version" name="layer_version" rel="ManyToOneRel">1</field> + <field type="CharField" name="name">g machine</field> + <field type="CharField" name="description">g machine</field> + </object> + <object pk="1" model="orm.layersource"> + <field type="CharField" name="name">local</field> + <field type="IntegerField" name="sourcetype">1</field> + <field type="CharField" name="apiurl"></field> + </object> + <object pk="1" model="orm.bitbakeversion"> + <field type="CharField" name="name">test bbv</field> + <field type="CharField" name="giturl">/tmp/</field> + <field type="CharField" name="branch">master</field> + <field type="CharField" name="dirpath"></field> + </object> + <object pk="1" model="orm.release"> + <field type="CharField" name="name">test release</field> + <field type="CharField" name="description"></field> + <field to="orm.bitbakeversion" name="bitbake_version" rel="ManyToOneRel">1</field> + <field type="CharField" name="branch_name">master</field> + <field type="TextField" name="helptext"><None></None></field> + </object> + <object pk="2" model="orm.release"> + <field type="CharField" name="name">test release 2</field> + <field type="CharField" name="description"></field> + <field to="orm.bitbakeversion" name="bitbake_version" rel="ManyToOneRel">1</field> + <field type="CharField" name="branch_name">master</field> + <field type="TextField" name="helptext"><None></None></field> + </object> + <object pk="1" model="orm.releaselayersourcepriority"> + <field to="orm.release" name="release" rel="ManyToOneRel">1</field> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field> + <field type="IntegerField" name="priority">0</field> + </object> + <object pk="1" model="orm.branch"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field type="CharField" name="name">master</field> + <field type="CharField" name="short_description"></field> + </object> + <object pk="1" model="orm.layer"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel"><None></None></field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field type="CharField" name="name">a layer</field> + <field type="CharField" name="layer_index_url"></field> + <field type="CharField" name="vcs_url">/tmp/</field> + <field type="CharField" name="vcs_web_url"><None></None></field> + <field type="CharField" name="vcs_web_tree_base_url"><None></None></field> + <field type="CharField" name="vcs_web_file_base_url"><None></None></field> + <field type="TextField" name="summary"><None></None></field> + <field type="TextField" name="description"><None></None></field> + </object> + <object pk="2" model="orm.layer"> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field type="CharField" name="name">z layer</field> + <field type="CharField" name="layer_index_url"></field> + <field type="CharField" name="vcs_url">git://two/</field> + <field type="CharField" name="vcs_web_url"><None></None></field> + <field type="CharField" name="vcs_web_tree_base_url"><None></None></field> + <field type="CharField" name="vcs_web_file_base_url"><None></None></field> + <field type="TextField" name="summary"><None></None></field> + <field type="TextField" name="description"><None></None></field> + </object> + <object pk="1" model="orm.layer_version"> + <field to="orm.build" name="build" rel="ManyToOneRel"><None></None></field> + <field to="orm.layer" name="layer" rel="ManyToOneRel">1</field> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field to="orm.branch" name="up_branch" rel="ManyToOneRel">1</field> + <field type="CharField" name="branch"></field> + <field type="CharField" name="commit">master</field> + <field type="CharField" name="dirpath">/tmp/</field> + <field type="IntegerField" name="priority">0</field> + <field type="FilePathField" name="local_path">/</field> + <field to="orm.project" name="project" rel="ManyToOneRel">1</field> + </object> + <object pk="2" model="orm.layer_version"> + <field to="orm.build" name="build" rel="ManyToOneRel"><None></None></field> + <field to="orm.layer" name="layer" rel="ManyToOneRel">2</field> + <field to="orm.layersource" name="layer_source" rel="ManyToOneRel">1</field> + <field type="IntegerField" name="up_id"><None></None></field> + <field type="DateTimeField" name="up_date"><None></None></field> + <field to="orm.branch" name="up_branch" rel="ManyToOneRel">1</field> + <field type="CharField" name="branch"></field> + <field type="CharField" name="commit">master</field> + <field type="CharField" name="dirpath"><None></None></field> + <field type="IntegerField" name="priority">0</field> + <field type="FilePathField" name="local_path">/</field> + <field to="orm.project" name="project" rel="ManyToOneRel"><None></None></field> + </object> + <object pk="1" model="orm.projectlayer"> + <field to="orm.project" name="project" rel="ManyToOneRel">1</field> + <field to="orm.layer_version" name="layercommit" rel="ManyToOneRel">1</field> + <field type="BooleanField" name="optional">True</field> + </object> + <object pk="3" model="orm.customimagerecipe"> + <field to="orm.recipe" name="base_recipe" rel="ManyToOneRel">2</field> + <field to="orm.project" name="project" rel="ManyToOneRel">1</field> + <field type="DateTimeField" name="last_updated"><None></None></field> + </object> + <object pk="6" model="orm.customimagerecipe"> + <field to="orm.recipe" name="base_recipe" rel="ManyToOneRel">4</field> + <field to="orm.project" name="project" rel="ManyToOneRel">1</field> + <field type="DateTimeField" name="last_updated"><None></None></field> + </object> + <object pk="1" model="orm.logmessage"> + <field to="orm.build" name="build" rel="ManyToOneRel">2</field> + <field to="orm.task" name="task" rel="ManyToOneRel"><None></None></field> + <field type="IntegerField" name="level">1</field> + <field type="TextField" name="message"><None></None></field> + <field type="FilePathField" name="pathname"></field> + <field type="IntegerField" name="lineno"><None></None></field> + </object> + <object pk="2" model="orm.logmessage"> + <field to="orm.build" name="build" rel="ManyToOneRel">2</field> + <field to="orm.task" name="task" rel="ManyToOneRel"><None></None></field> + <field type="IntegerField" name="level">2</field> + <field type="TextField" name="message"><None></None></field> + <field type="FilePathField" name="pathname"></field> + <field type="IntegerField" name="lineno"><None></None></field> + </object> +</django-objects>
bitbake/lib/toaster/toastergui/tests.py +42 -213
329 lines not on this page · raw message
Signature · 1 line
2.5.0
PATCH 4/5 toaster: PackagesTable show only installed packages
In reply to Michael WoodWhen showing the package list for the image recipe details only show the packages which are installed in the image rather than all the packages which are produced.
[YOCTO #9108]
--- bitbake/lib/toaster/toastergui/tables.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
bitbake/lib/toaster/toastergui/tables.py +3 -1
@@ -654,7 +654,9 @@ class PackagesTable(ToasterTable): ).last() if target: - return target.build.package_set.all() + pkgs = target.target_installed_package_set.values_list('package', + flat=True) + return Package.objects.filter(pk__in=pkgs) # Target/recipe never successfully built so empty queryset return Package.objects.none()
Signature · 1 line
2.5.0
PATCH 5/5 toaster: toastergui Fix invalid char test and implementation
In reply to Michael WoodThis test was passing but because the assertion was the wrong way round and should have expected the first one to pass and second one to fail, in reality both were failing as the method for checking the invalid char was incorrect.
--- bitbake/lib/toaster/toastergui/tests.py | 2 +- bitbake/lib/toaster/toastergui/views.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-)
bitbake/lib/toaster/toastergui/tests.py +1 -1
@@ -155,7 +155,7 @@ class ViewTests(TestCase): response = self.client.post(reverse('xhr_importlayer'), args) data = json.loads(response.content) self.assertEqual(response.status_code, 200) - self.assertNotEqual(data["error"], "ok") + self.assertEqual(data["error"], "ok") #Test to verify import of a layer successful args['name'] = "meta-oe"
bitbake/lib/toaster/toastergui/views.py +5 -2
@@ -2185,8 +2185,11 @@ if True: layers_added = []; # Rudimentary check for any possible html tags - if "<" in request.POST: - return HttpResponse(jsonfilter({"error": "Invalid character <"}), content_type = "application/json") + for val in request.POST.values(): + if "<" in val: + return HttpResponse(jsonfilter( + {"error": "Invalid character <"}), + content_type="application/json") prj = Project.objects.get(pk=request.POST['project_id'])
Signature · 1 line
2.5.0
Quoted 4 lines · On 16/02/2016 20:19, "[email protected] on behalf of Michael…
This series contains a clean up of the database migrations to fix the issue that was preventing Toaster from starting up when using mysql backend.
See https://bugzilla.yoctoproject.org/show_bug.cgi?id=9116
I tried this with a clean sqlite database. I started toaster, created a project with the master release and started a build for core-image-minimal. The build got stuck towards the end. The toaster_ui.log shows this error:
NOTE: Tasks Summary: Attempted 2103 tasks of which 2095 didn't need to be rerun and 2 failed.
NOTE: Logging error 2: {'lineno': 88, 'message': "Execution of event handler 'toaster_buildhistory_dump' failed", 'pathname':
'/home/yocto/master/bitbake/lib/bb/event.py', 'build': <Build: 1 migrations test (Release master (master), BBV master (Branch: master)) core-image-minimal>, 'level': 2}
ERROR: Execution of event handler 'toaster_buildhistory_dump' failed Traceback (most recent call last):
File
"/home/yocto/master/_toaster_clones/_git___git.yoctoproject.org_poky_master /meta/classes/toaster.bbclass", line 315, in toaster_buildhistory_dump(e=<bb.event.BuildCompleted object at 0x7fafc8a35590>):
Quoted 1 line
with open("%s/files-in-image.txt" %
installed_img_path,
"r") as fin:
for line in fin:
IOError: [Errno 2] No such file or directory:
'/home/yocto/master/build/buildhistory/images/qemux86/glibc/core-image-mini mal/files-in-image.txt'
Cheers
Belén
Quoted 63 lines
After fixing these migrations and getting Toaster to start up properly using mysql backend a number of unittests failed due to differences in testing on sqlite.
To remove these differences I've changed the data that was in the setUp to be more agnostic and added .lower() where needed to make sure the orderby re-ordering in the same way. I also took this opportunitiy to convert the toastergui unit tests to use a django fixture making it easier to load the database state for testing.Bugs fixed discovered by fixing the unit tests are:
- toaster: SoftwareRecipesTable apply defaultorder_by
- toaster: toastergui Fix invalid char test and implementation and one already reported
- toaster: PackagesTable show only installed packages[note files deleted and added in this series]
Michael Wood (5):
toaster: orm migrations Sort out migrations mess
toaster: SoftwareRecipesTable apply defaultorder_by
toaster: toastergui unit tests convert to use fixtures
toaster: PackagesTable show only installed packages
toaster: toastergui Fix invalid char test and implementationbitbake/lib/toaster/orm/migrations/0001_initial.py | 26 -- .../orm/migrations/0002_auto_20151210_1209.py | 41 -- .../orm/migrations/0002_auto_20151223_1528.py | 27 -- .../orm/migrations/0002_customimagerecipe.py | 24 ++ .../orm/migrations/0003_customimagepackage.py | 2 +- bitbake/lib/toaster/orm/migrations/0004_merge.py | 15 - .../lib/toaster/orm/migrations/0004_provides.py | 27 ++ .../orm/migrations/0005_auto_20160118_1055.py | 19 - .../0006_customimagerecipe_last_updated.py | 19 - .../fixtures/toastergui-unittest-data.xml | 446 +++++++++++++++++++++ bitbake/lib/toaster/toastergui/tables.py | 5 +- bitbake/lib/toaster/toastergui/tests.py | 257 ++---------- bitbake/lib/toaster/toastergui/views.py | 7 +- 13 files changed, 550 insertions(+), 365 deletions(-)delete mode 100644
bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.pycreate mode 100644bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0004_merge.pycreate mode 100644bitbake/lib/toaster/orm/migrations/0004_provides.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.pycreate mode 100644bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xmlSignature · 7 lines
2.5.0 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
Quoted 10 lines · Belen
Quoted 4 lines · On 16/02/2016 20:19, "[email protected] on behalf of Michael…
This series contains a clean up of the database migrations to fix the issue that was preventing Toaster from starting up when using mysql backend.
See https://bugzilla.yoctoproject.org/show_bug.cgi?id=9116
I gave it another go. I pushed the branch I used before to
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=bbarrosp/test
/michaelw/mysql-migration
It looks the same to me as
poky-contrib/bavery/test/michaelw/mysql-migration
But just in case you want to look at it.
I then checked out poky-contrib/bavery/test/michaelw/mysql-migration and ran a build, but it failed with the same error. So I removed the whole build dir and tried once more. Building master worked this time, and the series seems to fix 9108. But there are a couple of funny notes and errors in the toaster_ui.log file, which I've uploaded to
https://drive.google.com/file/d/0B1KD45-8S-9FdDdOTTlJM0xpVFE/view?usp=shari
ng
The builds that succeeded are the last 2 in that log.
Cheers
Belén
Quoted 104 lines
I tried this with a clean sqlite database. I started toaster, created a project with the master release and started a build for core-image-minimal. The build got stuck towards the end. The toaster_ui.log shows this error:
NOTE: Tasks Summary: Attempted 2103 tasks of which 2095 didn't need to be rerun and 2 failed.
NOTE: Logging error 2: {'lineno': 88, 'message': "Execution of event handler 'toaster_buildhistory_dump' failed", 'pathname':
'/home/yocto/master/bitbake/lib/bb/event.py', 'build': <Build: 1 migrations test (Release master (master), BBV master (Branch: master)) core-image-minimal>, 'level': 2}
ERROR: Execution of event handler 'toaster_buildhistory_dump' failed Traceback (most recent call last):
File
"/home/yocto/master/_toaster_clones/_git___git.yoctoproject.org_poky_master
/meta/classes/toaster.bbclass", line 315, intoaster_buildhistory_dump(e=<bb.event.BuildCompleted object at 0x7fafc8a35590>):Quoted 1 line
with open("%s/files-in-image.txt" %
installed_img_path,"r") as fin:
for line in fin:
IOError: [Errno 2] No such file or directory:
'/home/yocto/master/build/buildhistory/images/qemux86/glibc/core-image-minimal/files-in-image.txt'Cheers
Belén
Quoted 63 lines
After fixing these migrations and getting Toaster to start up properly using mysql backend a number of unittests failed due to differences in testing on sqlite.
To remove these differences I've changed the data that was in the setUp to be more agnostic and added .lower() where needed to make sure the orderby re-ordering in the same way. I also took this opportunitiy to convert the toastergui unit tests to use a django fixture making it easier to load the database state for testing.Bugs fixed discovered by fixing the unit tests are:
- toaster: SoftwareRecipesTable apply defaultorder_by
- toaster: toastergui Fix invalid char test and implementation and one already reported
- toaster: PackagesTable show only installed packages[note files deleted and added in this series]
Michael Wood (5):
toaster: orm migrations Sort out migrations mess
toaster: SoftwareRecipesTable apply defaultorder_by
toaster: toastergui unit tests convert to use fixtures
toaster: PackagesTable show only installed packages
toaster: toastergui Fix invalid char test and implementationbitbake/lib/toaster/orm/migrations/0001_initial.py | 26 -- .../orm/migrations/0002_auto_20151210_1209.py | 41 -- .../orm/migrations/0002_auto_20151223_1528.py | 27 -- .../orm/migrations/0002_customimagerecipe.py | 24 ++ .../orm/migrations/0003_customimagepackage.py | 2 +- bitbake/lib/toaster/orm/migrations/0004_merge.py | 15 - .../lib/toaster/orm/migrations/0004_provides.py | 27 ++ .../orm/migrations/0005_auto_20160118_1055.py | 19 - .../0006_customimagerecipe_last_updated.py | 19 - .../fixtures/toastergui-unittest-data.xml | 446 +++++++++++++++++++++ bitbake/lib/toaster/toastergui/tables.py | 5 +- bitbake/lib/toaster/toastergui/tests.py | 257 ++---------- bitbake/lib/toaster/toastergui/views.py | 7 +- 13 files changed, 550 insertions(+), 365 deletions(-)delete mode 100644
bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.pycreate mode 100644bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0004_merge.pycreate mode 100644bitbake/lib/toaster/orm/migrations/0004_provides.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.pycreate mode 100644bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xmlSignature · 7 lines
2.5.0 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toasterSignature · 4 lines
_______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
Hi!
Turns out I can replicate the error. It was true on master as well as on this set of patches so I pushed these patches into bitbake-devel. Ive filed a bug on it
https://bugzilla.yoctoproject.org/show_bug.cgi?id=9142.
-b
p.s. Thanks Belén for catching this!!
Quoted 156 lines · Belen
Quoted 10 lines · Belen
Quoted 4 lines · On 16/02/2016 20:19, "[email protected] on behalf of Michael…
This series contains a clean up of the database migrations to fix the issue that was preventing Toaster from starting up when using mysql backend.
See https://bugzilla.yoctoproject.org/show_bug.cgi?id=9116I gave it another go. I pushed the branch I used before to
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=bbarrosp/test
/michaelw/mysql-migrationIt looks the same to me as
poky-contrib/bavery/test/michaelw/mysql-migration
But just in case you want to look at it.
I then checked out poky-contrib/bavery/test/michaelw/mysql-migration and ran a build, but it failed with the same error. So I removed the whole build dir and tried once more. Building master worked this time, and the series seems to fix 9108. But there are a couple of funny notes and errors in the toaster_ui.log file, which I've uploaded to
https://drive.google.com/file/d/0B1KD45-8S-9FdDdOTTlJM0xpVFE/view?usp=shari
ngThe builds that succeeded are the last 2 in that log.
Cheers
Belén
Quoted 99 lines
I tried this with a clean sqlite database. I started toaster, created a project with the master release and started a build for core-image-minimal. The build got stuck towards the end. The toaster_ui.log shows this error:
NOTE: Tasks Summary: Attempted 2103 tasks of which 2095 didn't need to be rerun and 2 failed.
NOTE: Logging error 2: {'lineno': 88, 'message': "Execution of event handler 'toaster_buildhistory_dump' failed", 'pathname':
'/home/yocto/master/bitbake/lib/bb/event.py', 'build': <Build: 1 migrations test (Release master (master), BBV master (Branch: master)) core-image-minimal>, 'level': 2}
ERROR: Execution of event handler 'toaster_buildhistory_dump' failed Traceback (most recent call last):
File
"/home/yocto/master/_toaster_clones/_git___git.yoctoproject.org_poky_master
/meta/classes/toaster.bbclass", line 315, intoaster_buildhistory_dump(e=<bb.event.BuildCompleted object at 0x7fafc8a35590>):Quoted 1 line
with open("%s/files-in-image.txt" %
installed_img_path,"r") as fin:
for line in fin:
IOError: [Errno 2] No such file or directory:
'/home/yocto/master/build/buildhistory/images/qemux86/glibc/core-image-minimal/files-in-image.txt'Cheers
Belén
Quoted 55 lines
After fixing these migrations and getting Toaster to start up properly using mysql backend a number of unittests failed due to differences in testing on sqlite.
To remove these differences I've changed the data that was in the setUp to be more agnostic and added .lower() where needed to make sure the orderby re-ordering in the same way. I also took this opportunitiy to convert the toastergui unit tests to use a django fixture making it easier to load the database state for testing.Bugs fixed discovered by fixing the unit tests are:
- toaster: SoftwareRecipesTable apply defaultorder_by
- toaster: toastergui Fix invalid char test and implementation and one already reported
- toaster: PackagesTable show only installed packages[note files deleted and added in this series]
Michael Wood (5):
toaster: orm migrations Sort out migrations mess
toaster: SoftwareRecipesTable apply defaultorder_by
toaster: toastergui unit tests convert to use fixtures
toaster: PackagesTable show only installed packages
toaster: toastergui Fix invalid char test and implementationbitbake/lib/toaster/orm/migrations/0001_initial.py | 26 -- .../orm/migrations/0002_auto_20151210_1209.py | 41 -- .../orm/migrations/0002_auto_20151223_1528.py | 27 -- .../orm/migrations/0002_customimagerecipe.py | 24 ++ .../orm/migrations/0003_customimagepackage.py | 2 +- bitbake/lib/toaster/orm/migrations/0004_merge.py | 15 - .../lib/toaster/orm/migrations/0004_provides.py | 27 ++ .../orm/migrations/0005_auto_20160118_1055.py | 19 - .../0006_customimagerecipe_last_updated.py | 19 - .../fixtures/toastergui-unittest-data.xml | 446 +++++++++++++++++++++ bitbake/lib/toaster/toastergui/tables.py | 5 +- bitbake/lib/toaster/toastergui/tests.py | 257 ++---------- bitbake/lib/toaster/toastergui/views.py | 7 +- 13 files changed, 550 insertions(+), 365 deletions(-)delete mode 100644
bitbake/lib/toaster/orm/migrations/0002_auto_20151210_1209.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0002_auto_20151223_1528.pycreate mode 100644bitbake/lib/toaster/orm/migrations/0002_customimagerecipe.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0004_merge.pycreate mode 100644bitbake/lib/toaster/orm/migrations/0004_provides.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0005_auto_20160118_1055.pydelete mode 100644bitbake/lib/toaster/orm/migrations/0006_customimagerecipe_last_updated.pycreate mode 100644bitbake/lib/toaster/toastergui/fixtures/toastergui-unittest-data.xmlQuoted 8 lines
--
2.5.0--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toasterQuoted 5 lines
--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster--
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster