blob: b7e1ba51904d0933341b929f57b0678a53184d91 (
plain)
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
62
63
64
65
66
67
|
#!/bin/sh
# export direct_bt_debug=true
# export direct_bt_debug=adapter.event=false,gatt.data=false,hci.event=true,mgmt.event=false
# export direct_bt_debug=adapter.event,gatt.data,hci.event,mgmt.event
# export direct_bt_debug=adapter.event,gatt.data
# export direct_bt_debug=adapter.event,hci.event
# export direct_bt_debug=adapter.event
#
# ../scripts/run-dbt_scanner10.sh -wait -mac C0:26:DA:01:DA:B1 2>&1 | tee ~/scanner-h01-dbt10.log
# ../scripts/run-dbt_scanner10.sh -wait -wl C0:26:DA:01:DA:B1 2>&1 | tee ~/scanner-h01-dbt10.log
# ../scripts/run-dbt_scanner10.sh -wait 2>&1 | tee ~/scanner-h01-dbt10.log
#
sdir=`dirname $(readlink -f $0)`
rootdir=`dirname $sdir`
bname=`basename $0 .sh`
if [ ! -e bin/dbt_scanner00 -o ! -e lib/libdirect_bt.so ] ; then
echo run from dist directory
exit 1
fi
if [ "$1" = "-log" ] ; then
logbasename=$2
shift 2
else
logbasename=~/$bname
fi
logfile=$logbasename.log
rm -f $logfile
valgrindlogfile=$logbasename-valgrind.log
rm -f $valgrindlogfile
callgrindoutfile=$logbasename-callgrind.out
rm -f $callgrindoutfile
ulimit -c unlimited
# run 'dpkg-reconfigure locales' enable 'en_US.UTF-8'
export LANG=en_US.UTF-8
export LC_MEASUREMENT=en_US.UTF-8
# export VALGRIND="valgrind --tool=memcheck --leak-check=full --show-reachable=yes --error-limit=no --default-suppressions=yes --suppressions=$sdir/valgrind.supp --gen-suppressions=all -s --log-file=$valgrindlogfile"
# export VALGRIND="valgrind --tool=helgrind --track-lockorders=yes --ignore-thread-creation=yes --default-suppressions=yes --suppressions=$sdir/valgrind.supp --gen-suppressions=all -s --log-file=$valgrindlogfile"
# export VALGRIND="valgrind --tool=drd --segment-merging=no --ignore-thread-creation=yes --trace-barrier=no --trace-cond=no --trace-fork-join=no --trace-mutex=no --trace-rwlock=no --trace-semaphore=no --default-suppressions=yes --suppressions=$sdir/valgrind.supp --gen-suppressions=all -s --log-file=$valgrindlogfile"
# export VALGRIND="valgrind --tool=callgrind --instr-atstart=yes --collect-atstart=yes --collect-systime=yes --combine-dumps=yes --separate-threads=no --callgrind-out-file=$callgrindoutfile --log-file=$valgrindlogfile"
runit() {
echo COMMANDLINE $0 $*
echo VALGRIND $VALGRIND
echo logbasename $logbasename
echo logfile $logfile
echo valgrindlogfile $valgrindlogfile
echo callgrindoutfile $callgrindoutfile
echo direct_bt_debug $direct_bt_debug
echo direct_bt_verbose $direct_bt_verbose
#LD_LIBRARY_PATH=`pwd`/lib strace bin/dbt_scanner10 $*
echo LD_LIBRARY_PATH=`pwd`/lib $VALGRIND bin/dbt_scanner10 $*
LD_LIBRARY_PATH=`pwd`/lib $VALGRIND bin/dbt_scanner10 $*
}
runit $* 2>&1 | tee $logfile
|