File: mktest.sh

package info (click to toggle)
bld 0.3.4.1-4
  • links: PTS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, squeeze, stretch, wheezy
  • size: 576 kB
  • ctags: 268
  • sloc: ansic: 2,333; sh: 175; makefile: 157; perl: 135; python: 36
file content (61 lines) | stat: -rw-r--r-- 1,612 bytes parent folder | download | duplicates (3)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/sh

distclean=0
CFLAGS="-W -Wall -pedantic -O2"
export CFLAGS

rm bld_iplist.dump
rm bld_blacklist.dump

date > mktest.log
(cd ..
if [ ! -f Makefile ]
then
	distclean=1
	echo Configuring...
	./configure >> mktest/mktest.log 2>&1
fi

for i in Makefile config.h
do
	cp $i mktest
done

echo "=-=" >> mktest/mktest.log
echo Compiling...
make >> mktest/mktest.log 2>&1
echo "=-=" >> mktest/mktest.log
for i in bldquery bldinsert blddecr
do
	ln -sf bldsubmit $i
done
echo Running...
./bld -l 0 -a 127.0.0.1 -p 2906 -P mktest/bld.pid -B `pwd`/mktest/bld_blacklist.dump -I `pwd`/mktest/bld_iplist.dump -t 1 -m 3 >> mktest/mktest.log 2>&1
echo Testing...
sleep 1
./bldsubmit 127.0.0.1 2906 192.168.75.1 >> mktest/mktest.log 2>&1
./bldquery 127.0.0.1 2906 192.168.75.1 >> mktest/mktest.log 2>&1
./bldsubmit 127.0.0.1 2906 192.168.75.1 >> mktest/mktest.log 2>&1
sleep 1
./bldsubmit 127.0.0.1 2906 192.168.75.1 >> mktest/mktest.log 2>&1
./bldquery 127.0.0.1 2906 192.168.75.1 >> mktest/mktest.log 2>&1
./bldinsert 127.0.0.1 2906 192.168.75.2 >> mktest/mktest.log 2>&1
./bldquery 127.0.0.1 2906 192.168.75.2 >> mktest/mktest.log 2>&1
echo Killing...
kill `cat mktest/bld.pid`
rm -f mktest/bld.pid
sleep 1
./bldread mktest/bld_iplist.dump > mktest/bld_iplist.txt 2>&1
./bldread mktest/bld_blacklist.dump > mktest/bld_blacklist.txt 2>&1
echo "=-=" >> mktest/mktest.log

if [ $distclean -eq 1 ]
then
	make distclean >> mktest/mktest.log 2>&1
	echo "=-=" >> mktest/mktest.log
fi
date >> mktest/mktest.log
)

echo Tests are over, thank you!  You can send the content of this directory to:
echo "    <obld@r14.freenix.org>"