You need to sign in or sign up before continuing.
  • Kirill Smelkov's avatar
    Cancel test run on SIGINT/SIGTERM · b0cf277d
    Kirill Smelkov authored
    In addition to canceling test run is master tells us to do so, also cancel the
    run if interrupted or terminated.
    
    With the following sample .nxdtest
    
        TestCase('sleep', ['sleep', '10'])
    
    before the patch it does not react to CTRL+C:
    
        $ nxdtest
        ...
        >>> sleep
        $ sleep 10
        ^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C# ran 0 test cases.   <-- no reaction to CTRL+C, finishes after 10 seconds
        Traceback (most recent call last):
          File "/home/kirr/src/tools/go/py3.venv2/bin/nxdtest", line 33, in <module>
            sys.exit(load_entry_point('nxdtest', 'console_scripts', 'nxdtest')())
          File "/home/kirr/src/tools/go/py3.venv2/lib/python3.9/site-packages/decorator.py", line 232, in fun
            return caller(func, *(extras + args), **kw)
          File "/home/kirr/src/tools/go/pygolang-master/golang/__init__.py", line 103, in _
            return f(*argv, **kw)
          File "/home/kirr/src/wendelin/nxdtest/nxdtest/__init__.py", line 339, in main
            wg....
    b0cf277d