@@ -42,6 +42,7 @@ format:
4242 cargo ${TOOLCHAIN_ARGS} fmt --all
4343
4444CLIPPY_WHITELIST += -A clippy::bool_assert_comparison
45+ CMAKE_COMPAT_ARGS := -DCMAKE_POLICY_VERSION_MINIMUM=3.5
4546# # Run clippy.
4647clippy :
4748 # Fresh lockfile resolution can pull grpcio/grpcio-sys versions that fail on
@@ -53,19 +54,19 @@ clippy:
5354 cargo ${TOOLCHAIN_ARGS} update -p grpcio-sys@0.10.3+1.44.0-patched --precise 0.10.1+1.44.0; \
5455 fi
5556ifdef WITH_NIGHTLY_FEATURES
56- CMAKE_ARGS="-DCMAKE_POLICY_VERSION_MINIMUM=3.5 $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} clippy --all --features nightly_group,failpoints --all-targets -- -D clippy::all ${CLIPPY_WHITELIST}
57+ CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} clippy --all --features nightly_group,failpoints --all-targets -- -D clippy::all ${CLIPPY_WHITELIST}
5758else
58- CMAKE_ARGS="-DCMAKE_POLICY_VERSION_MINIMUM=3.5 $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} clippy --all --features failpoints --all-targets -- -D clippy::all ${CLIPPY_WHITELIST}
59+ CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} clippy --all --features failpoints --all-targets -- -D clippy::all ${CLIPPY_WHITELIST}
5960endif
6061
6162# # Run tests.
6263test :
6364ifdef WITH_NIGHTLY_FEATURES
64- cargo ${TOOLCHAIN_ARGS} test --all --features nightly_group ${EXTRA_CARGO_ARGS} -- --nocapture
65- cargo ${TOOLCHAIN_ARGS} test --test failpoints --features nightly_group,failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
65+ CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} test --all --features nightly_group ${EXTRA_CARGO_ARGS} -- --nocapture
66+ CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} test --test failpoints --features nightly_group,failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
6667else
67- cargo ${TOOLCHAIN_ARGS} test --all ${EXTRA_CARGO_ARGS} -- --nocapture
68- cargo ${TOOLCHAIN_ARGS} test --test failpoints --features failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
68+ CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} test --all ${EXTRA_CARGO_ARGS} -- --nocapture
69+ CMAKE_ARGS="${CMAKE_COMPAT_ARGS} $${CMAKE_ARGS}" cargo ${TOOLCHAIN_ARGS} test --test failpoints --features failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
6970endif
7071
7172# # Run tests with various features for maximum code coverage.
@@ -74,10 +75,10 @@ test_matrix:
7475 $(error Must run test matrix with nightly features. Please reset WITH_STABLE_TOOLCHAIN.)
7576else
7677test_matrix : test
77- cargo ${TOOLCHAIN_ARGS} test --all ${EXTRA_CARGO_ARGS} -- --nocapture
78- cargo ${TOOLCHAIN_ARGS} test --test failpoints --features failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
79- cargo ${TOOLCHAIN_ARGS} test --all --features nightly_group,std_fs ${EXTRA_CARGO_ARGS} -- --nocapture
80- cargo ${TOOLCHAIN_ARGS} test --test failpoints --features nightly_group,std_fs,failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
78+ CMAKE_ARGS= " ${CMAKE_COMPAT_ARGS} $$ {CMAKE_ARGS} " cargo ${TOOLCHAIN_ARGS} test --all ${EXTRA_CARGO_ARGS} -- --nocapture
79+ CMAKE_ARGS= " ${CMAKE_COMPAT_ARGS} $$ {CMAKE_ARGS} " cargo ${TOOLCHAIN_ARGS} test --test failpoints --features failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
80+ CMAKE_ARGS= " ${CMAKE_COMPAT_ARGS} $$ {CMAKE_ARGS} " cargo ${TOOLCHAIN_ARGS} test --all --features nightly_group,std_fs ${EXTRA_CARGO_ARGS} -- --nocapture
81+ CMAKE_ARGS= " ${CMAKE_COMPAT_ARGS} $$ {CMAKE_ARGS} " cargo ${TOOLCHAIN_ARGS} test --test failpoints --features nightly_group,std_fs,failpoints ${EXTRA_CARGO_ARGS} -- --test-threads 1 --nocapture
8182endif
8283
8384# # Build raft-engine-ctl.
0 commit comments