diff options
Diffstat (limited to 'tests/integration')
| -rw-r--r-- | tests/integration/harness.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/integration/harness.py b/tests/integration/harness.py index 03a0561..122c36d 100644 --- a/tests/integration/harness.py +++ b/tests/integration/harness.py | |||
| @@ -121,6 +121,7 @@ class Tracker: | |||
| 121 | all: LeakSanitizer reports from an exit handler, so a killed tracker | 121 | all: LeakSanitizer reports from an exit handler, so a killed tracker |
| 122 | reports nothing and the suite passes over leaks it never looked for. | 122 | reports nothing and the suite passes over leaks it never looked for. |
| 123 | """ | 123 | """ |
| 124 | refused_to_exit = False | ||
| 124 | if self.process is not None and self.process.poll() is None: | 125 | if self.process is not None and self.process.poll() is None: |
| 125 | self.process.send_signal(signal.SIGINT) | 126 | self.process.send_signal(signal.SIGINT) |
| 126 | try: | 127 | try: |
| @@ -128,11 +129,16 @@ class Tracker: | |||
| 128 | except subprocess.TimeoutExpired: | 129 | except subprocess.TimeoutExpired: |
| 129 | self.process.kill() | 130 | self.process.kill() |
| 130 | self.process.wait() | 131 | self.process.wait() |
| 132 | refused_to_exit = True | ||
| 131 | complaints = [ | 133 | complaints = [ |
| 132 | line | 134 | line |
| 133 | for line in self.output().splitlines() | 135 | for line in self.output().splitlines() |
| 134 | if "Sanitizer" in line or "runtime error" in line or line.startswith("ERROR") | 136 | if "Sanitizer" in line or "runtime error" in line or line.startswith("ERROR") |
| 135 | ] | 137 | ] |
| 138 | if refused_to_exit: | ||
| 139 | # Killing it throws away whatever the sanitizer had to say on the | ||
| 140 | # way out, so a test that ends this way has checked nothing. | ||
| 141 | complaints.append("the tracker did not exit within 5 s of SIGINT and had to be killed") | ||
| 136 | self._cleanup() | 142 | self._cleanup() |
| 137 | return complaints | 143 | return complaints |
| 138 | 144 | ||
