File: valgrind.py

package info (click to toggle)
libgnatcoll-bindings 25.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 2,412 kB
  • sloc: ada: 18,696; python: 1,597; ansic: 1,422; cpp: 581; makefile: 147; sh: 114
file content (17 lines) | stat: -rw-r--r-- 568 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from e3.testsuite.process import check_call


def check_call_valgrind(driver, cmd, test_name=None, result=None, **kwargs):
    """
    Wrapper for `e3.testsuite.process` that runs the process under Valgrind if
    this is a Valgrind-checked testsuite run. The process exit status will be
    2 if Valgrind finds memory issues.
    """
    if driver.env.valgrind:
        cmd = [
            "valgrind",
            "-q",
            "--error-exitcode=2",
            "--leak-check=full",
        ] + cmd
    return check_call(driver, cmd, test_name, result, **kwargs)