Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id CF6D8E00BC2; Wed, 17 Feb 2016 09:29:20 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high * trust * [192.55.52.93 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 8A39CE00BB9 for ; Wed, 17 Feb 2016 09:29:14 -0800 (PST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP; 17 Feb 2016 09:29:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,461,1449561600"; d="scan'208";a="905192284" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga001.fm.intel.com with ESMTP; 17 Feb 2016 09:29:13 -0800 Received: from irsmsx155.ger.corp.intel.com (163.33.192.3) by IRSMSX151.ger.corp.intel.com (163.33.192.59) with Microsoft SMTP Server (TLS) id 14.3.248.2; Wed, 17 Feb 2016 17:29:11 +0000 Received: from irsmsx110.ger.corp.intel.com ([169.254.15.31]) by irsmsx155.ger.corp.intel.com ([169.254.14.217]) with mapi id 14.03.0248.002; Wed, 17 Feb 2016 17:29:10 +0000 From: "Barros Pena, Belen" To: "Wood, Michael G" , "toaster@yoctoproject.org" Thread-Topic: [Toaster] [PATCH 0/5] mysql migrations and unittests fixes Thread-Index: AQHRaai1muvmog1DdUaD3V+V6qUDAw== Date: Wed, 17 Feb 2016 17:29:09 +0000 Message-ID: References: <1455650397-14195-1-git-send-email-michael.g.wood@intel.com> In-Reply-To: <1455650397-14195-1-git-send-email-michael.g.wood@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.6.0.151221 x-originating-ip: [10.252.29.30] MIME-Version: 1.0 Subject: Re: [PATCH 0/5] mysql migrations and unittests fixes X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Feb 2016 17:29:20 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-ID: <7ECB54A4E5092A4E91D8E3FCCD08E91E@intel.com> Content-Transfer-Encoding: quoted-printable On 16/02/2016 20:19, "toaster-bounces@yoctoproject.org on behalf of Michael Wood" 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=3D9116 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': , 'level': 2} ERROR: Execution of event handler 'toaster_buildhistory_dump' failed Traceback (most recent call last): File=20 "/home/yocto/master/_toaster_clones/_git___git.yoctoproject.org_poky_master /meta/classes/toaster.bbclass", line 315, in toaster_buildhistory_dump(e=3D): =20 > 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=E9n > >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 > >--=20 >2.5.0 > >--=20 >_______________________________________________ >toaster mailing list >toaster@yoctoproject.org >https://lists.yoctoproject.org/listinfo/toaster