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

47 lines
1.1 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
set -e
2018-05-21 23:02:54 -07:00
FEATURES="$1"
2018-05-27 18:19:07 -07:00
cd "$(dirname "$0")/.."
2018-05-21 23:02:54 -07:00
# Clear cached json keypair files
rm -rf "$HOME/.config/solana"
2018-12-18 14:25:10 -08:00
source ci/_
ci/version-check-with-upgrade.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
_ scripts/ulimit-n.sh
_ cargo build --all --verbose --features="$FEATURES"
2019-01-07 15:07:00 -08:00
_ cargo test --all --verbose --features="$FEATURES" --lib -- --nocapture --test-threads=1
# Run native program tests (without $FEATURES)
for program in programs/native/*; do
echo --- "$program" test
2018-11-16 19:27:12 -08:00
(
set -x
cd "$program"
cargo test --verbose -- --nocapture
)
done
# Run integration tests serially
OLD_RUST_LOG=$RUST_LOG
2019-01-28 10:37:02 -08:00
for test in {,*/}tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
export RUST_LOG="$test"=trace
_ cargo test --all --verbose --features="$FEATURES" --test="$test" -- --test-threads=1 --nocapture
done
RUST_LOG=$OLD_RUST_LOG
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 -x
2018-07-30 12:51:35 -07:00
)