1 # SPDX-License-Identifier: GPL-2.0+
4 # Test qfw command implementation
8 @pytest.mark.buildconfigspec('cmd_qfw')
9 def test_qfw_cpus(u_boot_console):
10 "Test QEMU firmware config reports the CPU count."
12 output = u_boot_console.run_command('qfw cpus')
13 # The actual number varies depending on the board under test, so only
14 # assert a non-zero output.
15 assert 'cpu(s) online' in output
16 assert '0 cpu(s) online' not in output
18 @pytest.mark.buildconfigspec('cmd_qfw')
19 def test_qfw_list(u_boot_console):
20 "Test QEMU firmware config lists devices."
22 output = u_boot_console.run_command('qfw list')
24 # 1) 'test-one', from the sandbox driver, or
25 # 2) 'bootorder', found in every real QEMU implementation.
26 assert ("bootorder" in output) or ("test-one" in output)