summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorXuefer <xuefer@gmail.com>2014-11-08 07:38:45 +0000
committerXuefer <xuefer@gmail.com>2014-11-08 07:38:45 +0000
commitf664f5a518600b71055ffe871c16440439a25f2f (patch)
tree14fa36604ce00d4cf04b185e20bd02c006278f54 /devel
parentc130a0d58900e7a024135a328dedb112df109995 (diff)
downloadxcache-f664f5a518600b71055ffe871c16440439a25f2f.tar.gz
xcache-f664f5a518600b71055ffe871c16440439a25f2f.zip
merge stack/vector to 1 impl, avoid possible memory leak using malloc
git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1551 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/run2
-rwxr-xr-xdevel/test.mak15
2 files changed, 11 insertions, 6 deletions
diff --git a/devel/run b/devel/run
index 5559c17..6f8018e 100755
--- a/devel/run
+++ b/devel/run
@@ -39,7 +39,7 @@ stopfpm() { # {{{1
}
xtest() { # {{{1
- $MAKE ${MAKEOPTS} -f devel/test.mak
+ $MAKE ${MAKEOPTS} -f devel/test.mak clean all
}
prep() { # {{{1
diff --git a/devel/test.mak b/devel/test.mak
index 79d7dfd..3572a18 100755
--- a/devel/test.mak
+++ b/devel/test.mak
@@ -1,18 +1,23 @@
#! /usr/bin/make -f
-EXES=allocator_test
-OBJS=allocator.o
CC=gcc
+LDFLAGS=
CFLAGS=-g -O0 -I. -D TEST -D HAVE_XCACHE_TEST -Wall
TEST=valgrind
-all: allocator
+all: allocator vector
allocator_test: xcache/xc_allocator.h xcache/xc_allocator.c xcache/xc_malloc.c xcache/xc_allocator_bestfit.c util/xc_trace.c util/xc_trace.h
- $(CC) $(CFLAGS) -o allocator_test xcache/xc_allocator.c xcache/xc_malloc.c xcache/xc_allocator_bestfit.c util/xc_trace.c
+ $(CC) $(LDFLAGS) $(CFLAGS) -o allocator_test xcache/xc_allocator.c xcache/xc_malloc.c xcache/xc_allocator_bestfit.c util/xc_trace.c
allocator: allocator_test
$(TEST) ./allocator_test
+vector_test: util/xc_vector_test.c
+ $(CC) $(LDFLAGS) $(CFLAGS) -o vector_test util/xc_vector_test.c
+
+vector: vector_test
+ $(TEST) ./vector_test
+
clean:
- rm -f $(OBJS) $(EXES)
+ rm -f allocator_test vector_test