aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2019-02-10 20:15:58 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2019-02-10 20:15:58 +0100
commit74dec7c69ae961f98e0a91da9fc3f6214183467a (patch)
tree4ff7444d46a5519ba47352965cedc7ea14116251 /Makefile.am
parent8b7ef9a86d712f0939d1170b5abfe9af13b1873e (diff)
downloadblogc-74dec7c69ae961f98e0a91da9fc3f6214183467a.tar.gz
blogc-74dec7c69ae961f98e0a91da9fc3f6214183467a.tar.bz2
blogc-74dec7c69ae961f98e0a91da9fc3f6214183467a.zip
blogc: sysinfo: added tests
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am60
1 files changed, 59 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am
index f83d6ed..c75fc30 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -480,6 +480,8 @@ if USE_LD_WRAP
check_PROGRAMS += \
tests/blogc/check_funcvars \
tests/blogc/check_loader \
+ tests/blogc/check_sysinfo \
+ tests/blogc/check_sysinfo2 \
tests/common/check_stdin \
$(NULL)
@@ -495,7 +497,6 @@ tests_blogc_check_funcvars_LDFLAGS = \
-no-install \
-Wl,--wrap=bc_file_get_contents \
$(NULL)
-#-Wl,--wrap=bc_file_get_contents
tests_blogc_check_funcvars_LDADD = \
$(CMOCKA_LIBS) \
@@ -522,6 +523,63 @@ tests_blogc_check_loader_LDADD = \
libblogc_common.la \
$(NULL)
+tests_blogc_check_sysinfo_SOURCES = \
+ tests/blogc/check_sysinfo.c \
+ $(NULL)
+
+tests_blogc_check_sysinfo_CFLAGS = \
+ $(CMOCKA_CFLAGS) \
+ $(NULL)
+
+tests_blogc_check_sysinfo_LDFLAGS = \
+ -no-install \
+ -Wl,--wrap=bc_file_get_contents \
+ -Wl,--wrap=gethostname \
+ $(NULL)
+
+if HAVE_UNISTD_H
+if HAVE_SYS_TYPES_H
+if HAVE_PWD_H
+tests_blogc_check_sysinfo_LDFLAGS += \
+ -Wl,--wrap=geteuid \
+ -Wl,--wrap=getpwuid \
+ $(NULL)
+endif
+endif
+endif
+
+if HAVE_TIME_H
+tests_blogc_check_sysinfo_LDFLAGS += \
+ -Wl,--wrap=time \
+ -Wl,--wrap=gmtime \
+ $(NULL)
+endif
+
+tests_blogc_check_sysinfo_LDADD = \
+ $(CMOCKA_LIBS) \
+ libblogc.la \
+ libblogc_common.la \
+ $(NULL)
+
+tests_blogc_check_sysinfo2_SOURCES = \
+ tests/blogc/check_sysinfo2.c \
+ $(NULL)
+
+tests_blogc_check_sysinfo2_CFLAGS = \
+ $(CMOCKA_CFLAGS) \
+ $(NULL)
+
+tests_blogc_check_sysinfo2_LDFLAGS = \
+ -no-install \
+ -Wl,--wrap=bc_file_get_contents \
+ $(NULL)
+
+tests_blogc_check_sysinfo2_LDADD = \
+ $(CMOCKA_LIBS) \
+ libblogc.la \
+ libblogc_common.la \
+ $(NULL)
+
tests_common_check_stdin_SOURCES = \
tests/common/check_stdin.c \
$(NULL)