Kea 2.5.8
check_valgrind.h
Go to the documentation of this file.
1// Copyright (C) 2012-2015 Internet Systems Consortium, Inc. ("ISC")
2//
3// This Source Code Form is subject to the terms of the Mozilla Public
4// License, v. 2.0. If a copy of the MPL was not distributed with this
5// file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
7//
8// If we have the valgrind headers available, we can detect whether
9// valgrind is running. This should normally never be done, as you
10// want the to test the actual code in operation with valgrind.
11//
12// However, there is a limited set of operations where we want to
13// skip some tests if run under valgrind, most notably the
14// EXPECT_DEATH tests, as these would report memory leaks by
15// definition.
16//
17// If the valgrind headers are NOT available, the method checkValgrind()
18// always returns false; i.e. it always pretends the program is run
19// natively
20//
21
22#ifndef UTIL_UNITTESTS_CHECK_VALGRIND_H
23#define UTIL_UNITTESTS_CHECK_VALGRIND_H 1
24
25namespace isc {
26namespace util {
27namespace unittests {
28
40
41} // end namespace unittests
42} // end namespace util
43} // end namespace isc
44
45#endif // UTIL_UNITTESTS_CHECK_VALGRIND_H
bool runningOnValgrind()
Check if the program is run in valgrind.
Defines the logger used by the top-level component of kea-lfc.