summaryrefslogtreecommitdiff
path: root/test/py
diff options
context:
space:
mode:
authorNiel Fourie <lusus@denx.de>2020-03-30 18:22:58 +0300
committerTom Rini <trini@konsulko.com>2020-07-07 22:37:13 +0300
commite369790843d87c2089ae93cd2345723a95ace71d (patch)
tree5a9c0e680c79b08f0d8c46f34ae3a60f3a2c9259 /test/py
parent2e48836895d1246b40f7e166695651882e7bb68c (diff)
downloadu-boot-e369790843d87c2089ae93cd2345723a95ace71d.tar.xz
cmd: blkls: Add blkls command
Add a command to print a list of available block device drivers, and for each, the list of known block devices. Signed-off-by: Niel Fourie <lusus@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'test/py')
-rw-r--r--test/py/tests/test_lsblk.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/py/tests/test_lsblk.py b/test/py/tests/test_lsblk.py
new file mode 100644
index 0000000000..40ffe01263
--- /dev/null
+++ b/test/py/tests/test_lsblk.py
@@ -0,0 +1,13 @@
+# SPDX-License-Identifier: GPL-2.0+
+# Copyright (C) 2020
+# Niel Fourie, DENX Software Engineering, lusus@denx.de
+
+import pytest
+
+@pytest.mark.buildconfigspec('blk')
+@pytest.mark.buildconfigspec('cmd_lsblk')
+def test_lsblk(u_boot_console):
+ """Test that `lsblk` prints a result which includes `host`."""
+ output = u_boot_console.run_command('lsblk')
+ assert "Block Driver" in output
+ assert "sandbox_host_blk" in output