summaryrefslogtreecommitdiff
path: root/src/Makefile
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2012-02-23 22:02:11 +0200
committerTimo Teräs <timo.teras@iki.fi>2012-02-23 22:05:02 +0200
commit64e5a64442194a73e75ef11039f7d1e18d60c15e (patch)
treeab8f11613158d54302cc04bcab99cc4af3036af4 /src/Makefile
parent082ffbd3d6e713ba8c24b428c46af30c799aac6b (diff)
downloadapk-tools-64e5a64442194a73e75ef11039f7d1e18d60c15e.tar.gz
apk-tools-64e5a64442194a73e75ef11039f7d1e18d60c15e.tar.bz2
apk-tools-64e5a64442194a73e75ef11039f7d1e18d60c15e.tar.xz
apk-tools-64e5a64442194a73e75ef11039f7d1e18d60c15e.zip
test: rewrite the testing framework to use the real applets
also merge the expected output to the *.test files.
Diffstat (limited to 'src/Makefile')
-rw-r--r--src/Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Makefile b/src/Makefile
index 11aa305..9ec554f 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -27,16 +27,18 @@ libapk.so-objs := common.o database.o package.o archive.o \
solver.o
ifeq ($(TEST),y)
-progs-y += apk_test
-apk_test-objs := apk.o test.o $(libapk.so-objs)
+progs-y += apk-test
+apk-test-objs := apk-test.o $(filter-out apk.o, $(apk-objs))
endif
ifeq ($(SHARED_LIBAPK),)
apk-objs += $(libapk.so-objs)
+apk-test-objs += $(libapk.so-objs)
apk.so-objs += $(libapk.so-objs)
else
LIBAPK := YesPlease
LIBS_apk := -lapk
+LIBS_apk-test := -lapk
LIBS_apk.so := -L$(obj) -lapk
endif
@@ -50,12 +52,13 @@ endif
CFLAGS_ALL += -D_ATFILE_SOURCE
CFLAGS_apk.o := -DAPK_VERSION=\"$(FULL_VERSION)\"
CFLAGS_apk-static.o := -DAPK_VERSION=\"$(FULL_VERSION)\" -DOPENSSL_NO_ENGINE
+CFLAGS_apk-test.o := -DAPK_VERSION=\"$(FULL_VERSION)\" -DOPENSSL_NO_ENGINE -DTEST_MODE
progs-$(STATIC) += apk.static
apk.static-objs := $(filter-out apk.o,$(apk-objs)) apk-static.o
LDFLAGS_apk.static := -static
LDFLAGS_apk += -nopie -L$(obj)
-LDFLAGS_apk_test += -nopie -L$(obj)
+LDFLAGS_apk-test += -nopie -L$(obj)
CFLAGS_ALL += $(shell $(PKG_CONFIG) --cflags $(PKGDEPS))
LIBS := -Wl,--as-needed \