Remove tokio dev-dependency
This commit is contained in:
parent
c63d854ac7
commit
995d4a029f
|
@ -18,7 +18,6 @@ spl-token = { version = "3.1", path = "../../token/program", features = ["no-ent
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -18,7 +18,6 @@ solana-program = "1.5.11"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -1,16 +1,18 @@
|
||||||
// Mark this test as BPF-only due to current `ProgramTest` limitations when CPIing into the system program
|
// Mark this test as BPF-only due to current `ProgramTest` limitations when CPIing into the system program
|
||||||
#![cfg(feature = "test-bpf")]
|
#![cfg(feature = "test-bpf")]
|
||||||
|
|
||||||
use solana_program::{
|
use {
|
||||||
instruction::{AccountMeta, Instruction},
|
solana_program::{
|
||||||
pubkey::Pubkey,
|
instruction::{AccountMeta, Instruction},
|
||||||
rent::Rent,
|
pubkey::Pubkey,
|
||||||
system_program,
|
rent::Rent,
|
||||||
|
system_program,
|
||||||
|
},
|
||||||
|
solana_program_test::*,
|
||||||
|
solana_sdk::{account::Account, signature::Signer, transaction::Transaction},
|
||||||
|
spl_example_cross_program_invocation::processor::{process_instruction, SIZE},
|
||||||
|
std::str::FromStr,
|
||||||
};
|
};
|
||||||
use solana_program_test::{processor, ProgramTest};
|
|
||||||
use solana_sdk::{account::Account, signature::Signer, transaction::Transaction};
|
|
||||||
use spl_example_cross_program_invocation::processor::{process_instruction, SIZE};
|
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_cross_program_invocation() {
|
async fn test_cross_program_invocation() {
|
||||||
|
|
|
@ -20,7 +20,6 @@ solana-program = "1.5.11"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
use solana_program::{instruction::Instruction, pubkey::Pubkey};
|
use {
|
||||||
use solana_program_test::{processor, ProgramTest};
|
solana_program::{instruction::Instruction, pubkey::Pubkey},
|
||||||
use solana_sdk::{signature::Signer, transaction::Transaction};
|
solana_program_test::*,
|
||||||
use spl_example_custom_heap::processor::process_instruction;
|
solana_sdk::{signature::Signer, transaction::Transaction},
|
||||||
use std::str::FromStr;
|
spl_example_custom_heap::processor::process_instruction,
|
||||||
|
std::str::FromStr,
|
||||||
|
};
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_custom_heap() {
|
async fn test_custom_heap() {
|
||||||
|
|
|
@ -18,7 +18,6 @@ solana-program = "1.5.11"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
use solana_program::{
|
use {
|
||||||
instruction::{AccountMeta, Instruction},
|
solana_program::{
|
||||||
pubkey::Pubkey,
|
instruction::{AccountMeta, Instruction},
|
||||||
|
pubkey::Pubkey,
|
||||||
|
},
|
||||||
|
solana_program_test::*,
|
||||||
|
solana_sdk::{signature::Signer, transaction::Transaction},
|
||||||
|
spl_example_logging::processor::process_instruction,
|
||||||
|
std::str::FromStr,
|
||||||
};
|
};
|
||||||
use solana_program_test::{processor, ProgramTest};
|
|
||||||
use solana_sdk::{signature::Signer, transaction::Transaction};
|
|
||||||
use spl_example_logging::processor::process_instruction;
|
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_logging() {
|
async fn test_logging() {
|
||||||
|
|
|
@ -18,7 +18,6 @@ solana-program = "1.5.11"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
use solana_program::{
|
use {
|
||||||
instruction::{AccountMeta, Instruction},
|
solana_program::{
|
||||||
pubkey::Pubkey,
|
instruction::{AccountMeta, Instruction},
|
||||||
sysvar::{self},
|
pubkey::Pubkey,
|
||||||
|
sysvar::{self},
|
||||||
|
},
|
||||||
|
solana_program_test::*,
|
||||||
|
solana_sdk::{signature::Signer, transaction::Transaction},
|
||||||
|
spl_example_sysvar::processor::process_instruction,
|
||||||
|
std::str::FromStr,
|
||||||
};
|
};
|
||||||
use solana_program_test::{processor, ProgramTest};
|
|
||||||
use solana_sdk::{signature::Signer, transaction::Transaction};
|
|
||||||
use spl_example_sysvar::processor::process_instruction;
|
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_sysvar() {
|
async fn test_sysvar() {
|
||||||
|
|
|
@ -17,7 +17,6 @@ solana-program = "1.5.11"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -1,11 +1,13 @@
|
||||||
use solana_program::{
|
use {
|
||||||
instruction::{AccountMeta, Instruction},
|
solana_program::{
|
||||||
pubkey::Pubkey,
|
instruction::{AccountMeta, Instruction},
|
||||||
|
pubkey::Pubkey,
|
||||||
|
},
|
||||||
|
solana_program_test::*,
|
||||||
|
solana_sdk::{account::Account, signature::Signer, transaction::Transaction},
|
||||||
|
spl_example_transfer_lamports::processor::process_instruction,
|
||||||
|
std::str::FromStr,
|
||||||
};
|
};
|
||||||
use solana_program_test::{processor, ProgramTest};
|
|
||||||
use solana_sdk::{account::Account, signature::Signer, transaction::Transaction};
|
|
||||||
use spl_example_transfer_lamports::processor::process_instruction;
|
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn test_lamport_transfer() {
|
async fn test_lamport_transfer() {
|
||||||
|
|
|
@ -21,7 +21,6 @@ spl-token = { version = "3.1", path = "../../token/program", features = ["no-ent
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -24,7 +24,6 @@ uint = "0.8"
|
||||||
proptest = "0.10"
|
proptest = "0.10"
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
use {
|
use {
|
||||||
solana_program::pubkey::Pubkey,
|
solana_program::pubkey::Pubkey,
|
||||||
solana_program_test::{processor, ProgramTest},
|
solana_program_test::*,
|
||||||
solana_sdk::{signature::Signer, transaction::Transaction},
|
solana_sdk::{signature::Signer, transaction::Transaction},
|
||||||
spl_math::{id, instruction, processor::process_instruction},
|
spl_math::{id, instruction, processor::process_instruction},
|
||||||
};
|
};
|
||||||
|
|
|
@ -17,7 +17,6 @@ solana-program = "1.5.11"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -26,7 +26,6 @@ cd "$(dirname "$0")"
|
||||||
|
|
||||||
source "$solana_dir"/scripts/read-cargo-variable.sh
|
source "$solana_dir"/scripts/read-cargo-variable.sh
|
||||||
solana_ver=$(readCargoVariable version "$solana_dir"/sdk/Cargo.toml)
|
solana_ver=$(readCargoVariable version "$solana_dir"/sdk/Cargo.toml)
|
||||||
tokio_ver=$(sed -n "s#^tokio.*version *= *\"\([^\"]*\).*#\1#p" "$solana_dir"/program-test/Cargo.toml)
|
|
||||||
|
|
||||||
echo "Patching in $solana_ver from $solana_dir"
|
echo "Patching in $solana_ver from $solana_dir"
|
||||||
echo
|
echo
|
||||||
|
@ -57,4 +56,4 @@ PATCH
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
./update-solana-dependencies.sh "$solana_ver" "$tokio_ver"
|
./update-solana-dependencies.sh "$solana_ver"
|
||||||
|
|
|
@ -22,7 +22,6 @@ thiserror = "1.0"
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -10,7 +10,7 @@ use {
|
||||||
rent::Rent,
|
rent::Rent,
|
||||||
system_instruction,
|
system_instruction,
|
||||||
},
|
},
|
||||||
solana_program_test::{processor, ProgramTest, ProgramTestContext},
|
solana_program_test::*,
|
||||||
solana_sdk::{
|
solana_sdk::{
|
||||||
signature::{Keypair, Signer},
|
signature::{Keypair, Signer},
|
||||||
transaction::{Transaction, TransactionError},
|
transaction::{Transaction, TransactionError},
|
||||||
|
|
|
@ -27,7 +27,6 @@ bincode = "1.3.1"
|
||||||
solana-program-test = "1.5.11"
|
solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
solana-vote-program = "1.5.11"
|
solana-vote-program = "1.5.11"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -5,7 +5,7 @@ mod helpers;
|
||||||
use helpers::*;
|
use helpers::*;
|
||||||
|
|
||||||
use solana_program::hash::Hash;
|
use solana_program::hash::Hash;
|
||||||
use solana_program_test::BanksClient;
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::InstructionError,
|
instruction::InstructionError,
|
||||||
signature::{Keypair, Signer},
|
signature::{Keypair, Signer},
|
||||||
|
|
|
@ -9,7 +9,7 @@ use solana_program::{
|
||||||
program_pack::Pack,
|
program_pack::Pack,
|
||||||
system_instruction, sysvar,
|
system_instruction, sysvar,
|
||||||
};
|
};
|
||||||
use solana_program_test::BanksClient;
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
|
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
|
||||||
transaction::TransactionError, transport::TransportError,
|
transaction::TransactionError, transport::TransportError,
|
||||||
|
|
|
@ -6,7 +6,7 @@ use helpers::*;
|
||||||
use solana_program::hash::Hash;
|
use solana_program::hash::Hash;
|
||||||
use solana_program::instruction::AccountMeta;
|
use solana_program::instruction::AccountMeta;
|
||||||
use solana_program::instruction::Instruction;
|
use solana_program::instruction::Instruction;
|
||||||
use solana_program_test::BanksClient;
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
|
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
|
||||||
transaction::TransactionError, transport::TransportError,
|
transaction::TransactionError, transport::TransportError,
|
||||||
|
|
|
@ -8,7 +8,7 @@ use solana_program::hash::Hash;
|
||||||
use solana_program::instruction::AccountMeta;
|
use solana_program::instruction::AccountMeta;
|
||||||
use solana_program::instruction::Instruction;
|
use solana_program::instruction::Instruction;
|
||||||
use solana_program::sysvar;
|
use solana_program::sysvar;
|
||||||
use solana_program_test::BanksClient;
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
|
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
|
||||||
transaction::TransactionError, transport::TransportError,
|
transaction::TransactionError, transport::TransportError,
|
||||||
|
|
|
@ -6,7 +6,7 @@ use {
|
||||||
crate::helpers::TEST_STAKE_AMOUNT,
|
crate::helpers::TEST_STAKE_AMOUNT,
|
||||||
helpers::*,
|
helpers::*,
|
||||||
solana_program::{native_token, pubkey::Pubkey},
|
solana_program::{native_token, pubkey::Pubkey},
|
||||||
solana_program_test::BanksClient,
|
solana_program_test::*,
|
||||||
solana_sdk::signature::Signer,
|
solana_sdk::signature::Signer,
|
||||||
spl_stake_pool::*,
|
spl_stake_pool::*,
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
mod helpers;
|
mod helpers;
|
||||||
|
|
||||||
use helpers::*;
|
use helpers::*;
|
||||||
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
|
instruction::InstructionError, signature::Keypair, signature::Signer, transaction::Transaction,
|
||||||
transaction::TransactionError, transport::TransportError,
|
transaction::TransactionError, transport::TransportError,
|
||||||
|
|
|
@ -9,7 +9,7 @@ use solana_program::hash::Hash;
|
||||||
use solana_program::instruction::AccountMeta;
|
use solana_program::instruction::AccountMeta;
|
||||||
use solana_program::instruction::Instruction;
|
use solana_program::instruction::Instruction;
|
||||||
use solana_program::sysvar;
|
use solana_program::sysvar;
|
||||||
use solana_program_test::BanksClient;
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::InstructionError,
|
instruction::InstructionError,
|
||||||
signature::{Keypair, Signer},
|
signature::{Keypair, Signer},
|
||||||
|
|
|
@ -6,6 +6,7 @@ use crate::solana_program::pubkey::Pubkey;
|
||||||
use helpers::*;
|
use helpers::*;
|
||||||
|
|
||||||
use bincode::deserialize;
|
use bincode::deserialize;
|
||||||
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::InstructionError,
|
instruction::InstructionError,
|
||||||
signature::{Keypair, Signer},
|
signature::{Keypair, Signer},
|
||||||
|
|
|
@ -9,7 +9,7 @@ use solana_program::instruction::AccountMeta;
|
||||||
use solana_program::instruction::Instruction;
|
use solana_program::instruction::Instruction;
|
||||||
use solana_program::pubkey::Pubkey;
|
use solana_program::pubkey::Pubkey;
|
||||||
use solana_program::sysvar;
|
use solana_program::sysvar;
|
||||||
use solana_program_test::BanksClient;
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::InstructionError,
|
instruction::InstructionError,
|
||||||
signature::{Keypair, Signer},
|
signature::{Keypair, Signer},
|
||||||
|
|
|
@ -6,7 +6,7 @@ use helpers::*;
|
||||||
use solana_program::pubkey::Pubkey;
|
use solana_program::pubkey::Pubkey;
|
||||||
|
|
||||||
use solana_program::hash::Hash;
|
use solana_program::hash::Hash;
|
||||||
use solana_program_test::BanksClient;
|
use solana_program_test::*;
|
||||||
use solana_sdk::{
|
use solana_sdk::{
|
||||||
instruction::InstructionError,
|
instruction::InstructionError,
|
||||||
signature::{Keypair, Signer},
|
signature::{Keypair, Signer},
|
||||||
|
|
|
@ -31,7 +31,6 @@ solana-program-test = "1.5.11"
|
||||||
solana-sdk = "1.5.11"
|
solana-sdk = "1.5.11"
|
||||||
serde = "1.0"
|
serde = "1.0"
|
||||||
serde_yaml = "0.8"
|
serde_yaml = "0.8"
|
||||||
tokio = { version = "0.3", features = ["macros"]}
|
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
crate-type = ["cdylib", "lib"]
|
crate-type = ["cdylib", "lib"]
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
mod helpers;
|
mod helpers;
|
||||||
|
|
||||||
use helpers::*;
|
use helpers::*;
|
||||||
|
use solana_program_test::*;
|
||||||
use solana_sdk::signature::Keypair;
|
use solana_sdk::signature::Keypair;
|
||||||
use spl_token_lending::{
|
use spl_token_lending::{
|
||||||
instruction::BorrowAmountType,
|
instruction::BorrowAmountType,
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
solana_ver=$1
|
solana_ver=$1
|
||||||
tokio_ver=$2
|
|
||||||
if [[ -z $solana_ver ]]; then
|
if [[ -z $solana_ver ]]; then
|
||||||
echo "Usage: $0 <new-solana-version>"
|
echo "Usage: $0 <new-solana-version>"
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -37,6 +36,3 @@ set -x
|
||||||
for crate in "${crates[@]}"; do
|
for crate in "${crates[@]}"; do
|
||||||
sed -i -e "s#\(${crate} = \"\).*\(\"\)#\1$solana_ver\2#g" "${tomls[@]}"
|
sed -i -e "s#\(${crate} = \"\).*\(\"\)#\1$solana_ver\2#g" "${tomls[@]}"
|
||||||
done
|
done
|
||||||
if [[ -n $tokio_ver ]]; then
|
|
||||||
sed -i -e "s#\(tokio.*version *= *\"\)[^\"]*\(\".*$\)#\1$tokio_ver\2#g" "${tomls[@]}"
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in New Issue