File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 553) Invocation of the test_runner.
66"""
77
8+ import signal
89import sys
910import time
1011import datetime
1112import argparse
13+ from signal_handler import signal_handler
1214from parsing .params_handler import ParamsHandler
1315from test_list_builder import TestListBuilder
1416from test_runner import TestRunner
@@ -94,4 +96,8 @@ def main():
9496
9597
9698if __name__ == '__main__' :
99+
100+ signal .signal (signal .SIGINT , signal_handler )
101+ signal .signal (signal .SIGTSTP , signal_handler )
102+
97103 main ()
Original file line number Diff line number Diff line change 1+ """
2+ This file consists of functions for handling
3+ signals. Signal handling is required for the
4+ graceful exit of the test framework
5+ """
6+
7+ def signal_handler (signalNumber , frame ):
8+ """
9+ Function for handling signal and raising the
10+ SystemExit call for graceful exit of the test
11+ framework
12+ Args:
13+ signalNumber (int): The signal number of the signal caught
14+ frame: current stack frame, None or stack frame object.
15+ """
16+ print ("Signal Received" ,signalNumber )
17+ raise SystemExit ('Exiting...' )
18+ return
You can’t perform that action at this time.
0 commit comments