From: Simon Marchi Date: Sat, 4 Sep 2021 23:32:47 +0000 (-0400) Subject: tests: compile all unit tests as C++ X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=488dbb6062973d4990a33284e4717d89a893339d;p=lttng-tools.git tests: compile all unit tests as C++ Change-Id: I9938237cee13a534d5c52288983238c0871dc504 Signed-off-by: Simon Marchi Signed-off-by: Jérémie Galarneau --- diff --git a/include/lttng/action/rate-policy-internal.h b/include/lttng/action/rate-policy-internal.h index 2f8267a31..708892cba 100644 --- a/include/lttng/action/rate-policy-internal.h +++ b/include/lttng/action/rate-policy-internal.h @@ -14,6 +14,7 @@ #include #include + #ifdef __cplusplus extern "C" { #endif diff --git a/include/lttng/kernel-probe-internal.h b/include/lttng/kernel-probe-internal.h index e0b94749e..87d0ab9aa 100644 --- a/include/lttng/kernel-probe-internal.h +++ b/include/lttng/kernel-probe-internal.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/tests/unit/Makefile.am b/tests/unit/Makefile.am index a311bc3e4..e555b0149 100644 --- a/tests/unit/Makefile.am +++ b/tests/unit/Makefile.am @@ -87,7 +87,7 @@ test_session_SOURCES = test_session.cpp test_session_LDADD = $(LIBTAP) $(LIBLTTNG_SESSIOND_COMMON) $(DL_LIBS) if HAVE_LIBLTTNG_UST_CTL -test_session_SOURCES += ust-sigbus.c +test_session_SOURCES += ust-sigbus.cpp test_session_LDADD += $(UST_CTL_LIBS) endif diff --git a/tests/unit/ust-sigbus.c b/tests/unit/ust-sigbus.c deleted file mode 100644 index 3b9dd771d..000000000 --- a/tests/unit/ust-sigbus.c +++ /dev/null @@ -1,11 +0,0 @@ -/* - * Copyright (C) 2021 Mathieu Desnoyers - * - * SPDX-License-Identifier: GPL-2.0-only - * - */ - -#include -#include - -LTTNG_EXPORT DEFINE_LTTNG_UST_SIGBUS_STATE(); diff --git a/tests/unit/ust-sigbus.cpp b/tests/unit/ust-sigbus.cpp new file mode 100644 index 000000000..3b9dd771d --- /dev/null +++ b/tests/unit/ust-sigbus.cpp @@ -0,0 +1,11 @@ +/* + * Copyright (C) 2021 Mathieu Desnoyers + * + * SPDX-License-Identifier: GPL-2.0-only + * + */ + +#include +#include + +LTTNG_EXPORT DEFINE_LTTNG_UST_SIGBUS_STATE();