summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Baumann <mail@andreasbaumann.cc>2014-10-14 13:53:36 +0200
committerAndreas Baumann <mail@andreasbaumann.cc>2014-10-14 13:53:36 +0200
commit6a2ee0a230b7c7957496ca61ee186901f1af427a (patch)
treefd25aebdf95ab2121de1e2683ceb1e0eac8ac383
parentf5ad804ccd65de18924597e7b397b7b3748cea83 (diff)
downloadcrawler-6a2ee0a230b7c7957496ca61ee186901f1af427a.tar.gz
crawler-6a2ee0a230b7c7957496ca61ee186901f1af427a.tar.bz2
fixed module tests on Linux
-rwxr-xr-xtests/modules/GNUmakefile6
-rwxr-xr-xtests/modules/exec_test2
-rwxr-xr-xtests/modules/testmod/GNUmakefile11
-rwxr-xr-xtests/modules/testmod2/GNUmakefile11
-rwxr-xr-xtests/modules/testmod3/GNUmakefile11
-rwxr-xr-xtests/modules/testmod4/GNUmakefile11
6 files changed, 51 insertions, 1 deletions
diff --git a/tests/modules/GNUmakefile b/tests/modules/GNUmakefile
index 2c4aac9..0048fd6 100755
--- a/tests/modules/GNUmakefile
+++ b/tests/modules/GNUmakefile
@@ -16,6 +16,12 @@ INCLUDE_LIBS = \
$(TOPDIR)/src/libcrawler/libcrawler.a \
-llogger -lcommon
+ifeq ($(WITH_LUA),1)
+INCLUDE_LDFLAGS += \
+ $(TOPDIR)/src/libluaglue/libluaglue.a \
+ $(TOLUA_LDFLAGS)
+endif
+
TEST_CPP_BINS = \
test1$(EXE) \
test2$(EXE) \
diff --git a/tests/modules/exec_test b/tests/modules/exec_test
index 76504c2..9513d65 100755
--- a/tests/modules/exec_test
+++ b/tests/modules/exec_test
@@ -4,5 +4,5 @@ BINARY=$1
TITLE=$2
printf "$BINARY: $TITLE .. "
-LD_LIBRARY_PATH=../../src:../../src/liblogger:../../src/libcrawler:libcommon ./$BINARY >$BINARY.RES 2>&1
+LD_LIBRARY_PATH=../../src:../../src/liblogger:../../src/libcrawler:../../src/libluaglue:../../src/libutil:libcommon ./$BINARY >$BINARY.RES 2>&1
diff $BINARY.MUST $BINARY.RES > $BINARY.DIFF && printf "OK\n" || printf "ERROR\n"
diff --git a/tests/modules/testmod/GNUmakefile b/tests/modules/testmod/GNUmakefile
index 0e95bca..c2dd277 100755
--- a/tests/modules/testmod/GNUmakefile
+++ b/tests/modules/testmod/GNUmakefile
@@ -14,9 +14,20 @@ INCLUDE_CXXFLAGS = \
INCLUDE_LDFLAGS = \
-L$(TOPDIR)/src/libcrawler
+ifeq ($(WITH_LUA),1)
+INCLUDE_LDFLAGS += \
+ -L$(TOPDIR)/src/libluaglue \
+ -L$(TOPDIR)/src/libutil
+endif
+
INCLUDE_LIBS = \
-lcrawler
+ifeq ($(WITH_LUA),1)
+INCLUDE_LIBS += \
+ -lluaglue -lutil
+endif
+
DYNAMIC_MODULE = \
mod_test.so
diff --git a/tests/modules/testmod2/GNUmakefile b/tests/modules/testmod2/GNUmakefile
index 9dec234..cbf8769 100755
--- a/tests/modules/testmod2/GNUmakefile
+++ b/tests/modules/testmod2/GNUmakefile
@@ -15,9 +15,20 @@ INCLUDE_CXXFLAGS = \
INCLUDE_LDFLAGS = \
-L$(TOPDIR)/src/libcrawler
+ifeq ($(WITH_LUA),1)
+INCLUDE_LDFLAGS += \
+ -L$(TOPDIR)/src/libluaglue \
+ -L$(TOPDIR)/src/libutil
+endif
+
INCLUDE_LIBS = \
-lcrawler
+ifeq ($(WITH_LUA),1)
+INCLUDE_LIBS += \
+ -lluaglue -lutil
+endif
+
DYNAMIC_MODULE = \
mod_test2.so
diff --git a/tests/modules/testmod3/GNUmakefile b/tests/modules/testmod3/GNUmakefile
index 13e1f9e..bdf9eba 100755
--- a/tests/modules/testmod3/GNUmakefile
+++ b/tests/modules/testmod3/GNUmakefile
@@ -15,9 +15,20 @@ INCLUDE_CXXFLAGS = \
INCLUDE_LDFLAGS = \
-L$(TOPDIR)/src/libcrawler
+ifeq ($(WITH_LUA),1)
+INCLUDE_LDFLAGS += \
+ -L$(TOPDIR)/src/libluaglue \
+ -L$(TOPDIR)/src/libutil
+endif
+
INCLUDE_LIBS = \
-lcrawler
+ifeq ($(WITH_LUA),1)
+INCLUDE_LIBS += \
+ -lluaglue -lutil
+endif
+
DYNAMIC_MODULE = \
mod_test3.so
diff --git a/tests/modules/testmod4/GNUmakefile b/tests/modules/testmod4/GNUmakefile
index b5bdf06..996600e 100755
--- a/tests/modules/testmod4/GNUmakefile
+++ b/tests/modules/testmod4/GNUmakefile
@@ -15,9 +15,20 @@ INCLUDE_CXXFLAGS = \
INCLUDE_LDFLAGS = \
-L$(TOPDIR)/src/libcrawler
+ifeq ($(WITH_LUA),1)
+INCLUDE_LDFLAGS += \
+ -L$(TOPDIR)/src/libluaglue \
+ -L$(TOPDIR)/src/libutil
+endif
+
INCLUDE_LIBS = \
-lcrawler
+ifeq ($(WITH_LUA),1)
+INCLUDE_LIBS += \
+ -lluaglue -lutil
+endif
+
DYNAMIC_MODULE = \
mod_test4.so