-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdbg_tests.sh
executable file
·51 lines (44 loc) · 946 Bytes
/
dbg_tests.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
#!/bin/bash
set -e
cleanup(){
rm -f a.out test.gdb
}
trap cleanup EXIT
if [ "$1" == "-d" ] ; then
cat > test.gdb <<EOF
set pagination off
cy run
cy bt
EOF
opt="-dbg"
opt_setup="--cython-gdb"
python="python-dbg"
launcher="cygdb . -- --batch --command=test.gdb --args"
shift
elif [ "$1" == "-b" ] ; then
cat > test.gdb <<EOF
set pagination off
run
bt
EOF
opt="-dbg"
opt_setup="--cython-gdb"
python="python-dbg"
launcher="gdb --batch --command=test.gdb --args"
shift
elif [ "$1" == "-3" ]; then
shift
python="python3"
launcher=
else
python="python"
launcher=
fi
[ "$@" ] && tests=":$@"
ceph osd unset noup
for i in $(rados lspools | grep -e foo -e test_pool -e foo-cache -e 黄 -e 黅) ; do
rados rmpool $i $i --yes-i-really-really-mean-it ;
done ;
$python -c "import setup; setup.setup_hook()"
$python setup.py build_ext --inplace $opt_setup --build-lib .
$launcher $python $(which nosetests) -vds test_rados$tests