mirror of https://github.com/rwf2/Rocket.git
Doctest core feature matrix with '--no-run'.
Previously, we ran each doctest in core many times, once for each individually enabled feature. This took a long time and consumed an inordinate amount of resources for no gain: we already run each test when we enable all features. Instead, emulate a 'cargo check' for doctests by passing '--no-run' to rustdoc via an environment variable.
This commit is contained in:
parent
be933ce398
commit
c2d8f11ffe
|
@ -107,12 +107,14 @@ function test_core() {
|
||||||
uuid
|
uuid
|
||||||
)
|
)
|
||||||
|
|
||||||
echo ":: Building and testing core [no features]..."
|
echo ":: Building and checking core [no features]..."
|
||||||
indir "${CORE_LIB_ROOT}" $CARGO test --no-default-features $@
|
RUSTDOCFLAGS="-Zunstable-options --no-run" \
|
||||||
|
indir "${CORE_LIB_ROOT}" $CARGO test --no-default-features $@
|
||||||
|
|
||||||
for feature in "${FEATURES[@]}"; do
|
for feature in "${FEATURES[@]}"; do
|
||||||
echo ":: Building and testing core [${feature}]..."
|
echo ":: Building and checking core [${feature}]..."
|
||||||
indir "${CORE_LIB_ROOT}" $CARGO test --no-default-features --features "${feature}" $@
|
RUSTDOCFLAGS="-Zunstable-options --no-run" \
|
||||||
|
indir "${CORE_LIB_ROOT}" $CARGO test --no-default-features --features "${feature}" $@
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue