-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
executable file
·31 lines (24 loc) · 1.11 KB
/
run.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
#!/bin/bash
rm -rf /tmp/k9db_*
if [[ "$1" == "dbg" ]]; then
RUST_BACKTRACE=1 bazel run //:k9db -- --logtostderr=1 "${@:2}"
elif [[ "$1" == "opt" ]]; then
rm -rf /mnt/disks/my-ssd/k9db/
mkdir -p /mnt/disks/my-ssd/k9db/
bazel run //:k9db --config opt -- --db_path=/mnt/disks/my-ssd/k9db/ "${@:2}"
elif [[ "$1" == "valgrind" ]]; then
bazel run //:k9db --config valgrind -- --logtostderr=1 "${@:2}"
elif [[ "$1" == "asan" ]]; then
LSAN_OPTIONS=suppressions=/home/bab/Documents/research/k9db/.lsan_jvm_suppress.txt \
bazel run //:k9db --config asan -- --logtostderr=1
elif [[ "$1" == "tsan" ]]; then
LSAN_OPTIONS=suppressions=/home/bab/Documents/research/k9db/.lsan_jvm_suppress.txt \
TSAN_OPTIONS=suppressions=/home/bab/Documents/research/k9db/.tsan_jvm_suppress.txt \
bazel run //:k9db --config tsan -- --logtostderr=1
elif [[ "$1" == "unencrypted" ]]; then
rm -rf /mnt/disks/my-ssd/k9db/
mkdir -p /mnt/disks/my-ssd/k9db/
bazel run //:k9db --config opt --encryption=off -- --db_path=/mnt/disks/my-ssd/k9db/ "${@:2}"
else
echo 'use either "dbg", "opt", "unencrypted", "valgrind", "asan", or "tsan"!'
fi