Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Commit

Permalink
Remove duplication between test-stable{,-perf}.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mvines committed Dec 18, 2018
1 parent 0d2e378 commit cd6736d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 52 deletions.
41 changes: 1 addition & 40 deletions ci/test-stable-perf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,48 +3,9 @@ set -e

cd "$(dirname "$0")/.."

# Clear cached json keypair files
rm -rf "$HOME/.config/solana"

# This job doesn't run within a container, try once to upgrade tooling on a
# version check failure
ci/version-check-with-upgrade.sh stable

export RUST_BACKTRACE=1
export RUSTFLAGS="-D warnings"

_() {
echo "--- $*"
"$@"
}

./fetch-perf-libs.sh
# shellcheck source=/dev/null
source ./target/perf-libs/env.sh

FEATURES=bpf_c,cuda,erasure,chacha
_ cargo build --all --verbose --features="$FEATURES"
_ cargo test --all --verbose --features="$FEATURES" --lib -- --nocapture --test-threads=1

# Run integration tests serially
for test in tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
_ cargo test --verbose --features="$FEATURES" --test="$test" -- --test-threads=1
done

# Run bpf_loader test with bpf_c features enabled
(
set -x
cd "programs/native/bpf_loader"
echo --- program/native/bpf_loader test --features=bpf_c
cargo test --verbose --features="bpf_c"
)

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
)
exec ci/test-stable.sh "$FEATURES"
29 changes: 17 additions & 12 deletions ci/test-stable.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/usr/bin/env bash
set -e

FEATURES="$1"

cd "$(dirname "$0")/.."

ci/version-check.sh stable
# Clear cached json keypair files
rm -rf "$HOME/.config/solana"

ci/version-check-with-upgrade.sh stable
export RUST_BACKTRACE=1
export RUSTFLAGS="-D warnings"

Expand All @@ -13,26 +18,26 @@ _() {
}

_ scripts/ulimit-n.sh
_ cargo build --all --verbose
_ cargo test --all --verbose --lib -- --nocapture --test-threads=1

# Run integration tests serially
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
done
_ cargo build --all --verbose --features="$FEATURES"
_ cargo test --all --verbose - --features="$FEATURES" --lib -- --nocapture --test-threads=1

# Run native program tests
# Run native program tests (without $FEATURES)
for program in programs/native/*; do
echo --- "$program"
echo --- "$program" test
(
set -x
cd "$program"
cargo test --verbose -- --nocapture
)
done

# Run integration tests serially
for test in tests/*.rs; do
test=${test##*/} # basename x
test=${test%.rs} # basename x .rs
_ cargo test --verbose --features="$FEATURES" --test="$test" -- --test-threads=1 --nocapture
done

echo --- ci/localnet-sanity.sh
(
set -x
Expand Down

0 comments on commit cd6736d

Please sign in to comment.