All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/6] Build tests
@ 2016-05-06 21:26 Michael Wood
  2016-05-06 21:26 ` [PATCH v4 1/6] toaster: Remove DATABASE_URL being passed around as an environment var Michael Wood
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Michael Wood @ 2016-05-06 21:26 UTC (permalink / raw)
  To: toaster

Changes since v3:
 - Make sure config_file is initialised
 - Add a README file to explain how to run the tests

Michael Wood (6):
  toaster: Remove DATABASE_URL being passed around as an environment var
  toaster: runbuilds move the execution sequence out of the poll loop
  toaster: Add a specific test settings file
  toaster: tests Add a BuildTest helper class
  toaster: tests build Add a test for a build of core-image-minimal
  toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833

 bitbake/bin/toaster                                |   2 -
 bitbake/lib/bb/ui/buildinfohelper.py               |  20 +-
 .../bldcontrol/management/commands/runbuilds.py    |  30 +-
 bitbake/lib/toaster/tests/builds/README            |  14 +
 bitbake/lib/toaster/tests/builds/__init__.py       |   0
 bitbake/lib/toaster/tests/builds/buildtest.py      | 134 +++++++
 .../toaster/tests/builds/test_core_image_min.py    | 396 +++++++++++++++++++++
 .../toastermain/management/commands/get-dburl.py   |   9 -
 bitbake/lib/toaster/toastermain/settings-test.py   |  41 +++
 bitbake/lib/toaster/toastermain/settings.py        |  67 +---
 10 files changed, 621 insertions(+), 92 deletions(-)
 create mode 100644 bitbake/lib/toaster/tests/builds/README
 create mode 100644 bitbake/lib/toaster/tests/builds/__init__.py
 create mode 100644 bitbake/lib/toaster/tests/builds/buildtest.py
 create mode 100644 bitbake/lib/toaster/tests/builds/test_core_image_min.py
 delete mode 100644 bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
 create mode 100644 bitbake/lib/toaster/toastermain/settings-test.py

-- 
2.7.4



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v4 1/6] toaster: Remove DATABASE_URL being passed around as an environment var
  2016-05-06 21:26 [PATCH v4 0/6] Build tests Michael Wood
@ 2016-05-06 21:26 ` Michael Wood
  2016-05-06 21:26 ` [PATCH v4 2/6] toaster: runbuilds move the execution sequence out of the poll loop Michael Wood
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Wood @ 2016-05-06 21:26 UTC (permalink / raw)
  To: toaster

We don't need to pass the DATABASE_URL around and read it back if we
setup the django framework in the correct way.
We make the default sqlite database path a full path so that the
database isn't being assumed to be in CWD.

Also add some more useful comments on the database settings.

This is preparation work to migrate the build tests and be able to
trigger builds on differently configured databases.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
---
 bitbake/bin/toaster                                |  2 -
 bitbake/lib/bb/ui/buildinfohelper.py               | 20 +++----
 .../toastermain/management/commands/get-dburl.py   |  9 ---
 bitbake/lib/toaster/toastermain/settings.py        | 67 ++++------------------
 4 files changed, 20 insertions(+), 78 deletions(-)
 delete mode 100644 bitbake/lib/toaster/toastermain/management/commands/get-dburl.py

diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 987d53c1..91716e6 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -100,7 +100,6 @@ stop_system()
     fi
     webserverKillAll
     # unset exported variables
-    unset DATABASE_URL
     unset TOASTER_CONF
     unset TOASTER_DIR
     unset BITBAKE_UI
@@ -278,7 +277,6 @@ case $CMD in
             return 4
         fi
         export BITBAKE_UI='toasterui'
-        export DATABASE_URL=`$MANAGE get-dburl`
         $MANAGE runbuilds & echo $! >${BUILDDIR}/.runbuilds.pid
         # set fail safe stop system on terminal exit
         trap stop_system SIGHUP
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 9397905..b07dc81 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -21,19 +21,19 @@ import bb
 import re
 import os
 
-os.environ["DJANGO_SETTINGS_MODULE"] = "toaster.toastermain.settings"
-
-
 import django
 from django.utils import timezone
 
+import toaster
+# Add toaster module to the search path to help django.setup() find the right
+# modules
+sys.path.insert(0, os.path.dirname(toaster.__file__))
 
-def _configure_toaster():
-    """ Add toaster to sys path for importing modules
-    """
-    sys.path.append(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(__file__))), 'toaster'))
-_configure_toaster()
-
+#Set the DJANGO_SETTINGS_MODULE if it's not already set
+os.environ["DJANGO_SETTINGS_MODULE"] =\
+    os.environ.get("DJANGO_SETTINGS_MODULE",
+                   "toaster.toastermain.settings")
+# Setup django framework (needs to be done before importing modules)
 django.setup()
 
 from orm.models import Build, Task, Recipe, Layer_Version, Layer, Target, LogMessage, HelpText
@@ -54,11 +54,11 @@ from datetime import datetime, timedelta
 
 from django.db import transaction, connection
 
+
 # pylint: disable=invalid-name
 # the logger name is standard throughout BitBake
 logger = logging.getLogger("ToasterLogger")
 
-
 class NotExisting(Exception):
     pass
 
diff --git a/bitbake/lib/toaster/toastermain/management/commands/get-dburl.py b/bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
deleted file mode 100644
index 22b3eb7..0000000
--- a/bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
+++ /dev/null
@@ -1,9 +0,0 @@
-from toastermain.settings import getDATABASE_URL
-from django.core.management.base import NoArgsCommand
-
-class Command(NoArgsCommand):
-    args    = ""
-    help    = "get database url"
-
-    def handle_noargs(self,**options):
-        print getDATABASE_URL()
diff --git a/bitbake/lib/toaster/toastermain/settings.py b/bitbake/lib/toaster/toastermain/settings.py
index 74ab604..2433f34 100644
--- a/bitbake/lib/toaster/toastermain/settings.py
+++ b/bitbake/lib/toaster/toastermain/settings.py
@@ -21,7 +21,7 @@
 
 # Django settings for Toaster project.
 
-import os, re
+import os
 
 DEBUG = True
 TEMPLATE_DEBUG = DEBUG
@@ -38,14 +38,19 @@ ADMINS = (
 
 MANAGERS = ADMINS
 
+TOASTER_SQLITE_DEFAULT_DIR = os.path.join(os.environ.get('TOASTER_DIR', ''),
+                                          'build')
+
 DATABASES = {
     'default': {
-        'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
-        'NAME': 'toaster.sqlite',                      # Or path to database file if using sqlite3.
+        # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
+        'ENGINE': 'django.db.backends.sqlite3',
+        # DB name or full path to database file if using sqlite3.
+        'NAME': "%s/toaster1.sqlite" % TOASTER_SQLITE_DEFAULT_DIR,
         'USER': '',
         'PASSWORD': '',
-        'HOST': '127.0.0.1',                      # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP.
-        'PORT': '3306',                      # Set to empty string for default.
+        #'HOST': '127.0.0.1', # e.g. mysql server
+        #'PORT': '3306', # e.g. mysql port
     }
 }
 
@@ -55,58 +60,6 @@ DATABASES = {
 if 'sqlite' in DATABASES['default']['ENGINE']:
     DATABASES['default']['OPTIONS'] = { 'timeout': 20 }
 
-# Reinterpret database settings if we have DATABASE_URL environment variable defined
-
-if 'DATABASE_URL' in os.environ:
-    dburl = os.environ['DATABASE_URL']
-
-    if dburl.startswith('sqlite3://'):
-        result = re.match('sqlite3://(.*)', dburl)
-        if result is None:
-            raise Exception("ERROR: Could not read sqlite database url: %s" % dburl)
-        DATABASES['default'] = {
-            'ENGINE': 'django.db.backends.sqlite3',
-            'NAME': result.group(1),
-            'USER': '',
-            'PASSWORD': '',
-            'HOST': '',
-            'PORT': '',
-        }
-    elif dburl.startswith('mysql://'):
-        # URL must be in this form: mysql://user:pass@host:port/name
-        result = re.match(r"mysql://([^:]*):([^@]*)@([^:]*):(\d*)/([^/]*)", dburl)
-        if result is None:
-            raise Exception("ERROR: Could not read mysql database url: %s" % dburl)
-        DATABASES['default'] = {
-            'ENGINE': 'django.db.backends.mysql',
-            'NAME': result.group(5),
-            'USER': result.group(1),
-            'PASSWORD': result.group(2),
-            'HOST': result.group(3),
-            'PORT': result.group(4),
-        }
-    else:
-        raise Exception("FIXME: Please implement missing database url schema for url: %s" % dburl)
-
-
-# Allows current database settings to be exported as a DATABASE_URL environment variable value
-
-def getDATABASE_URL():
-    d = DATABASES['default']
-    if d['ENGINE'] == 'django.db.backends.sqlite3':
-        if d['NAME'] == ':memory:':
-            return 'sqlite3://:memory:'
-        elif d['NAME'].startswith("/"):
-            return 'sqlite3://' + d['NAME']
-        return "sqlite3://" + os.path.join(os.getcwd(), d['NAME'])
-
-    elif d['ENGINE'] == 'django.db.backends.mysql':
-        return "mysql://" + d['USER'] + ":" + d['PASSWORD'] + "@" + d['HOST'] + ":" + d['PORT'] + "/" + d['NAME']
-
-    raise Exception("FIXME: Please implement missing database url schema for engine: %s" % d['ENGINE'])
-
-
-
 # Hosts/domain names that are valid for this site; required if DEBUG is False
 # See https://docs.djangoproject.com/en/1.5/ref/settings/#allowed-hosts
 ALLOWED_HOSTS = []
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v4 2/6] toaster: runbuilds move the execution sequence out of the poll loop
  2016-05-06 21:26 [PATCH v4 0/6] Build tests Michael Wood
  2016-05-06 21:26 ` [PATCH v4 1/6] toaster: Remove DATABASE_URL being passed around as an environment var Michael Wood
@ 2016-05-06 21:26 ` Michael Wood
  2016-05-06 21:26 ` [PATCH v4 3/6] toaster: Add a specific test settings file Michael Wood
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Wood @ 2016-05-06 21:26 UTC (permalink / raw)
  To: toaster

Move the execution sequence for a build out of the polling loop and into
it's own fuction. This means that we can call the function on it's own
if we just want to trigger one build rather than infinite polling.
This is something needed for the build tests.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
---
 .../bldcontrol/management/commands/runbuilds.py    | 30 ++++++++++++----------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
index 27289be..3b34fe0 100644
--- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
+++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py
@@ -158,22 +158,24 @@ class Command(NoArgsCommand):
             br.environment.lock = BuildEnvironment.LOCK_FREE
             br.environment.save()
 
+    def runbuild(self):
+        try:
+            self.cleanup()
+        except Exception as e:
+            logger.warn("runbuilds: cleanup exception %s" % str(e))
 
-    def handle_noargs(self, **options):
-        while True:
-            try:
-                self.cleanup()
-            except Exception as e:
-                logger.warn("runbuilds: cleanup exception %s" % str(e))
+        try:
+            self.archive()
+        except Exception as e:
+            logger.warn("runbuilds: archive exception %s" % str(e))
 
-            try:
-                self.archive()
-            except Exception as e:
-                logger.warn("runbuilds: archive exception %s" % str(e))
+        try:
+            self.schedule()
+        except Exception as e:
+            logger.warn("runbuilds: schedule exception %s" % str(e))
 
-            try:
-                self.schedule()
-            except Exception as e:
-                logger.warn("runbuilds: schedule exception %s" % str(e))
 
+    def handle_noargs(self, **options):
+        while True:
+            self.runbuild()
             time.sleep(1)
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v4 3/6] toaster: Add a specific test settings file
  2016-05-06 21:26 [PATCH v4 0/6] Build tests Michael Wood
  2016-05-06 21:26 ` [PATCH v4 1/6] toaster: Remove DATABASE_URL being passed around as an environment var Michael Wood
  2016-05-06 21:26 ` [PATCH v4 2/6] toaster: runbuilds move the execution sequence out of the poll loop Michael Wood
@ 2016-05-06 21:26 ` Michael Wood
  2016-05-06 21:26 ` [PATCH v4 4/6] toaster: tests Add a BuildTest helper class Michael Wood
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Wood @ 2016-05-06 21:26 UTC (permalink / raw)
  To: toaster

When running certain tests we want a particular database specified.
When bitbake toaster ui is being tested pass it these test settings so
that it uses the same database as the unit tests running.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
---
 bitbake/lib/toaster/toastermain/settings-test.py | 41 ++++++++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 bitbake/lib/toaster/toastermain/settings-test.py

diff --git a/bitbake/lib/toaster/toastermain/settings-test.py b/bitbake/lib/toaster/toastermain/settings-test.py
new file mode 100644
index 0000000..36b14c0
--- /dev/null
+++ b/bitbake/lib/toaster/toastermain/settings-test.py
@@ -0,0 +1,41 @@
+#
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2016        Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Django settings for Toaster project.
+
+# Settings overlay to use for running tests
+# DJANGO_SETTINGS_MODULE=toastermain.settings-test
+
+from settings import *
+
+DEBUG = True
+TEMPLATE_DEBUG = DEBUG
+
+DATABASES = {
+    'default': {
+        'ENGINE': 'django.db.backends.sqlite3',
+        'NAME': '/tmp/toaster-test-db.sqlite',
+        'TEST': {
+            'ENGINE': 'django.db.backends.sqlite3',
+            'NAME': '/tmp/toaster-test-db.sqlite',
+        }
+    }
+}
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v4 4/6] toaster: tests Add a BuildTest helper class
  2016-05-06 21:26 [PATCH v4 0/6] Build tests Michael Wood
                   ` (2 preceding siblings ...)
  2016-05-06 21:26 ` [PATCH v4 3/6] toaster: Add a specific test settings file Michael Wood
@ 2016-05-06 21:26 ` Michael Wood
  2016-05-06 21:26 ` [PATCH v4 5/6] toaster: tests build Add a test for a build of core-image-minimal Michael Wood
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Wood @ 2016-05-06 21:26 UTC (permalink / raw)
  To: toaster

Add a helper class for running build tests. Subclass this and call the
build method to get setup for running tests on the resulting data from a
build.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
---
 bitbake/lib/toaster/tests/builds/README       |  14 +++
 bitbake/lib/toaster/tests/builds/__init__.py  |   0
 bitbake/lib/toaster/tests/builds/buildtest.py | 134 ++++++++++++++++++++++++++
 3 files changed, 148 insertions(+)
 create mode 100644 bitbake/lib/toaster/tests/builds/README
 create mode 100644 bitbake/lib/toaster/tests/builds/__init__.py
 create mode 100644 bitbake/lib/toaster/tests/builds/buildtest.py

diff --git a/bitbake/lib/toaster/tests/builds/README b/bitbake/lib/toaster/tests/builds/README
new file mode 100644
index 0000000..98e3e2e
--- /dev/null
+++ b/bitbake/lib/toaster/tests/builds/README
@@ -0,0 +1,14 @@
+# Running build tests
+
+These tests are to test the running of builds and the data produced by the builds.
+Your oe build environment must be sourced/initialised for these tests to run.
+
+The simplest way to run the tests are the following commands:
+
+$ . oe-init-build-env
+$ cd bitbake/lib/toaster/ # path my vary but this is into toaster's directory
+$ DJANGO_SETTINGS_MODULE='toastermain.settings-test' ./manage.py test tests.builds
+
+Optional environment variables:
+ - TOASTER_DIR (where toaster keeps it's artifacts)
+ - TOASTER_CONF a path to the toasterconf.json file. This will need to be set if you don't execute the tests from toaster's own directory.
diff --git a/bitbake/lib/toaster/tests/builds/__init__.py b/bitbake/lib/toaster/tests/builds/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/bitbake/lib/toaster/tests/builds/buildtest.py b/bitbake/lib/toaster/tests/builds/buildtest.py
new file mode 100644
index 0000000..fc7bd5b
--- /dev/null
+++ b/bitbake/lib/toaster/tests/builds/buildtest.py
@@ -0,0 +1,134 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+import os
+import sys
+import time
+import unittest
+
+from orm.models import Project, Release, ProjectTarget, Build
+from bldcontrol.models import BuildEnvironment
+
+from bldcontrol.management.commands.loadconf import Command\
+    as LoadConfigCommand
+
+from bldcontrol.management.commands.runbuilds import Command\
+    as RunBuildsCommand
+
+import subprocess
+
+# We use unittest.TestCase instead of django.test.TestCase because we don't
+# want to wrap everything in a database transaction as an external process
+# (bitbake needs access to the database)
+
+
+class BuildTest(unittest.TestCase):
+
+    PROJECT_NAME = "Testbuild"
+
+    def build(self, target):
+        # So that the buildinfo helper uses the test database'
+        self.assertEqual(
+            os.environ.get('DJANGO_SETTINGS_MODULE', ''),
+            'toastermain.settings-test',
+            "Please initialise django with the tests settings:  "
+            "DJANGO_SETTINGS_MODULE='toastermain.settings-test'")
+
+        if self.target_already_built(target):
+            return
+
+        # Take a guess at the location of the toasterconf
+        poky_toaster_conf = '../../../meta-poky/conf/toasterconf.json'
+        oe_toaster_conf = '../../../meta/conf/toasterconf.json'
+        env_toaster_conf = os.environ.get('TOASTER_CONF')
+
+        config_file = None
+        if env_toaster_conf:
+            config_file = env_toaster_conf
+        else:
+            if os.path.exists(poky_toaster_conf):
+                config_file = poky_toaster_conf
+            elif os.path.exists(oe_toaster_conf):
+                config_file = oe_toaster_conf
+
+        self.assertIsNotNone(config_file,
+                             "Default locations for toasterconf not found"
+                             "please set $TOASTER_CONF manually")
+
+        # Setup the release information and default layers
+        print("\nImporting file: %s" % config_file)
+        os.environ['TOASTER_CONF'] = config_file
+        LoadConfigCommand()._import_layer_config(config_file)
+
+        os.environ['TOASTER_DIR'] = \
+            os.path.abspath(os.environ['BUILDDIR'] + "/../")
+
+        os.environ['BBBASEDIR'] = \
+            subprocess.check_output('which bitbake', shell=True)
+
+        BuildEnvironment.objects.get_or_create(
+            betype=BuildEnvironment.TYPE_LOCAL,
+            sourcedir=os.environ['TOASTER_DIR'],
+            builddir=os.environ['BUILDDIR']
+        )
+
+        release = Release.objects.get(name='local')
+
+        # Create a project for this build to run in
+        try:
+            project = Project.objects.get(name=BuildTest.PROJECT_NAME)
+        except Project.DoesNotExist:
+            project = Project.objects.create_project(
+                name=BuildTest.PROJECT_NAME,
+                release=release
+            )
+
+        ProjectTarget.objects.create(project=project,
+                                     target=target,
+                                     task="")
+        build_request = project.schedule_build()
+
+        # run runbuilds command to dispatch the build
+        # e.g. manage.py runubilds
+        RunBuildsCommand().runbuild()
+
+        build_pk = build_request.build.pk
+        while Build.objects.get(pk=build_pk).outcome == Build.IN_PROGRESS:
+            sys.stdout.write("\rBuilding %s %d%%" %
+                             (target,
+                              build_request.build.completeper()))
+            sys.stdout.flush()
+            time.sleep(1)
+
+        self.assertNotEqual(build_request.build.outcome,
+                            Build.SUCCEEDED, "Build did not SUCCEEDED")
+        print("\nBuild finished")
+        return build_request.build
+
+    def target_already_built(self, target):
+        """ If the target is already built no need to build it again"""
+        for build in Build.objects.filter(
+                project__name=BuildTest.PROJECT_NAME):
+            targets = build.target_set.values_list('target', flat=True)
+            if target in targets:
+                return True
+
+        return False
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v4 5/6] toaster: tests build Add a test for a build of core-image-minimal
  2016-05-06 21:26 [PATCH v4 0/6] Build tests Michael Wood
                   ` (3 preceding siblings ...)
  2016-05-06 21:26 ` [PATCH v4 4/6] toaster: tests Add a BuildTest helper class Michael Wood
@ 2016-05-06 21:26 ` Michael Wood
  2016-05-06 21:26 ` [PATCH v4 6/6] toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833 Michael Wood
  2016-05-09 13:52 ` [PATCH v4 0/6] Build tests Michael Wood
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Wood @ 2016-05-06 21:26 UTC (permalink / raw)
  To: toaster

This is a port of the oe self test to the django test framework from
oe-core meta/lib/oeqa/selftest/_toaster.py

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
---
 .../toaster/tests/builds/test_core_image_min.py    | 389 +++++++++++++++++++++
 1 file changed, 389 insertions(+)
 create mode 100644 bitbake/lib/toaster/tests/builds/test_core_image_min.py

diff --git a/bitbake/lib/toaster/tests/builds/test_core_image_min.py b/bitbake/lib/toaster/tests/builds/test_core_image_min.py
new file mode 100644
index 0000000..87d29c7
--- /dev/null
+++ b/bitbake/lib/toaster/tests/builds/test_core_image_min.py
@@ -0,0 +1,389 @@
+#! /usr/bin/env python
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# BitBake Toaster Implementation
+#
+# Copyright (C) 2016 Intel Corporation
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Tests were part of openembedded-core oe selftest Authored by: Lucian Musat
+# Ionut Chisanovici, Paul Eggleton and Cristian Iorga
+
+import os
+
+from django.db.models import Q
+
+from orm.models import Target_Image_File, Target_Installed_Package, Task
+from orm.models import Package_Dependency, Recipe_Dependency, Build
+from orm.models import Task_Dependency, Package, Target, Recipe
+from orm.models import CustomImagePackage
+
+from buildtest import BuildTest
+
+
+class BuildCoreImageMinimal(BuildTest):
+    """Build core-image-minimal and test the results"""
+
+    def setUp(self):
+        self.build("core-image-minimal")
+
+    # Check if build name is unique - tc_id=795
+    def test_Build_Unique_Name(self):
+        all_builds = Build.objects.all().count()
+        distinct_builds = Build.objects.values('id').distinct().count()
+        self.assertEqual(distinct_builds,
+                         all_builds,
+                         msg='Build name is not unique')
+
+    # Check if build cooker log path is unique - tc_id=819
+    def test_Build_Unique_Cooker_Log_Path(self):
+        distinct_path = Build.objects.values(
+            'cooker_log_path').distinct().count()
+        total_builds = Build.objects.values('id').count()
+        self.assertEqual(distinct_path,
+                         total_builds,
+                         msg='Build cooker log path is not unique')
+
+    # Check if task order is unique for one build - tc=824
+    def test_Task_Unique_Order(self):
+        builds = Build.objects.values('id')
+        cnt_err = []
+
+        for build in builds:
+            total_task_order = Task.objects.filter(
+                build=build['id']).values('order').count()
+            distinct_task_order = Task.objects.filter(
+                build=build['id']).values('order').distinct().count()
+
+            if (total_task_order != distinct_task_order):
+                cnt_err.append(build['id'])
+
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for build id: %s' % cnt_err)
+
+    # Check task order sequence for one build - tc=825
+    def test_Task_Order_Sequence(self):
+        builds = builds = Build.objects.values('id')
+        cnt_err = []
+        for build in builds:
+            tasks = Task.objects.filter(
+                Q(build=build['id']),
+                ~Q(order=None),
+                ~Q(task_name__contains='_setscene')
+            ).values('id', 'order').order_by("order")
+
+            cnt_tasks = 0
+            for task in tasks:
+                cnt_tasks += 1
+                if (task['order'] != cnt_tasks):
+                    cnt_err.append(task['id'])
+        self.assertEqual(
+            len(cnt_err), 0, msg='Errors for task id: %s' % cnt_err)
+
+    # Check if disk_io matches the difference between EndTimeIO and
+    # StartTimeIO in build stats - tc=828
+    # def test_Task_Disk_IO_TC828(self):
+
+    # Check if outcome = 2 (SSTATE) then sstate_result must be 3 (RESTORED) -
+    # tc=832
+    def test_Task_If_Outcome_2_Sstate_Result_Must_Be_3(self):
+        tasks = Task.objects.filter(outcome=2).values('id', 'sstate_result')
+        cnt_err = []
+        for task in tasks:
+            if (task['sstate_result'] != 3):
+                cnt_err.append(task['id'])
+
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for task id: %s' % cnt_err)
+
+    # Check if outcome = 1 (COVERED) or 3 (EXISTING) then sstate_result must
+    # be 0 (SSTATE_NA) - tc=833
+    def test_Task_If_Outcome_1_3_Sstate_Result_Must_Be_0(self):
+        tasks = Task.objects.filter(
+            outcome__in=(1, 3)).values('id', 'sstate_result')
+        cnt_err = []
+
+        for task in tasks:
+            if (task['sstate_result'] != 0):
+                cnt_err.append(task['id'])
+
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for task id: %s' % cnt_err)
+
+    # Check if outcome is 0 (SUCCESS) or 4 (FAILED) then sstate_result must be
+    # 0 (NA), 1 (MISS) or 2 (FAILED) - tc=834
+    def test_Task_If_Outcome_0_4_Sstate_Result_Must_Be_0_1_2(self):
+        tasks = Task.objects.filter(
+            outcome__in=(0, 4)).values('id', 'sstate_result')
+        cnt_err = []
+
+        for task in tasks:
+            if (task['sstate_result'] not in [0, 1, 2]):
+                cnt_err.append(task['id'])
+
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for task id: %s' % cnt_err)
+
+    # Check if task_executed = TRUE (1), script_type must be 0 (CODING_NA), 2
+    # (CODING_PYTHON), 3 (CODING_SHELL) - tc=891
+    def test_Task_If_Task_Executed_True_Script_Type_0_2_3(self):
+        tasks = Task.objects.filter(
+            task_executed=1).values('id', 'script_type')
+        cnt_err = []
+
+        for task in tasks:
+            if (task['script_type'] not in [0, 2, 3]):
+                cnt_err.append(task['id'])
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for task id: %s' % cnt_err)
+
+    # Check if task_executed = TRUE (1), outcome must be 0 (SUCCESS) or 4
+    # (FAILED) - tc=836
+    def test_Task_If_Task_Executed_True_Outcome_0_4(self):
+        tasks = Task.objects.filter(task_executed=1).values('id', 'outcome')
+        cnt_err = []
+
+        for task in tasks:
+            if (task['outcome'] not in [0, 4]):
+                cnt_err.append(task['id'])
+
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for task id: %s' % cnt_err)
+
+    # Check if task_executed = FALSE (0), script_type must be 0 - tc=890
+    def test_Task_If_Task_Executed_False_Script_Type_0(self):
+        tasks = Task.objects.filter(
+            task_executed=0).values('id', 'script_type')
+        cnt_err = []
+
+        for task in tasks:
+            if (task['script_type'] != 0):
+                cnt_err.append(task['id'])
+
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for task id: %s' % cnt_err)
+
+    # Check if task_executed = FALSE (0) and build outcome = SUCCEEDED (0),
+    # task outcome must be 1 (COVERED), 2 (CACHED), 3 (PREBUILT), 5 (EMPTY) -
+    # tc=837
+    def test_Task_If_Task_Executed_False_Outcome_1_2_3_5(self):
+        builds = Build.objects.filter(outcome=0).values('id')
+        cnt_err = []
+        for build in builds:
+            tasks = Task.objects.filter(
+                build=build['id'], task_executed=0).values('id', 'outcome')
+            for task in tasks:
+                if (task['outcome'] not in [1, 2, 3, 5]):
+                    cnt_err.append(task['id'])
+
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for task id: %s' % cnt_err)
+
+    # Key verification - tc=888
+    def test_Target_Installed_Package(self):
+        rows = Target_Installed_Package.objects.values('id',
+                                                       'target_id',
+                                                       'package_id')
+        cnt_err = []
+
+        for row in rows:
+            target = Target.objects.filter(id=row['target_id']).values('id')
+            package = Package.objects.filter(id=row['package_id']).values('id')
+            if (not target or not package):
+                cnt_err.append(row['id'])
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for target installed package id: %s' %
+                         cnt_err)
+
+    # Key verification - tc=889
+    def test_Task_Dependency(self):
+        rows = Task_Dependency.objects.values('id',
+                                              'task_id',
+                                              'depends_on_id')
+        cnt_err = []
+        for row in rows:
+            task_id = Task.objects.filter(id=row['task_id']).values('id')
+            depends_on_id = Task.objects.filter(
+                id=row['depends_on_id']).values('id')
+            if (not task_id or not depends_on_id):
+                cnt_err.append(row['id'])
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg='Errors for task dependency id: %s' % cnt_err)
+
+    # Check if build target file_name is populated only if is_image=true AND
+    # orm_build.outcome=0 then if the file exists and its size matches
+    # the file_size value. Need to add the tc in the test run
+    def test_Target_File_Name_Populated(self):
+        builds = Build.objects.filter(outcome=0).values('id')
+        for build in builds:
+            targets = Target.objects.filter(
+                build_id=build['id'], is_image=1).values('id')
+            for target in targets:
+                target_files = Target_Image_File.objects.filter(
+                    target_id=target['id']).values('id',
+                                                   'file_name',
+                                                   'file_size')
+                cnt_err = []
+                for file_info in target_files:
+                    target_id = file_info['id']
+                    target_file_name = file_info['file_name']
+                    target_file_size = file_info['file_size']
+                    if (not target_file_name or not target_file_size):
+                        cnt_err.append(target_id)
+                    else:
+                        if (not os.path.exists(target_file_name)):
+                            cnt_err.append(target_id)
+                        else:
+                            if (os.path.getsize(target_file_name) !=
+                                    target_file_size):
+                                cnt_err.append(target_id)
+            self.assertEqual(len(cnt_err), 0,
+                             msg='Errors for target image file id: %s' %
+                             cnt_err)
+
+    # Key verification - tc=884
+    def test_Package_Dependency(self):
+        cnt_err = []
+        deps = Package_Dependency.objects.values(
+            'id', 'package_id', 'depends_on_id')
+        for dep in deps:
+            if (dep['package_id'] == dep['depends_on_id']):
+                cnt_err.append(dep['id'])
+        self.assertEqual(len(cnt_err), 0,
+                         msg='Errors for package dependency id: %s' % cnt_err)
+
+    # Recipe key verification, recipe name does not depends on a recipe having
+    # the same name - tc=883
+    def test_Recipe_Dependency(self):
+        deps = Recipe_Dependency.objects.values(
+            'id', 'recipe_id', 'depends_on_id')
+        cnt_err = []
+        for dep in deps:
+            if (not dep['recipe_id'] or not dep['depends_on_id']):
+                cnt_err.append(dep['id'])
+            else:
+                name = Recipe.objects.filter(
+                    id=dep['recipe_id']).values('name')
+                dep_name = Recipe.objects.filter(
+                    id=dep['depends_on_id']).values('name')
+                if (name == dep_name):
+                    cnt_err.append(dep['id'])
+        self.assertEqual(len(cnt_err), 0,
+                         msg='Errors for recipe dependency id: %s' % cnt_err)
+
+    # Check if package name does not start with a number (0-9) - tc=846
+    def test_Package_Name_For_Number(self):
+        packages = Package.objects.filter(~Q(size=-1)).values('id', 'name')
+        cnt_err = []
+        for package in packages:
+            if (package['name'][0].isdigit() is True):
+                cnt_err.append(package['id'])
+        self.assertEqual(
+            len(cnt_err), 0, msg='Errors for package id: %s' % cnt_err)
+
+    # Check if package version starts with a number (0-9) - tc=847
+    def test_Package_Version_Starts_With_Number(self):
+        packages = Package.objects.filter(
+            ~Q(size=-1)).values('id', 'version')
+        cnt_err = []
+        for package in packages:
+            if (package['version'][0].isdigit() is False):
+                cnt_err.append(package['id'])
+        self.assertEqual(
+            len(cnt_err), 0, msg='Errors for package id: %s' % cnt_err)
+
+    # Check if package revision starts with 'r' - tc=848
+    def test_Package_Revision_Starts_With_r(self):
+        packages = Package.objects.filter(
+            ~Q(size=-1)).values('id', 'revision')
+        cnt_err = []
+        for package in packages:
+            if (package['revision'][0].startswith("r") is False):
+                cnt_err.append(package['id'])
+        self.assertEqual(
+            len(cnt_err), 0, msg='Errors for package id: %s' % cnt_err)
+
+    # Check the validity of the package build_id
+    # TC must be added in test run
+    def test_Package_Build_Id(self):
+        packages = Package.objects.filter(
+            ~Q(size=-1)).values('id', 'build_id')
+        cnt_err = []
+        for package in packages:
+            build_id = Build.objects.filter(
+                id=package['build_id']).values('id')
+            if (not build_id):
+                # They have no build_id but if they are
+                # CustomImagePackage that's expected
+                try:
+                    CustomImagePackage.objects.get(pk=package['id'])
+                except CustomImagePackage.DoesNotExist:
+                    cnt_err.append(package['id'])
+
+        self.assertEqual(len(cnt_err),
+                         0,
+                         msg="Errors for package id: %s they have no build"
+                         "associated with them" % cnt_err)
+
+    # Check the validity of package recipe_id
+    # TC must be added in test run
+    def test_Package_Recipe_Id(self):
+        packages = Package.objects.filter(
+            ~Q(size=-1)).values('id', 'recipe_id')
+        cnt_err = []
+        for package in packages:
+            recipe_id = Recipe.objects.filter(
+                id=package['recipe_id']).values('id')
+            if (not recipe_id):
+                cnt_err.append(package['id'])
+        self.assertEqual(
+            len(cnt_err), 0, msg='Errors for package id: %s' % cnt_err)
+
+    # Check if package installed_size field is not null
+    # TC must be aded in test run
+    def test_Package_Installed_Size_Not_NULL(self):
+        packages = Package.objects.filter(
+            installed_size__isnull=True).values('id')
+        cnt_err = []
+        for package in packages:
+            cnt_err.append(package['id'])
+        self.assertEqual(
+            len(cnt_err), 0, msg='Errors for package id: %s' % cnt_err)
+
+    def test_custom_packages_generated(self):
+        """Test if there is a corresponding generated CustomImagePackage"""
+        """ for each of the packages generated"""
+        missing_packages = []
+
+        for package in Package.objects.all():
+            try:
+                CustomImagePackage.objects.get(name=package.name)
+            except CustomImagePackage.DoesNotExist:
+                missing_packages.append(package.name)
+
+        self.assertEqual(len(missing_packages), 0,
+                         "Some package were created from the build but their"
+                         " corresponding CustomImagePackage was not found")
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v4 6/6] toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833
  2016-05-06 21:26 [PATCH v4 0/6] Build tests Michael Wood
                   ` (4 preceding siblings ...)
  2016-05-06 21:26 ` [PATCH v4 5/6] toaster: tests build Add a test for a build of core-image-minimal Michael Wood
@ 2016-05-06 21:26 ` Michael Wood
  2016-05-09 13:52 ` [PATCH v4 0/6] Build tests Michael Wood
  6 siblings, 0 replies; 10+ messages in thread
From: Michael Wood @ 2016-05-06 21:26 UTC (permalink / raw)
  To: toaster

Task.SSTATE_NA and Task.SSTATE_MISS are both valid conditions for the
condition that a Task.OUTCOME_COVERED and Task.OUTCOME_PREBUILT.

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
---
 bitbake/lib/toaster/tests/builds/test_core_image_min.py | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/bitbake/lib/toaster/tests/builds/test_core_image_min.py b/bitbake/lib/toaster/tests/builds/test_core_image_min.py
index 87d29c7..dec0bfa 100644
--- a/bitbake/lib/toaster/tests/builds/test_core_image_min.py
+++ b/bitbake/lib/toaster/tests/builds/test_core_image_min.py
@@ -115,12 +115,19 @@ class BuildCoreImageMinimal(BuildTest):
     # be 0 (SSTATE_NA) - tc=833
     def test_Task_If_Outcome_1_3_Sstate_Result_Must_Be_0(self):
         tasks = Task.objects.filter(
-            outcome__in=(1, 3)).values('id', 'sstate_result')
+            outcome__in=(Task.OUTCOME_COVERED,
+                         Task.OUTCOME_PREBUILT)).values('id',
+                                                        'task_name',
+                                                        'sstate_result')
         cnt_err = []
 
         for task in tasks:
-            if (task['sstate_result'] != 0):
-                cnt_err.append(task['id'])
+            if (task['sstate_result'] != Task.SSTATE_NA and
+                    task['sstate_result'] != Task.SSTATE_MISS):
+                cnt_err.append({'id': task['id'],
+                                'name': task['task_name'],
+                                'sstate_result': task['sstate_result'],
+                               })
 
         self.assertEqual(len(cnt_err),
                          0,
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v4 0/6] Build tests
  2016-05-06 21:26 [PATCH v4 0/6] Build tests Michael Wood
                   ` (5 preceding siblings ...)
  2016-05-06 21:26 ` [PATCH v4 6/6] toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833 Michael Wood
@ 2016-05-09 13:52 ` Michael Wood
  2016-05-16 17:21   ` Michael Wood
  6 siblings, 1 reply; 10+ messages in thread
From: Michael Wood @ 2016-05-09 13:52 UTC (permalink / raw)
  To: toaster@yoctoproject.org

pushed on to the branch poky-contrib michael/toaster/build-tests to fix 
the typo in first patch: s/toaster1.sqlite/toaster.sqlite/

Thanks,

Michael

On 06/05/16 22:26, Michael Wood wrote:
> Changes since v3:
>   - Make sure config_file is initialised
>   - Add a README file to explain how to run the tests
>
> Michael Wood (6):
>    toaster: Remove DATABASE_URL being passed around as an environment var
>    toaster: runbuilds move the execution sequence out of the poll loop
>    toaster: Add a specific test settings file
>    toaster: tests Add a BuildTest helper class
>    toaster: tests build Add a test for a build of core-image-minimal
>    toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833
>
>   bitbake/bin/toaster                                |   2 -
>   bitbake/lib/bb/ui/buildinfohelper.py               |  20 +-
>   .../bldcontrol/management/commands/runbuilds.py    |  30 +-
>   bitbake/lib/toaster/tests/builds/README            |  14 +
>   bitbake/lib/toaster/tests/builds/__init__.py       |   0
>   bitbake/lib/toaster/tests/builds/buildtest.py      | 134 +++++++
>   .../toaster/tests/builds/test_core_image_min.py    | 396 +++++++++++++++++++++
>   .../toastermain/management/commands/get-dburl.py   |   9 -
>   bitbake/lib/toaster/toastermain/settings-test.py   |  41 +++
>   bitbake/lib/toaster/toastermain/settings.py        |  67 +---
>   10 files changed, 621 insertions(+), 92 deletions(-)
>   create mode 100644 bitbake/lib/toaster/tests/builds/README
>   create mode 100644 bitbake/lib/toaster/tests/builds/__init__.py
>   create mode 100644 bitbake/lib/toaster/tests/builds/buildtest.py
>   create mode 100644 bitbake/lib/toaster/tests/builds/test_core_image_min.py
>   delete mode 100644 bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
>   create mode 100644 bitbake/lib/toaster/toastermain/settings-test.py
>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v4 0/6] Build tests
  2016-05-09 13:52 ` [PATCH v4 0/6] Build tests Michael Wood
@ 2016-05-16 17:21   ` Michael Wood
  2016-05-19 13:01     ` Smith, Elliot
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Wood @ 2016-05-16 17:21 UTC (permalink / raw)
  To: toaster@yoctoproject.org

Re-based on toaster-next and pushed onto poky-contrib 
michael/toaster/build-tests

Thanks,

Michael

On 09/05/16 14:52, Michael Wood wrote:
> pushed on to the branch poky-contrib michael/toaster/build-tests to 
> fix the typo in first patch: s/toaster1.sqlite/toaster.sqlite/
>
> Thanks,
>
> Michael
>
> On 06/05/16 22:26, Michael Wood wrote:
>> Changes since v3:
>>   - Make sure config_file is initialised
>>   - Add a README file to explain how to run the tests
>>
>> Michael Wood (6):
>>    toaster: Remove DATABASE_URL being passed around as an environment 
>> var
>>    toaster: runbuilds move the execution sequence out of the poll loop
>>    toaster: Add a specific test settings file
>>    toaster: tests Add a BuildTest helper class
>>    toaster: tests build Add a test for a build of core-image-minimal
>>    toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833
>>
>>   bitbake/bin/toaster                                |   2 -
>>   bitbake/lib/bb/ui/buildinfohelper.py               |  20 +-
>>   .../bldcontrol/management/commands/runbuilds.py    |  30 +-
>>   bitbake/lib/toaster/tests/builds/README            |  14 +
>>   bitbake/lib/toaster/tests/builds/__init__.py       |   0
>>   bitbake/lib/toaster/tests/builds/buildtest.py      | 134 +++++++
>>   .../toaster/tests/builds/test_core_image_min.py    | 396 
>> +++++++++++++++++++++
>>   .../toastermain/management/commands/get-dburl.py   |   9 -
>>   bitbake/lib/toaster/toastermain/settings-test.py   |  41 +++
>>   bitbake/lib/toaster/toastermain/settings.py        |  67 +---
>>   10 files changed, 621 insertions(+), 92 deletions(-)
>>   create mode 100644 bitbake/lib/toaster/tests/builds/README
>>   create mode 100644 bitbake/lib/toaster/tests/builds/__init__.py
>>   create mode 100644 bitbake/lib/toaster/tests/builds/buildtest.py
>>   create mode 100644 
>> bitbake/lib/toaster/tests/builds/test_core_image_min.py
>>   delete mode 100644 
>> bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
>>   create mode 100644 bitbake/lib/toaster/toastermain/settings-test.py
>>
>



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v4 0/6] Build tests
  2016-05-16 17:21   ` Michael Wood
@ 2016-05-19 13:01     ` Smith, Elliot
  0 siblings, 0 replies; 10+ messages in thread
From: Smith, Elliot @ 2016-05-19 13:01 UTC (permalink / raw)
  To: Michael Wood; +Cc: toaster@yoctoproject.org

[-- Attachment #1: Type: text/plain, Size: 2927 bytes --]

Pushed to toaster-next and submitted to bitbake-devel.

Thanks.
Elliot

On 16 May 2016 at 18:21, Michael Wood <michael.g.wood@intel.com> wrote:

> Re-based on toaster-next and pushed onto poky-contrib
> michael/toaster/build-tests
>
> Thanks,
>
> Michael
>
>
> On 09/05/16 14:52, Michael Wood wrote:
>
>> pushed on to the branch poky-contrib michael/toaster/build-tests to fix
>> the typo in first patch: s/toaster1.sqlite/toaster.sqlite/
>>
>> Thanks,
>>
>> Michael
>>
>> On 06/05/16 22:26, Michael Wood wrote:
>>
>>> Changes since v3:
>>>   - Make sure config_file is initialised
>>>   - Add a README file to explain how to run the tests
>>>
>>> Michael Wood (6):
>>>    toaster: Remove DATABASE_URL being passed around as an environment var
>>>    toaster: runbuilds move the execution sequence out of the poll loop
>>>    toaster: Add a specific test settings file
>>>    toaster: tests Add a BuildTest helper class
>>>    toaster: tests build Add a test for a build of core-image-minimal
>>>    toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833
>>>
>>>   bitbake/bin/toaster                                |   2 -
>>>   bitbake/lib/bb/ui/buildinfohelper.py               |  20 +-
>>>   .../bldcontrol/management/commands/runbuilds.py    |  30 +-
>>>   bitbake/lib/toaster/tests/builds/README            |  14 +
>>>   bitbake/lib/toaster/tests/builds/__init__.py       |   0
>>>   bitbake/lib/toaster/tests/builds/buildtest.py      | 134 +++++++
>>>   .../toaster/tests/builds/test_core_image_min.py    | 396
>>> +++++++++++++++++++++
>>>   .../toastermain/management/commands/get-dburl.py   |   9 -
>>>   bitbake/lib/toaster/toastermain/settings-test.py   |  41 +++
>>>   bitbake/lib/toaster/toastermain/settings.py        |  67 +---
>>>   10 files changed, 621 insertions(+), 92 deletions(-)
>>>   create mode 100644 bitbake/lib/toaster/tests/builds/README
>>>   create mode 100644 bitbake/lib/toaster/tests/builds/__init__.py
>>>   create mode 100644 bitbake/lib/toaster/tests/builds/buildtest.py
>>>   create mode 100644
>>> bitbake/lib/toaster/tests/builds/test_core_image_min.py
>>>   delete mode 100644
>>> bitbake/lib/toaster/toastermain/management/commands/get-dburl.py
>>>   create mode 100644 bitbake/lib/toaster/toastermain/settings-test.py
>>>
>>>
>>
> ---------------------------------------------------------------------
> Intel Corporation (UK) Limited
> Registered No. 1134945 (England)
> Registered Office: Pipers Way, Swindon SN3 1RJ
> VAT No: 860 2173 47
>
> This e-mail and any attachments may contain confidential material for
> the sole use of the intended recipient(s). Any review or distribution
> by others is strictly prohibited. If you are not the intended
> recipient, please contact the sender and delete all copies.
>
>


-- 
Elliot Smith
Software Engineer
Intel Open Source Technology Centre

[-- Attachment #2: Type: text/html, Size: 3737 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-05-19 13:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-06 21:26 [PATCH v4 0/6] Build tests Michael Wood
2016-05-06 21:26 ` [PATCH v4 1/6] toaster: Remove DATABASE_URL being passed around as an environment var Michael Wood
2016-05-06 21:26 ` [PATCH v4 2/6] toaster: runbuilds move the execution sequence out of the poll loop Michael Wood
2016-05-06 21:26 ` [PATCH v4 3/6] toaster: Add a specific test settings file Michael Wood
2016-05-06 21:26 ` [PATCH v4 4/6] toaster: tests Add a BuildTest helper class Michael Wood
2016-05-06 21:26 ` [PATCH v4 5/6] toaster: tests build Add a test for a build of core-image-minimal Michael Wood
2016-05-06 21:26 ` [PATCH v4 6/6] toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833 Michael Wood
2016-05-09 13:52 ` [PATCH v4 0/6] Build tests Michael Wood
2016-05-16 17:21   ` Michael Wood
2016-05-19 13:01     ` Smith, Elliot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.