test_sandbox_exit.py 668 B

12345678910111213141516171819202122
  1. # Copyright (c) 2015 Stephen Warren
  2. # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved.
  3. #
  4. # SPDX-License-Identifier: GPL-2.0
  5. import pytest
  6. import signal
  7. @pytest.mark.boardspec('sandbox')
  8. @pytest.mark.buildconfigspec('sysreset')
  9. def test_reset(u_boot_console):
  10. """Test that the "reset" command exits sandbox process."""
  11. u_boot_console.run_command('reset', wait_for_prompt=False)
  12. assert(u_boot_console.validate_exited())
  13. @pytest.mark.boardspec('sandbox')
  14. def test_ctrl_c(u_boot_console):
  15. """Test that sending SIGINT to sandbox causes it to exit."""
  16. u_boot_console.kill(signal.SIGINT)
  17. assert(u_boot_console.validate_exited())