aboutsummaryrefslogtreecommitdiffstats
path: root/t/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 't/Makefile')
-rw-r--r--t/Makefile6
1 files changed, 4 insertions, 2 deletions
diff --git a/t/Makefile b/t/Makefile
index dd4df3f..66c7f77 100644
--- a/t/Makefile
+++ b/t/Makefile
@@ -2,7 +2,7 @@ TESTOBJS=test.o test_common.o test_configuration.o test_curl.o test_packages.o t
CC=gcc
CURLFLAGS=`curl-config --libs`
GPGMEFLAGS=`gpgme-config --libs`
-DEFINES=
+DEFINES=-DSLAPTTESTDIR=$(shell pwd) -DSLAPT_HAS_GPGME
CFLAGS=-W -Werror -Wall -O2 -ansi -pedantic $(DEFINES)
LDFLAGS=$(CURLFLAGS) $(GPGMEFLAGS) -lz
CHECKFLAGS=`pkg-config --libs check`
@@ -11,7 +11,9 @@ test: $(TESTOBJS)
$(CC) -o test $(TESTOBJS) $(CFLAGS) ../src/libslapt.so $(CHECKFLAGS) $(LDFLAGS)
runtest: test
- ./test
+ sed -i.bak -re 's|(WORKINGDIR=)([^\/]+.*)|\1$(shell pwd)/\2|' data/rc1
+ ./test || (mv -f data/rc1.bak data/rc1 || exit 1)
+ mv -f data/rc1.bak data/rc1
$(TESTOBJS):