[libosinfo PATCH 2/2] tests: Fix `make check` breakage on FreeBSD 11

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As pointed out by Daniel Berrangé, 4c9224889 broke `make check` on BSD
because it caused the generated test-os binary to contain 2 copies of
the osinfo_product.c code, one linked in the test and the other from
libosinfo.so.

Now that we've a way to export our private symbols to be used in our
tests, let's export osinfo_product_foreach_related and remove the
osinfo_product.c inclusion.

Signed-off-by: Fabiano Fidêncio <fidencio@xxxxxxxxxx>
---
 osinfo/libosinfo_private.syms | 3 +++
 tests/Makefile.am             | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/osinfo/libosinfo_private.syms b/osinfo/libosinfo_private.syms
index df8c37e..d4fbf3e 100644
--- a/osinfo/libosinfo_private.syms
+++ b/osinfo/libosinfo_private.syms
@@ -5,3 +5,6 @@
  *
  * Keep this file sorted by header name, then by symbols with each header!
  */
+
+# osinfo_product_private.h
+osinfo_product_foreach_related;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index b239ecd..a64417b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -60,7 +60,7 @@ test_product_SOURCES = test-product.c
 
 test_os_LDADD = $(COMMON_LDADD)
 test_os_CFLAGS = $(COMMON_CFLAGS)
-test_os_SOURCES = test-os.c ../osinfo/osinfo_product.c
+test_os_SOURCES = test-os.c
 
 test_productfilter_LDADD = $(COMMON_LDADD)
 test_productfilter_CFLAGS = $(COMMON_CFLAGS)
-- 
2.19.1

_______________________________________________
Libosinfo mailing list
Libosinfo@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libosinfo




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux