Generate a script to rerun the failed sub-command in cargo-test-bpf (#18582)
* Generate a script to rerun the failed sub-command in cargo-test-bpf * Generate a script to rerun the failed sub-command in cargo-build-bpf * Add cargo-build-bpf test for generate-child-script-on-failure option
This commit is contained in:
18
sdk/cargo-build-bpf/tests/crates/fail/Cargo.toml
Normal file
18
sdk/cargo-build-bpf/tests/crates/fail/Cargo.toml
Normal file
@ -0,0 +1,18 @@
|
||||
[package]
|
||||
name = "fail"
|
||||
version = "1.8.0"
|
||||
description = "Solana BPF test program written in Rust"
|
||||
authors = ["Solana Maintainers <maintainers@solana.foundation>"]
|
||||
repository = "https://github.com/solana-labs/solana"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://solana.com/"
|
||||
edition = "2018"
|
||||
publish = false
|
||||
|
||||
[dependencies]
|
||||
solana-program = { path = "../../../../program", version = "=1.8.0" }
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[workspace]
|
15
sdk/cargo-build-bpf/tests/crates/fail/src/lib.rs
Normal file
15
sdk/cargo-build-bpf/tests/crates/fail/src/lib.rs
Normal file
@ -0,0 +1,15 @@
|
||||
//! @brief Example Rust-based BPF noop program
|
||||
|
||||
extern crate solana_program;
|
||||
use solana_program::{
|
||||
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,
|
||||
};
|
||||
|
||||
entrypoint!(process_instruction);
|
||||
fn process_instruction(
|
||||
_program_id: &Pubkey,
|
||||
_accounts: &[AccountInfo],
|
||||
_instruction_data: &[u8],
|
||||
) -> ProgramResult {
|
||||
// error to make build fail: no return value
|
||||
}
|
Reference in New Issue
Block a user