From 765280660b3e6cabb64dab70eb54eda18ee3fd08 Mon Sep 17 00:00:00 2001 From: Kienan Stewart Date: Thu, 21 Sep 2023 11:49:27 -0400 Subject: [PATCH] tests: Add POPT_CFLAGS to gen-ust-events-ns and gen-ns-events MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Observed issue ============== When building in an environment where popt was in a non-standard location, the builds for these two test binaries failed with the following error: ``` gen-ns-events.cpp:19:10: fatal error: popt.h: No such file or directory 19 | #include | ^~~~~~~~ ``` Solution ======== Set the binary-specific CPPFLAGS in the `Makefile.am` Known drawbacks =============== None Change-Id: I5563e24f330be86d630c68c32eaafaedf53a6c87 Signed-off-by: Kienan Stewart Signed-off-by: Jérémie Galarneau --- tests/utils/testapp/gen-ns-events/Makefile.am | 1 + tests/utils/testapp/gen-ust-events-ns/Makefile.am | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/utils/testapp/gen-ns-events/Makefile.am b/tests/utils/testapp/gen-ns-events/Makefile.am index 5c1cddefe..b556aa96f 100644 --- a/tests/utils/testapp/gen-ns-events/Makefile.am +++ b/tests/utils/testapp/gen-ns-events/Makefile.am @@ -5,6 +5,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils -I$(srcdir) \ noinst_PROGRAMS = gen-ns-events gen_ns_events_SOURCES = gen-ns-events.cpp +gen_ns_events_CPPFLAGS = $(POPT_CFLAGS) $(AM_CPPFLAGS) gen_ns_events_LDADD = \ $(top_builddir)/tests/utils/libtestutils.la \ $(DL_LIBS) $(POPT_LIBS) diff --git a/tests/utils/testapp/gen-ust-events-ns/Makefile.am b/tests/utils/testapp/gen-ust-events-ns/Makefile.am index 22242fb92..1e0a80c4e 100644 --- a/tests/utils/testapp/gen-ust-events-ns/Makefile.am +++ b/tests/utils/testapp/gen-ust-events-ns/Makefile.am @@ -17,6 +17,7 @@ gen_ust_events_ns_SOURCES = \ gen-ust-events-ns.cpp \ tp.c \ tp.h +gen_ust_events_ns_CPPFLAGS = $(POPT_CFLAGS) $(AM_CPPFLAGS) gen_ust_events_ns_LDADD = $(UST_LIBS) -llttng-ust-fork \ $(top_builddir)/tests/utils/libtestutils.la \ $(DL_LIBS) $(POPT_LIBS) -- 2.34.1