mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-28 17:50:07 +01:00
tools: we don't need a core file for failed option parser tests
SIGQUIT which we send to any successful test of libinput debug-event will trigger a coredump. We don't need that one. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
dd96d6b900
commit
d7b1ebef4b
1 changed files with 6 additions and 1 deletions
|
|
@ -26,6 +26,7 @@
|
|||
import argparse
|
||||
import os
|
||||
import unittest
|
||||
import resource
|
||||
import sys
|
||||
import subprocess
|
||||
import time
|
||||
|
|
@ -35,12 +36,16 @@ class TestLibinputTool(unittest.TestCase):
|
|||
libinput_tool = 'libinput'
|
||||
subtool = None
|
||||
|
||||
def _disable_coredump(self):
|
||||
resource.setrlimit(resource.RLIMIT_CORE, (0, 0))
|
||||
|
||||
def run_command(self, args):
|
||||
args = [self.libinput_tool] + args
|
||||
if self.subtool is not None:
|
||||
args.insert(1, self.subtool)
|
||||
|
||||
with subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p:
|
||||
with subprocess.Popen(args, preexec_fn=self._disable_coredump,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE) as p:
|
||||
try:
|
||||
p.wait(0.7)
|
||||
except subprocess.TimeoutExpired:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue