-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathruntests.sh
executable file
·44 lines (37 loc) · 1.13 KB
/
runtests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
#set -x
#set -v
CITRINE_MEMORY_LIMIT_MB=10
CITRINE_MEMORY_MODE=1
export CITRINE_MEMORY_LIMIT_MB
export CITRINE_MEMORY_MODE
#Determine which makefile to use
OS=$(uname -s)
export OS
LDFLAGS='-shared'
if [ "$OS" = "OpenBSD" -o "$OS" = "FreeBSD" ]; then
MAKEFILE=makefile.bsd
elif [ "$OS" = "Darwin" ]; then
MAKEFILE=makefile.bsd
LDFLAGS='-shared -undefined dynamic_lookup'
elif [ "$OS" = "Haiku" ]; then
MAKEFILE=makefile.haiku
else
MAKEFILE=makefile
fi
#Remove .so
find . -name "*.so" -exec rm {} +
#Run makefiles of plugins
make plugin PACKAGE="request" NAME="libctrrequest.so" LDFLAGS=${LDFLAGS}
make plugin PACKAGE="request" NAME="libctrverzoek.so" LDFLAGS=${LDFLAGS}
make plugin PACKAGE="mock/percolator" NAME="libctrpercolator.so" LDFLAGS=${LDFLAGS}
make plugin PACKAGE="jsmn" NAME="libctrjson.so" LDFLAGS=${LDFLAGS}
make plugin PACKAGE="jsmn" NAME="libctrjsonnl.so" LDFLAGS=${LDFLAGS}
make plugin PACKAGE="jsmn" NAME="libctrjsonhy.so" LDFLAGS=${LDFLAGS}
#Remove old dicts
rm dict/*
#Run regular makefiles through build script
./mk.sh
cp bin/${OS}/ctrxx bin/Generic/ctr
cd tests/test-o-mat
../../bin/${OS}/ctrx3 runtests.ctr $1