diff options
| author | Ed Bartosh <ed.bartosh@linux.intel.com> | 2016-10-31 16:40:39 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-11-04 12:50:56 +0000 |
| commit | 934c9efa6670f08d9f0b14b496262f372cafab99 (patch) | |
| tree | 84a5df921b3ec1be253557302caeabefdb8306d5 /bitbake/lib/toaster/tests | |
| parent | 3503c5426e0339c2c718dbb7f1bac50480bcbe9e (diff) | |
| download | poky-934c9efa6670f08d9f0b14b496262f372cafab99.tar.gz | |
bitbake: toaster: add eventreplay test case for zlib
Run toaster-eventreplay with zlib.events.
Check if zlib build and package present in Toaster database.
(Bitbake rev: c922f4904301174cc72ba35e76870fbf964082cf)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/tests')
| -rw-r--r-- | bitbake/lib/toaster/tests/eventreplay/__init__.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/tests/eventreplay/__init__.py b/bitbake/lib/toaster/tests/eventreplay/__init__.py index 792f07d5ea..695661947a 100644 --- a/bitbake/lib/toaster/tests/eventreplay/__init__.py +++ b/bitbake/lib/toaster/tests/eventreplay/__init__.py | |||
| @@ -34,7 +34,7 @@ from pathlib import Path | |||
| 34 | 34 | ||
| 35 | from django.test import TestCase | 35 | from django.test import TestCase |
| 36 | 36 | ||
| 37 | from orm.models import Target_Installed_Package | 37 | from orm.models import Target_Installed_Package, Package, Build |
| 38 | 38 | ||
| 39 | class EventReplay(TestCase): | 39 | class EventReplay(TestCase): |
| 40 | """Base class for eventreplay test cases""" | 40 | """Base class for eventreplay test cases""" |
| @@ -85,3 +85,13 @@ class CoreImageMinimalEventReplay(EventReplay): | |||
| 85 | 'update-alternatives-opkg', | 85 | 'update-alternatives-opkg', |
| 86 | 'update-rc.d', 'util-linux-libblkid', | 86 | 'update-rc.d', 'util-linux-libblkid', |
| 87 | 'util-linux-libuuid', 'v86d', 'zlib']) | 87 | 'util-linux-libuuid', 'v86d', 'zlib']) |
| 88 | |||
| 89 | class ZlibEventReplay(EventReplay): | ||
| 90 | """Replay zlib events""" | ||
| 91 | |||
| 92 | def test_replay_zlib(self): | ||
| 93 | """Test if zlib build and package are in the database""" | ||
| 94 | self._replay("zlib.events") | ||
| 95 | |||
| 96 | self.assertEqual(Build.objects.last().target_set.last().target, "zlib") | ||
| 97 | self.assertTrue('zlib' in Package.objects.values_list('name', flat=True)) | ||
