From: Asherah Connor Date: Wed, 24 Feb 2021 14:23:23 +1100 Subject: [PATCH v4 4/5] test: qemu: add simple test for cmd_qfw In-Reply-To: <20210224032323.15798-1-ashe@kivikakk.ee> References: <20210224032323.15798-1-ashe@kivikakk.ee> Message-ID: <20210224032323.15798-5-ashe@kivikakk.ee> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Asherah Connor --- (no changes since v1) test/py/tests/test_qfw.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 test/py/tests/test_qfw.py diff --git a/test/py/tests/test_qfw.py b/test/py/tests/test_qfw.py new file mode 100644 index 0000000000..a2631a0fa6 --- /dev/null +++ b/test/py/tests/test_qfw.py @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (c) 2021, Asherah Connor + +# Test qfw command implementation + +import pytest + + at pytest.mark.buildconfigspec('cmd_qfw') +def test_qfw_cpus(u_boot_console): + "Test QEMU firmware config reports the CPU count correctly." + + output = u_boot_console.run_command('qfw cpus') + assert '1 cpu(s) online' in output + + at pytest.mark.buildconfigspec('cmd_qfw') +def test_qfw_list(u_boot_console): + "Test QEMU firmware config lists devices." + + output = u_boot_console.run_command('qfw list') + assert 'bootorder' in output + assert 'etc/table-loader' in output -- 2.20.1