summaryrefslogtreecommitdiff
path: root/Makefile-tests.am
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2018-06-06 14:34:01 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-07 17:28:49 +0000
commit6f3b5620de29654624eea1c3e6691c46be058dc8 (patch)
tree401746ad66d3a4b6394b5635505828258c582d93 /Makefile-tests.am
parent6ea21696a3373d32ea759a794c9673075539e7c4 (diff)
downloadostree-6f3b5620de29654624eea1c3e6691c46be058dc8.tar.gz
tests: Add test for including ostree.h
Closes: #1615 Approved by: jlebon
Diffstat (limited to 'Makefile-tests.am')
-rw-r--r--Makefile-tests.am9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile-tests.am b/Makefile-tests.am
index 1bdad4c1..97a71d0d 100644
--- a/Makefile-tests.am
+++ b/Makefile-tests.am
@@ -242,7 +242,7 @@ endif
_installed_or_uninstalled_test_programs = tests/test-varint tests/test-ot-unix-utils tests/test-bsdiff tests/test-mutable-tree \
tests/test-keyfile-utils tests/test-ot-opt-utils tests/test-ot-tool-util \
tests/test-gpg-verify-result tests/test-checksum tests/test-lzma tests/test-rollsum \
- tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo
+ tests/test-basic-c tests/test-sysroot-c tests/test-pull-c tests/test-repo tests/test-include-ostree-h
if USE_AVAHI
test_programs += tests/test-repo-finder-avahi
@@ -278,6 +278,13 @@ tests_test_bloom_SOURCES = src/libostree/ostree-bloom.c tests/test-bloom.c
tests_test_bloom_CFLAGS = $(TESTS_CFLAGS)
tests_test_bloom_LDADD = $(TESTS_LDADD)
+tests_test_include_ostree_h_SOURCES = tests/test-include-ostree-h.c
+# Don't use TESTS_CFLAGS so we test if the public header can be included by external programs
+tests_test_include_ostree_h_CFLAGS = $(AM_CFLAGS) $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/src/libostree -I$(builddir)/src/libostree
+# Don't define OSTREE_COMPILATION so that we're compiling as if it's an external program
+tests_test_include_ostree_h_CPPFLAGS = $(AM_CPPFLAGS) -UOSTREE_COMPILATION
+tests_test_include_ostree_h_LDADD = $(TESTS_LDADD)
+
if USE_AVAHI
tests_test_repo_finder_avahi_SOURCES = src/libostree/ostree-repo-finder-avahi-parser.c tests/test-repo-finder-avahi.c
tests_test_repo_finder_avahi_CFLAGS = $(TESTS_CFLAGS)