solana-with-rpc-optimizations/ci/test-stable.sh

59 lines
1.3 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
set -e
2018-05-21 23:02:54 -07:00
2018-05-27 18:19:07 -07:00
cd "$(dirname "$0")/.."
2018-05-21 23:02:54 -07:00
2018-08-06 08:57:12 -07:00
ci/version-check.sh stable
2018-06-24 21:24:08 -07:00
export RUST_BACKTRACE=1
2018-09-20 18:51:11 -07:00
export RUSTFLAGS="-D warnings"
2018-05-22 16:57:14 -07:00
2018-06-24 21:24:08 -07:00
_() {
echo "--- $*"
"$@"
}
2018-05-21 23:02:54 -07:00
maxOpenFds=65000
if [[ $(uname) = Darwin ]]; then
maxOpenFds=24576 # Appears to be the max permitted on macOS...
fi
if [[ $(ulimit -n) -lt $maxOpenFds ]]; then
ulimit -n $maxOpenFds|| {
echo 'Error: nofiles too small, run "ulimit -n 65000" to continue';
exit 1
}
fi
# bench_streamer is enabled by default to speed up dev builds, enable it
# explicitly here to ensure it still compiles
FEATURES=bench_streamer
_ cargo build --all --verbose --features="$FEATURES"
_ cargo test --verbose --lib -- --nocapture --test-threads=1
2018-09-27 13:46:10 -07:00
# Run integration tests serially
2018-10-17 10:52:55 -07:00
for test in tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
_ cargo test --verbose --test="$test" -- --test-threads=1 --nocapture
2018-10-17 10:52:55 -07:00
done
# Run native program tests
for program in programs/native/*; do
echo --- "$program"
2018-11-16 19:27:12 -08:00
(
set -x
cd "$program"
cargo test --verbose -- --nocapture
)
done
2018-11-26 17:39:20 -08:00
book/build.sh
2018-07-30 12:51:35 -07:00
echo --- ci/localnet-sanity.sh
(
set -x
# Assume |cargo build| has populated target/debug/ successfully.
export PATH=$PWD/target/debug:$PATH
USE_INSTALL=1 ci/localnet-sanity.sh
)