From f93b6de52af680004097b55b3440ac0ec0cd81c8 Mon Sep 17 00:00:00 2001 From: Bastian Krause Date: Mon, 14 Oct 2024 18:19:33 +0200 Subject: [PATCH] tests/conftest: stop coordinator/exporter via SIGINT Since labgrid switched to gRPC, SIGTERM prevents coverage from writing its data, use SIGINT instead. Signed-off-by: Bastian Krause --- tests/conftest.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index b56b212fa..0332ad2dd 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,5 @@ import logging -from signal import SIGTERM +from signal import SIGINT import sys import threading @@ -57,9 +57,11 @@ def __init__(self, cwd): def stop(self): logging.info("stopping {self.__class__.__name__} pid=%s", self.spawn.pid) - # let coverage write its data: + # Let coverage write its data: # https://coverage.readthedocs.io/en/latest/subprocess.html#process-termination - self.spawn.kill(SIGTERM) + # Since labgrid switched to gRPC, SIGTERM prevents coverage from writing its data, use + # SIGINT instead. + self.spawn.kill(SIGINT) if not self.spawn.closed: self.spawn.expect(pexpect.EOF) self.spawn.wait()