forked from igraph/python-igraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·59 lines (57 loc) · 1.63 KB
/
test.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
if [ x$1 == x-d -a -x /usr/bin/valgrind ]; then
# Checking memory leaks with Valgrind
echo "Valgrind memory leak debugging enabled"
FNAME=/tmp/igraph_${RANDOM}.supp
cat /usr/lib/valgrind/python.supp >$FNAME
cat $0|awk 'BEGIN { ok=0 } /[S]UPPRESSIONS/ { first=1 } { if (first) { ok=1; first=0; } else if (ok) { print; } }' >>$FNAME
PRE="valgrind --tool=memcheck --leak-check=yes --trace-children=yes --suppressions=$FNAME"
shift
else
PRE=""
fi
DYLD_LIBRARY_PATH=src/.libs LD_LIBRARY_PATH=src/.libs $PRE python $1 interfaces/python/setup.py test
if [ x$FNAME != x ]; then rm -f $FNAME; fi
exit 0
################## SUPPRESSIONS for Valgrind ########################
{
<insert a suppression name here>
Memcheck:Cond
obj:/lib/ld-2.3.5.so
obj:/lib/ld-2.3.5.so
obj:/lib/ld-2.3.5.so
obj:/lib/ld-2.3.5.so
obj:/lib/ld-2.3.5.so
}
{
<insert a suppression name here>
Memcheck:Cond
obj:/lib/ld-2.3.5.so
obj:/lib/ld-2.3.5.so
obj:/lib/ld-2.3.5.so
obj:/lib/tls/i686/cmov/libc-2.3.5.so
obj:/lib/ld-2.3.5.so
fun:_dl_open
obj:/lib/tls/i686/cmov/libdl-2.3.5.so
obj:/lib/ld-2.3.5.so
obj:/lib/tls/i686/cmov/libdl-2.3.5.so
fun:dlopen
fun:_PyImport_GetDynLoadFunc
fun:_PyImport_LoadDynamicModule
}
{
<insert a suppression name here>
Memcheck:Cond
obj:/lib/ld-2.3.5.so
obj:/lib/tls/i686/cmov/libc-2.3.5.so
obj:/lib/ld-2.3.5.so
fun:_dl_open
obj:/lib/tls/i686/cmov/libdl-2.3.5.so
obj:/lib/ld-2.3.5.so
obj:/lib/tls/i686/cmov/libdl-2.3.5.so
fun:dlopen
fun:_PyImport_GetDynLoadFunc
fun:_PyImport_LoadDynamicModule
obj:/usr/bin/python2.4
obj:/usr/bin/python2.4
}