git-hooks: build and test with --no-default-features too.
Stores output in separate target/ subdir, so it shouldn't get clobbered.
This commit is contained in:
parent
7a8ed15017
commit
c4f10126e3
@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
pushd () {
|
||||
command pushd "$@" > /dev/null
|
||||
}
|
||||
@ -18,9 +20,14 @@ RT=rtchallenge
|
||||
AFFECTED="$(git diff-index --cached --name-only HEAD)"
|
||||
#echo "AFFECTED $AFFECTED"
|
||||
RT_AFFECTED=$(echo "${AFFECTED:?}" | grep ${RT:?} || true)
|
||||
NO_FEATURES_TARGET_DIR="${SCRIPT_DIR:?}/../../rtchallenge/target/no-default-features"
|
||||
if [ ! -z "$RT_AFFECTED" ]; then
|
||||
echo "Files for the rt challenge were touched, running tests"
|
||||
cd ${RT:?} && cargo build --examples && cargo test
|
||||
cd ${RT:?} && \
|
||||
cargo build --examples && \
|
||||
cargo test && \
|
||||
cargo build --target-dir=${NO_FEATURES_TARGET_DIR:?} --no-default-features --examples && \
|
||||
cargo test --target-dir=${NO_FEATURES_TARGET_DIR:?} --no-default-features
|
||||
fi
|
||||
# Uncomment to debug presubmit.
|
||||
#exit 1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user