diff --git a/program-test/src/lib.rs b/program-test/src/lib.rs index 0837d30845..8d503e9ea9 100644 --- a/program-test/src/lib.rs +++ b/program-test/src/lib.rs @@ -476,8 +476,9 @@ impl ProgramTest { } /// Add an account to the test environment - pub fn add_account(&mut self, address: Pubkey, account: AccountSharedData) { - self.accounts.push((address, account)); + pub fn add_account(&mut self, address: Pubkey, account: Account) { + self.accounts + .push((address, AccountSharedData::from(account))); } /// Add an account to the test environment with the account data in the provided `filename` @@ -490,7 +491,7 @@ impl ProgramTest { ) { self.add_account( address, - AccountSharedData::from(Account { + Account { lamports, data: read_file(find_file(filename).unwrap_or_else(|| { panic!("Unable to locate {}", filename); @@ -498,7 +499,7 @@ impl ProgramTest { owner, executable: false, rent_epoch: 0, - }), + }, ); } @@ -513,14 +514,14 @@ impl ProgramTest { ) { self.add_account( address, - AccountSharedData::from(Account { + Account { lamports, data: base64::decode(data_base64) .unwrap_or_else(|err| panic!("Failed to base64 decode: {}", err)), owner, executable: false, rent_epoch: 0, - }), + }, ); } @@ -576,13 +577,13 @@ impl ProgramTest { self.add_account( program_id, - AccountSharedData::from(Account { + Account { lamports: Rent::default().minimum_balance(data.len()).min(1), data, owner: loader, executable: true, rent_epoch: 0, - }), + }, ); } else { info!("\"{}\" program loaded as native code", program_name); diff --git a/scripts/build-downstream-projects.sh b/scripts/build-downstream-projects.sh index 84c9f5a914..f3a4117b6a 100755 --- a/scripts/build-downstream-projects.sh +++ b/scripts/build-downstream-projects.sh @@ -67,15 +67,8 @@ spl() { ./patch.crates-io.sh "$solana_dir" $cargo build - - # Generic `cargo test`/`cargo test-bpf` disabled due to BPF VM interface changes between Solana 1.4 - # and 1.5... - #$cargo test - #$cargo_test_bpf - - $cargo_test_bpf --manifest-path token/program/Cargo.toml - $cargo_test_bpf --manifest-path associated-token-account/program/Cargo.toml - $cargo_test_bpf --manifest-path feature-proposal/program/Cargo.toml + $cargo test + $cargo_test_bpf ) }