aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/Makefile.am
diff options
context:
space:
mode:
authorKamil Dudka <kdudka@redhat.com>2010-07-30 00:47:49 +0200
committerDaniel Stenberg <daniel@haxx.se>2010-07-30 00:51:24 +0200
commitb5c3feda1788301bea7f1dd4f9bb240d13862bd0 (patch)
tree50e6cbe63ec308b53d3bec11456b80832f94f634 /tests/libtest/Makefile.am
parent01c309e186b3f1055d56211d4074f451bf5282bf (diff)
NTLM tests: boost coverage by forcing the hostname
A shared library tests/libtest/.libs/lihostname.so is preloaded in NTLM test-cases to override the system implementation of gethostname(). It makes it possible to test the NTLM authentication for exact match, and this way test the implementation of MD4 and DES. If LD_PRELOAD doesn't work, a debug build willl also workk as debug builds are now made to prefer a specific environment variable and will then return that content as host name instead of the actual one. Kamil wrote the bulk of this, Daniel Stenberg polished it.
Diffstat (limited to 'tests/libtest/Makefile.am')
-rw-r--r--tests/libtest/Makefile.am10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/libtest/Makefile.am b/tests/libtest/Makefile.am
index 70b0f12a4..2a0e3eaa4 100644
--- a/tests/libtest/Makefile.am
+++ b/tests/libtest/Makefile.am
@@ -53,6 +53,16 @@ endif
EXTRA_DIST = test75.pl test307.pl test610.pl test613.pl test1013.pl \
test1022.pl Makefile.inc
+if STATICLIB
+# this means no shared option is enabled so we can disable the LD_PRELOAD
+# attempt
+libhostname_la_CFLAGS = -DDISABLE_PRELOAD
+endif
+
+# we force our own host name, in order to make some tests machine independent
+lib_LTLIBRARIES = libhostname.la
+libhostname_la_SOURCES = sethostname.c
+
# Dependencies (may need to be overriden)
LDADD = $(top_builddir)/lib/libcurl.la
DEPENDENCIES = $(top_builddir)/lib/libcurl.la