From e369790843d87c2089ae93cd2345723a95ace71d Mon Sep 17 00:00:00 2001 From: Niel Fourie Date: Mon, 30 Mar 2020 17:22:58 +0200 Subject: 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 Cc: Simon Glass Cc: Stefan Roese Reviewed-by: Simon Glass Reviewed-by: Stefan Roese --- test/py/tests/test_lsblk.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 test/py/tests/test_lsblk.py (limited to 'test') diff --git a/test/py/tests/test_lsblk.py b/test/py/tests/test_lsblk.py new file mode 100644 index 0000000..40ffe01 --- /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 -- cgit v1.1