Changeset 005b185 in mod_gnutls for test/runtest.py


Ignore:
Timestamp:
Jan 28, 2020, 4:14:05 AM (17 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
asyncio, master, proxy-ticket
Children:
f73eeb7
Parents:
e46d203
git-author:
Fiona Klute <fiona.klute@…> (01/28/20 04:11:41)
git-committer:
Fiona Klute <fiona.klute@…> (01/28/20 04:14:05)
Message:

Fail tests running with Valgrind if Valgrind reports errors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/runtest.py

    re46d203 r005b185  
    22# PYTHON_ARGCOMPLETE_OK
    33
    4 # Copyright 2019 Fiona Klute
     4# Copyright 2019-2020 Fiona Klute
    55#
    66# Licensed under the Apache License, Version 2.0 (the "License");
     
    2525
    2626import mgstest.hooks
     27import mgstest.valgrind
    2728from mgstest import lockfile, TestExpectationFailed
    2829from mgstest.services import ApacheService, TestService
     
    206207                          response_log=args.log_responses)
    207208
     209    if valgrind_log:
     210        with open(valgrind_log) as log:
     211            errors = mgstest.valgrind.error_summary(log)
     212            print(f'Valgrind summary: {errors[0]} errors, '
     213                  f'{errors[1]} suppressed')
     214            if errors[0] > 0:
     215                sys.exit(ord('V'))
     216
    208217
    209218
Note: See TracChangeset for help on using the changeset viewer.