[oe-commits] [bitbake] 17/20: toaster: add eventreplay test case for zlib

git at git.openembedded.org git at git.openembedded.org
Fri Nov 4 12:55:57 UTC 2016


rpurdie pushed a commit to branch master
in repository bitbake.

commit c922f4904301174cc72ba35e76870fbf964082cf
Author: Ed Bartosh <ed.bartosh at linux.intel.com>
AuthorDate: Mon Oct 31 16:40:39 2016 +0000

    toaster: add eventreplay test case for zlib
    
    Run toaster-eventreplay with zlib.events.
    Check if zlib build and package present in Toaster database.
    
    Signed-off-by: Ed Bartosh <ed.bartosh at linux.intel.com>
    Signed-off-by: Michael Wood <michael.g.wood at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/toaster/tests/eventreplay/__init__.py | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/lib/toaster/tests/eventreplay/__init__.py b/lib/toaster/tests/eventreplay/__init__.py
index 792f07d..6956619 100644
--- a/lib/toaster/tests/eventreplay/__init__.py
+++ b/lib/toaster/tests/eventreplay/__init__.py
@@ -34,7 +34,7 @@ from pathlib import Path
 
 from django.test import TestCase
 
-from orm.models import Target_Installed_Package
+from orm.models import Target_Installed_Package, Package, Build
 
 class EventReplay(TestCase):
     """Base class for eventreplay test cases"""
@@ -85,3 +85,13 @@ class CoreImageMinimalEventReplay(EventReplay):
                                     'update-alternatives-opkg',
                                     'update-rc.d', 'util-linux-libblkid',
                                     'util-linux-libuuid', 'v86d', 'zlib'])
+
+class ZlibEventReplay(EventReplay):
+    """Replay zlib events"""
+
+    def test_replay_zlib(self):
+        """Test if zlib build and package are in the database"""
+        self._replay("zlib.events")
+
+        self.assertEqual(Build.objects.last().target_set.last().target, "zlib")
+        self.assertTrue('zlib' in Package.objects.values_list('name', flat=True))

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list