Skip to content

Commit b766f95

Browse files
committed
checkpoint 3
1 parent 1236f31 commit b766f95

File tree

10 files changed

+9
-6
lines changed

10 files changed

+9
-6
lines changed

svm/pinocchio/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[workspace]
2-
members = ["programs/*"]
2+
members = ["programs/*", "tests/*"]
33
resolver = "2"
44

55
[profile.release]

svm/pinocchio/README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ This directory contains Solana programs built with the Pinocchio framework for t
66

77
- `programs/executor-quoter/` - Quoter program for price quotes
88
- `programs/executor-quoter-router/` - Router program for quoter registration and execution routing
9-
- `programs/executor-quoter-tests/` - Integration tests for executor-quoter
10-
- `programs/executor-quoter-router-tests/` - Integration tests for executor-quoter-router
9+
- `tests/executor-quoter-tests/` - Integration tests and benchmarks for executor-quoter
10+
- `tests/executor-quoter-router-tests/` - Integration tests and benchmarks for executor-quoter-router
1111

1212
## Prerequisites
1313

@@ -69,11 +69,14 @@ export QUOTER_UPDATER_PUBKEY=$(solana-keygen pubkey ../test-keys/quoter-updater.
6969
export QUOTER_UPDATER_KEYPAIR_PATH=$(pwd)/../test-keys/quoter-updater.json
7070
export SBF_OUT_DIR=$(pwd)/target/deploy
7171

72-
# Run all tests
73-
cargo test -p executor-quoter -p executor-quoter-tests -p executor-quoter-router-tests
72+
# Run unit tests (pure Rust math module)
73+
cargo test -p executor-quoter
74+
75+
# Run integration tests (uses mollusk-svm to simulate program execution)
76+
cargo test -p executor-quoter-tests -p executor-quoter-router-tests
7477
```
7578

76-
Note: Do not use `cargo test --all` as it attempts to compile the BPF programs for native targets, which fails due to SBF-specific syscalls.
79+
Note: These tests use native `cargo test`, not `cargo test-sbf`. The unit tests are pure Rust without SBF dependencies. The integration tests use mollusk-svm which loads the pre-built `.so` files and simulates program execution natively.
7780

7881
## Running Benchmarks
7982

svm/pinocchio/programs/executor-quoter-router-tests/Cargo.toml renamed to svm/pinocchio/tests/executor-quoter-router-tests/Cargo.toml

File renamed without changes.

svm/pinocchio/programs/executor-quoter-router-tests/benches/compute_units.rs renamed to svm/pinocchio/tests/executor-quoter-router-tests/benches/compute_units.rs

File renamed without changes.

svm/pinocchio/programs/executor-quoter-router-tests/src/lib.rs renamed to svm/pinocchio/tests/executor-quoter-router-tests/src/lib.rs

File renamed without changes.

svm/pinocchio/programs/executor-quoter-router-tests/tests/integration.rs renamed to svm/pinocchio/tests/executor-quoter-router-tests/tests/integration.rs

File renamed without changes.

svm/pinocchio/programs/executor-quoter-tests/Cargo.toml renamed to svm/pinocchio/tests/executor-quoter-tests/Cargo.toml

File renamed without changes.

svm/pinocchio/programs/executor-quoter-tests/benches/compute_units.rs renamed to svm/pinocchio/tests/executor-quoter-tests/benches/compute_units.rs

File renamed without changes.

svm/pinocchio/programs/executor-quoter-tests/src/lib.rs renamed to svm/pinocchio/tests/executor-quoter-tests/src/lib.rs

File renamed without changes.

svm/pinocchio/programs/executor-quoter-tests/tests/integration.rs renamed to svm/pinocchio/tests/executor-quoter-tests/tests/integration.rs

File renamed without changes.

0 commit comments

Comments
 (0)