-
Notifications
You must be signed in to change notification settings - Fork 159
/
justfile
62 lines (48 loc) · 1.87 KB
/
justfile
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
build: pre
cargo build --all-targets
cargo doc
pre:
cargo deny --all-features check licenses
cargo fmt --all -- --check
cargo clippy --all --all-targets
release: pre
cargo build --release
flamegraph:
cargo flamegraph --bench lmdb_benchmark
firefox ./flamegraph.svg
publish_py: test_py
docker pull quay.io/pypa/manylinux2014_x86_64
MATURIN_PYPI_TOKEN=$(cat ~/.pypi/redb_token) docker run -it --rm -e "MATURIN_PYPI_TOKEN" -v `pwd`:/redb-ro:ro quay.io/pypa/manylinux2014_x86_64 /redb-ro/publish_py.sh
test_py: install_py
python3 -m unittest discover
install_py: pre
maturin develop
test: pre
RUST_BACKTRACE=1 cargo test
test_wasi:
cargo +nightly test --target=wasm32-wasip1 -- --nocapture
bench bench='lmdb_benchmark': pre
cargo bench --bench {{bench}}
watch +args='test':
cargo watch --clear --exec "{{args}}"
fuzz: pre
cargo fuzz run --sanitizer=none fuzz_redb -- -max_len=10000
fuzz_cmin:
cargo fuzz cmin --sanitizer=none fuzz_redb -- -max_len=10000
fuzz_ci: pre
cargo fuzz run --sanitizer=none fuzz_redb -- -max_len=10000 -max_total_time=60
fuzz_coverage: pre
#!/usr/bin/env bash
set -euxo pipefail
RUST_SYSROOT=`cargo rustc -- --print sysroot 2>/dev/null`
LLVM_COV=`find $RUST_SYSROOT -name llvm-cov`
echo $LLVM_COV
rustup component add llvm-tools-preview
cargo fuzz coverage --sanitizer=none fuzz_redb
$LLVM_COV show fuzz/target/*/release/fuzz_redb --format html \
-instr-profile=fuzz/coverage/fuzz_redb/coverage.profdata \
-ignore-filename-regex='.*(cargo/registry|redb/fuzz|rustc).*' > fuzz/coverage/coverage_report.html
$LLVM_COV report fuzz/target/*/release/fuzz_redb \
-instr-profile=fuzz/coverage/fuzz_redb/coverage.profdata \
-ignore-filename-regex='.*(cargo/registry|redb/fuzz|rustc).*'
firefox ./fuzz/coverage/coverage_report.html