[2.7] bpo-30283: Backport test_regrtest from master to 2.7 (#1513)

* bpo-30283: regrtest: add --testdir option

* bpo-30283: Backport _testcapi.raise_signal()

Function used by test_regrtest to simulate an interrupted unit test.

* bpo-30283: Backport test_regrtest from master
3 files changed