Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[workspace]
resolver = "2"
members = [
"token-lending/cli",
"token-lending/program",
Expand Down
6 changes: 3 additions & 3 deletions ci/cargo-test-bpf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ source ./ci/solana-version.sh

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

export RUST_LOG="warn,tarpc=error,solana_runtime::message_processor=debug"

usage() {
exitcode=0
Expand All @@ -33,11 +33,11 @@ run_dir=$(pwd)
if [[ -d $run_dir/program ]]; then
# Build/test just one BPF program
cd $run_dir/program
RUST_LOG="error" cargo +"$rust_stable" test-bpf --features test-bpf -j 1 -- --nocapture
cargo +"$rust_stable" test-bpf --features test-bpf -j 1 -- --nocapture
else
# Build/test all BPF programs
for directory in $(ls -d $run_dir/*/); do
cd $directory
RUST_LOG="error" cargo +"$rust_stable" test-bpf --features test-bpf -j 1 -- --nocapture
cargo +"$rust_stable" test-bpf --features test-bpf -j 1 -- --nocapture
done
fi
5 changes: 3 additions & 2 deletions coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ RUST_LOG="error" CARGO_INCREMENTAL=0 RUSTFLAGS='-Cinstrument-coverage' LLVM_PROF
# generate report
mkdir -p target/coverage/html

grcov . --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html
grcov . --branch --binary-path ./target/debug/deps/ -s . -t html --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/html

grcov . --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/tests.lcov
grcov . --branch --binary-path ./target/debug/deps/ -s . -t lcov --ignore-not-existing --ignore '../*' --ignore "/*" -o target/coverage/tests.lcov

# cleanup
rm *.profraw || true
rm **/**/*.profraw || true

19 changes: 11 additions & 8 deletions token-lending/program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ license = "Apache-2.0"
edition = "2018"

[features]
custom-heap = []
custom-panic = []
no-entrypoint = []
test-bpf = []

Expand All @@ -24,22 +26,23 @@ static_assertions = "1.1.0"
[dev-dependencies]
anchor-lang = "0.28.0"
assert_matches = "1.5.0"
bytemuck = "1.5.1"
base64 = "0.13"
log = "0.4.14"
proptest = "1.0"
solana-program-test = "=1.16.20"
solana-sdk = "=1.16.20"
serde = ">=1.0.140"
serde_yaml = "0.8"
thiserror = "1.0"
bincode = "1.3.3"
borsh = "0.10.3"
bytemuck = "1.5.1"
log = "0.4.14"
pretty_assertions = "1.4.1"
proptest = "1.0"
pyth-sdk-solana = "0.8.0"
pyth-solana-receiver-sdk = "0.3.0"
serde = ">=1.0.140"
serde_yaml = "0.8"
solana-program-test = "=1.16.20"
solana-sdk = "=1.16.20"
switchboard-on-demand = "0.1.12"
switchboard-program = "0.2.0"
switchboard-v2 = "0.1.3"
thiserror = "1.0"

[lib]
crate-type = ["cdylib", "lib"]
Expand Down
Loading
Loading