diff --git a/avocado/core/exceptions.py b/avocado/core/exceptions.py index cb1f303c0df413bebc7af6319eb1abce4f38549b..74ad5e100120cf022311e5448df435f093d7de59 100644 --- a/avocado/core/exceptions.py +++ b/avocado/core/exceptions.py @@ -83,6 +83,14 @@ class TestTimeoutError(TestBaseException): status = "ERROR" +class TestInterruptedError(TestBaseException): + + """ + Indicates that the test was interrupted by the user (Ctrl+C) + """ + status = "INTERRUPTED" + + class TestAbortError(TestBaseException): """ diff --git a/avocado/core/status.py b/avocado/core/status.py index 44f1993aec134573f9f52bac4432a8d1b3466f51..d21fe2671bce874743dcfd16b5d4a550fe14afbb 100644 --- a/avocado/core/status.py +++ b/avocado/core/status.py @@ -25,7 +25,8 @@ mapping = {"TEST_NA": True, "START": True, "ALERT": False, "RUNNING": False, - "NOSTATUS": False} + "NOSTATUS": False, + "INTERRUPTED": False} feedback = { # Test did not advertise current status, but process running the test is