[Toaster] [PATCH 0/5] mysql migrations and unittests fixes

Barros Pena, Belen belen.barros.pena at intel.com
Wed Feb 17 09:29:09 PST 2016



On 16/02/2016 20:19, "toaster-bounces at yoctoproject.org on behalf of
Michael Wood" <toaster-bounces at yoctoproject.org on behalf of
michael.g.wood at intel.com> wrote:

>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>):
     
    >            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

>
>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
>
>-- 
>2.5.0
>
>-- 
>_______________________________________________
>toaster mailing list
>toaster at yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster



More information about the toaster mailing list