diff options
author | Tom Rini <trini@konsulko.com> | 2021-04-13 09:50:45 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-04-13 09:50:45 -0400 |
commit | a94ab561e2f49a80d8579930e840b810ab1a1330 (patch) | |
tree | 77913e7bd9309afa6b2ddc6f3e3e49827da2025c /test/py | |
parent | 3b676a1662ac6b54d1e97ea40a0c41ee0925ffe3 (diff) | |
parent | 8c4e3b79bd0bb76eea16869e9666e19047c0d005 (diff) |
Merge branch '2021-04-13-assorted-improvements'
- A large assortment of bug fixes, code cleanups and a few feature
enhancements.
Diffstat (limited to 'test/py')
-rw-r--r-- | test/py/tests/test_qfw.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/py/tests/test_qfw.py b/test/py/tests/test_qfw.py new file mode 100644 index 00000000000..8b668c9721a --- /dev/null +++ b/test/py/tests/test_qfw.py @@ -0,0 +1,26 @@ +# SPDX-License-Identifier: GPL-2.0+ +# Copyright (c) 2021, Asherah Connor <ashe@kivikakk.ee> + +# Test qfw command implementation + +import pytest + +@pytest.mark.buildconfigspec('cmd_qfw') +def test_qfw_cpus(u_boot_console): + "Test QEMU firmware config reports the CPU count." + + output = u_boot_console.run_command('qfw cpus') + # The actual number varies depending on the board under test, so only + # assert a non-zero output. + assert 'cpu(s) online' in output + assert '0 cpu(s) online' not in output + +@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 either: + # 1) 'test-one', from the sandbox driver, or + # 2) 'bootorder', found in every real QEMU implementation. + assert ("bootorder" in output) or ("test-one" in output) |