Test the sandbox port's implementation of the reset command and SIGHUP handling. These should both cause the U-Boot process to exit gracefully.
Signed-off-by: Stephen Warren <swar...@wwwdotorg.org> Signed-off-by: Stephen Warren <swar...@nvidia.com> --- test/py/test_sandbox_exit.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/py/test_sandbox_exit.py diff --git a/test/py/test_sandbox_exit.py b/test/py/test_sandbox_exit.py new file mode 100644 index 000000000000..7359a73715cd --- /dev/null +++ b/test/py/test_sandbox_exit.py @@ -0,0 +1,20 @@ +# Copyright (c) 2015 Stephen Warren +# Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. +# +# SPDX-License-Identifier: GPL-2.0 + +import pytest +import signal + +@pytest.mark.boardspec("sandbox") +@pytest.mark.buildconfigspec("reset") +def test_reset(uboot_console): + uboot_console.run_command("reset", wait_for_prompt=False) + assert(uboot_console.validate_exited()) + uboot_console.ensure_spawned() + +@pytest.mark.boardspec("sandbox") +def test_ctrlc(uboot_console): + uboot_console.kill(signal.SIGINT) + assert(uboot_console.validate_exited()) + uboot_console.ensure_spawned() -- 2.6.3 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot