tests: Add macro guards around new testing APIs
This was overlooked when submitting 37552b998a8b ("pdr: Add contained
entity to an association PDR").
`meson configure -Dabi=deprecated,stable build && meson test -C build`
now links successfully.
Change-Id: I861e478db73528a40088bd19e247cd33e9adc766
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/tests/libpldm_pdr_test.cpp b/tests/libpldm_pdr_test.cpp
index 0254ebf..f98f21f 100644
--- a/tests/libpldm_pdr_test.cpp
+++ b/tests/libpldm_pdr_test.cpp
@@ -1930,6 +1930,7 @@
pldm_entity_association_tree_destroy(tree);
}
+#ifdef LIBPLDM_API_TESTING
TEST(EntityAssociationPDR, testAddContainedEntityRemotePDR)
{
// pldm_entity entities[5]{};
@@ -1986,7 +1987,9 @@
pldm_pdr_destroy(repo);
pldm_entity_association_tree_destroy(tree);
}
+#endif
+#ifdef LIBPLDM_API_TESTING
TEST(EntityAssociationPDR, testAddContainedEntityNew)
{
// pldm_entity entities[5]{};
@@ -2050,3 +2053,4 @@
pldm_pdr_destroy(repo);
pldm_entity_association_tree_destroy(tree);
}
+#endif