Employ test-bpf feature to make 'cargo test' pass
This commit is contained in:
parent
4ab5fd3f23
commit
e0a6292bd6
|
@ -1,5 +1,6 @@
|
||||||
[workspace]
|
[workspace]
|
||||||
members = [
|
members = [
|
||||||
|
"associated-token-account/program",
|
||||||
"memo/program",
|
"memo/program",
|
||||||
"shared-memory/program",
|
"shared-memory/program",
|
||||||
"stake-pool/program",
|
"stake-pool/program",
|
||||||
|
@ -14,6 +15,5 @@ members = [
|
||||||
"utils/test-client",
|
"utils/test-client",
|
||||||
]
|
]
|
||||||
exclude = [
|
exclude = [
|
||||||
"associated-token-account/program", # Exclude until `cargo test` works
|
|
||||||
"themis/client_ristretto",
|
"themis/client_ristretto",
|
||||||
]
|
]
|
||||||
|
|
|
@ -9,6 +9,7 @@ edition = "2018"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
no-entrypoint = []
|
no-entrypoint = []
|
||||||
|
test-bpf = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-program = "1.4.4"
|
solana-program = "1.4.4"
|
||||||
|
@ -24,5 +25,3 @@ crate-type = ["cdylib", "lib"]
|
||||||
|
|
||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
targets = ["x86_64-unknown-linux-gnu"]
|
targets = ["x86_64-unknown-linux-gnu"]
|
||||||
|
|
||||||
[workspace]
|
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
// Mark this test as BPF-only due to current `ProgramTest` limitations when CPIing into the system program
|
||||||
|
#![cfg(feature = "test-bpf")]
|
||||||
|
|
||||||
use solana_program::{instruction::*, program_pack::Pack, pubkey::Pubkey, system_instruction};
|
use solana_program::{instruction::*, program_pack::Pack, pubkey::Pubkey, system_instruction};
|
||||||
use solana_program_test::*;
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
|
@ -10,8 +13,7 @@ fn program_test(token_mint_address: Pubkey) -> ProgramTest {
|
||||||
let mut pc = ProgramTest::new(
|
let mut pc = ProgramTest::new(
|
||||||
"spl_associated_token_account",
|
"spl_associated_token_account",
|
||||||
id(),
|
id(),
|
||||||
// TODO: BPF only until native CPI rework in the monorepo completes
|
processor!(processor::process_instruction),
|
||||||
None, //processor!(processor::process_instruction),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// Add SPL Token program
|
// Add SPL Token program
|
||||||
|
|
Loading…
Reference in New Issue