summaryrefslogtreecommitdiff
path: root/test/py/tests/test_dm.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2020-07-07 22:58:18 -0400
committerTom Rini <trini@konsulko.com>2020-07-07 22:58:18 -0400
commit0b59138690a93f3d880be3d5aa675f7219376e58 (patch)
treeb139bf8d951a50c2196f3f36dc2f5ab2f3bb1cc7 /test/py/tests/test_dm.py
parent1e88e78177da80fa8e9fa9fc7613657478d61d1e (diff)
parent9b9f10e3ccded02443162980d34be517886b0645 (diff)
Merge branch '2020-07-07-misc-new-features'
- Improve s700 SoC support - Fix building with clang on ARM. - Juno platform updates - fs/dm cmd improvements - Other assorted improvements / fixes
Diffstat (limited to 'test/py/tests/test_dm.py')
-rw-r--r--test/py/tests/test_dm.py22
1 files changed, 20 insertions, 2 deletions
diff --git a/test/py/tests/test_dm.py b/test/py/tests/test_dm.py
index f6fbf8ba4c5..97203b536e1 100644
--- a/test/py/tests/test_dm.py
+++ b/test/py/tests/test_dm.py
@@ -4,14 +4,32 @@
import pytest
@pytest.mark.buildconfigspec('cmd_dm')
-def test_dm_drivers(u_boot_console):
- """Test that each driver in `dm tree` is also listed in `dm drivers`."""
+def test_dm_compat(u_boot_console):
+ """Test that each driver in `dm tree` is also listed in `dm compat`."""
response = u_boot_console.run_command('dm tree')
driver_index = response.find('Driver')
assert driver_index != -1
drivers = (line[driver_index:].split()[0]
for line in response[:-1].split('\n')[2:])
+ response = u_boot_console.run_command('dm compat')
+ for driver in drivers:
+ assert driver in response
+
+@pytest.mark.buildconfigspec('cmd_dm')
+def test_dm_drivers(u_boot_console):
+ """Test that each driver in `dm compat` is also listed in `dm drivers`."""
+ response = u_boot_console.run_command('dm compat')
+ drivers = (line[:20].rstrip() for line in response[:-1].split('\n')[2:])
+ response = u_boot_console.run_command('dm drivers')
+ for driver in drivers:
+ assert driver in response
+
+@pytest.mark.buildconfigspec('cmd_dm')
+def test_dm_static(u_boot_console):
+ """Test that each driver in `dm static` is also listed in `dm drivers`."""
+ response = u_boot_console.run_command('dm static')
+ drivers = (line[:25].rstrip() for line in response[:-1].split('\n')[2:])
response = u_boot_console.run_command('dm drivers')
for driver in drivers:
assert driver in response