1472040d5SStephen Warren# Copyright (c) 2015 Stephen Warren 2472040d5SStephen Warren# Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. 3472040d5SStephen Warren# 4472040d5SStephen Warren# SPDX-License-Identifier: GPL-2.0 5472040d5SStephen Warren 6472040d5SStephen Warrenimport pytest 7472040d5SStephen Warrenimport signal 8472040d5SStephen Warren 9472040d5SStephen Warren@pytest.mark.boardspec('sandbox') 10*a82642f3SStephen Warren@pytest.mark.buildconfigspec('sysreset') 11472040d5SStephen Warrendef test_reset(u_boot_console): 12e8debf39SStephen Warren """Test that the "reset" command exits sandbox process.""" 13472040d5SStephen Warren 14472040d5SStephen Warren u_boot_console.run_command('reset', wait_for_prompt=False) 15472040d5SStephen Warren assert(u_boot_console.validate_exited()) 16472040d5SStephen Warren 17472040d5SStephen Warren@pytest.mark.boardspec('sandbox') 18472040d5SStephen Warrendef test_ctrl_c(u_boot_console): 19e8debf39SStephen Warren """Test that sending SIGINT to sandbox causes it to exit.""" 20472040d5SStephen Warren 21472040d5SStephen Warren u_boot_console.kill(signal.SIGINT) 22472040d5SStephen Warren assert(u_boot_console.validate_exited()) 23