forked from amazon-contributing/redis-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
87 lines (66 loc) · 4.61 KB
/
Makefile
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
build:
@cargo build
test:
@echo "===================================================================="
@echo "Testing Connection Type TCP without features"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --locked -p redis --no-default-features -- --nocapture --test-threads=1
@echo "===================================================================="
@echo "Testing Connection Type TCP with all features and RESP2"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test -p redis --all-features -- --nocapture --test-threads=1 --skip test_module
@echo "===================================================================="
@echo "Testing Connection Type TCP with all features and RESP3"
@echo "===================================================================="
@REDISRS_SERVER_TYPE=tcp PROTOCOL=RESP3 cargo test -p redis --all-features -- --nocapture --test-threads=1 --skip test_module
@echo "===================================================================="
@echo "Testing Connection Type TCP with all features and Rustls support"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp+tls RUST_BACKTRACE=1 cargo test -p redis --all-features -- --nocapture --test-threads=1 --skip test_module
@echo "===================================================================="
@echo "Testing Connection Type TCP with all features and native-TLS support"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp+tls RUST_BACKTRACE=1 cargo test -p redis --features=json,tokio-native-tls-comp,connection-manager,cluster-async -- --nocapture --test-threads=1 --skip test_module
@echo "===================================================================="
@echo "Testing Connection Type UNIX"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=unix RUST_BACKTRACE=1 cargo test -p redis --test parser --test test_basic --test test_types --all-features -- --test-threads=1 --skip test_module
@echo "===================================================================="
@echo "Testing Connection Type UNIX SOCKETS"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=unix RUST_BACKTRACE=1 cargo test -p redis --all-features -- --test-threads=1 --skip test_cluster --skip test_async_cluster --skip test_module
@echo "===================================================================="
@echo "Testing async-std with Rustls"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test -p redis --features=async-std-rustls-comp,cluster-async -- --nocapture --test-threads=1 --skip test_module
@echo "===================================================================="
@echo "Testing async-std with native-TLS"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test -p redis --features=async-std-native-tls-comp,cluster-async -- --nocapture --test-threads=1 --skip test_module
@echo "===================================================================="
@echo "Testing redis-test"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" RUST_BACKTRACE=1 cargo test -p redis-test
test-module:
@echo "===================================================================="
@echo "Testing with module support enabled (currently only RedisJSON)"
@echo "===================================================================="
@RUSTFLAGS="-D warnings" REDISRS_SERVER_TYPE=tcp RUST_BACKTRACE=1 cargo test --all-features test_module -- --test-threads=1
test-single: test
bench:
cargo bench --all-features
docs:
@RUSTFLAGS="-D warnings" RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features --no-deps
upload-docs: docs
@./upload-docs.sh
style-check:
@rustup component add rustfmt 2> /dev/null
cargo fmt --all -- --check
lint:
@rustup component add clippy 2> /dev/null
cargo clippy --all-features --all --tests --examples -- -D clippy::all -D warnings
fuzz:
cd afl/parser/ && \
cargo afl build --bin fuzz-target && \
cargo afl fuzz -i in -o out target/debug/fuzz-target
.PHONY: build test bench docs upload-docs style-check lint fuzz