mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
dtoc: Convert _drivers to a dict
At present this member holds a simple list of driver names. Update it to be a dict of DriverInfo, with the name being the key. This will allow more information to be added about each driver, in future patches. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
161dac1dd8
commit
7d637c122d
2 changed files with 32 additions and 4 deletions
|
@ -906,3 +906,13 @@ U_BOOT_DEVICE(spl_test2) = {
|
|||
with test_util.capture_sys_output() as (stdout, stderr):
|
||||
dtb_platdata.run_steps(['struct'], dtb_file, False, output, True,
|
||||
[driver_fn])
|
||||
|
||||
def testDriver(self):
|
||||
"""Test the Driver class"""
|
||||
drv1 = dtb_platdata.Driver('fred')
|
||||
drv2 = dtb_platdata.Driver('mary')
|
||||
drv3 = dtb_platdata.Driver('fred')
|
||||
self.assertEqual("Driver(name='fred')", str(drv1))
|
||||
self.assertEqual(drv1, drv3)
|
||||
self.assertNotEqual(drv1, drv2)
|
||||
self.assertNotEqual(drv2, drv3)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue