2018-11-11 08:19:04 -08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2018-12-18 13:12:44 -08:00
|
|
|
FEATURES="$1"
|
2018-05-27 18:19:07 -07:00
|
|
|
cd "$(dirname "$0")/.."
|
2018-05-21 23:02:54 -07:00
|
|
|
|
2018-12-18 13:12:44 -08:00
|
|
|
# Clear cached json keypair files
|
|
|
|
rm -rf "$HOME/.config/solana"
|
|
|
|
|
2018-12-18 14:25:10 -08:00
|
|
|
source ci/_
|
2018-12-18 13:12:44 -08:00
|
|
|
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
|
|
|
|
2019-02-02 10:42:08 -08:00
|
|
|
source scripts/ulimit-n.sh
|
2019-02-07 09:41:38 -08:00
|
|
|
_ cargo build --all ${V:+--verbose} --features="$FEATURES"
|
|
|
|
_ cargo test --all ${V:+--verbose} --features="$FEATURES" --lib -- --nocapture --test-threads=1
|
2018-10-17 02:20:58 -07:00
|
|
|
|
2018-12-18 13:12:44 -08:00
|
|
|
# Run native program tests (without $FEATURES)
|
2018-10-30 22:53:36 -07:00
|
|
|
for program in programs/native/*; do
|
2018-12-18 13:12:44 -08:00
|
|
|
echo --- "$program" test
|
2018-11-16 19:27:12 -08:00
|
|
|
(
|
2018-10-30 22:53:36 -07:00
|
|
|
set -x
|
|
|
|
cd "$program"
|
2018-11-27 22:47:11 -08:00
|
|
|
cargo test --verbose -- --nocapture
|
2018-10-30 22:53:36 -07:00
|
|
|
)
|
|
|
|
done
|
|
|
|
|
2019-01-30 20:50:48 -08:00
|
|
|
_ ci/integration-tests.sh "$FEATURES"
|
2018-12-18 13:12:44 -08:00
|
|
|
|
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
|
2019-01-13 09:18:50 -08:00
|
|
|
USE_INSTALL=1 ci/localnet-sanity.sh -x
|
2018-07-30 12:51:35 -07:00
|
|
|
)
|