Message ID | 1449094708-14784-2-git-send-email-swarren@wwwdotorg.org |
---|---|
State | Superseded |
Delegated to: | Tom Rini |
Headers | show |
On 2 December 2015 at 15:18, Stephen Warren <swarren@wwwdotorg.org> wrote: > 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 <swarren@wwwdotorg.org> > Signed-off-by: Stephen Warren <swarren@nvidia.com> > --- > test/py/test_sandbox_exit.py | 20 ++++++++++++++++++++ > 1 file changed, 20 insertions(+) > create mode 100644 test/py/test_sandbox_exit.py Reviewed-by: Simon Glass <sjg@chromium.org> Tested on chromebook_link, sandbox Tested-by: Simon Glass <sjg@chromium.org>
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()