blob: 4e333ecedbf83edf4d21d8b4ae2c6cab961c439a [file] [log] [blame]
Stephen Warren472040d2016-01-15 11:15:25 -07001# Copyright (c) 2015 Stephen Warren
2# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
3#
4# SPDX-License-Identifier: GPL-2.0
5
6import pytest
7import signal
8
9@pytest.mark.boardspec('sandbox')
Stephen Warrena82642f2016-07-06 09:04:08 -060010@pytest.mark.buildconfigspec('sysreset')
Stephen Warren472040d2016-01-15 11:15:25 -070011def test_reset(u_boot_console):
Stephen Warrene8debf32016-01-26 13:41:30 -070012 """Test that the "reset" command exits sandbox process."""
Stephen Warren472040d2016-01-15 11:15:25 -070013
14 u_boot_console.run_command('reset', wait_for_prompt=False)
15 assert(u_boot_console.validate_exited())
Stephen Warren472040d2016-01-15 11:15:25 -070016
17@pytest.mark.boardspec('sandbox')
18def test_ctrl_c(u_boot_console):
Stephen Warrene8debf32016-01-26 13:41:30 -070019 """Test that sending SIGINT to sandbox causes it to exit."""
Stephen Warren472040d2016-01-15 11:15:25 -070020
21 u_boot_console.kill(signal.SIGINT)
22 assert(u_boot_console.validate_exited())