Serialize test (#9655)

This commit is contained in:
Jack May 2020-04-22 14:53:06 -07:00 committed by GitHub
parent 5d2f488004
commit 17e7667da4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 2 deletions

2
Cargo.lock generated
View File

@ -3754,6 +3754,8 @@ dependencies = [
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"num-derive 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"serial_test 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serial_test_derive 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-logger 1.2.0",
"solana-sdk 1.2.0",
"solana_rbpf 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@ -20,6 +20,10 @@ solana-sdk = { path = "../../sdk", version = "1.2.0" }
solana_rbpf = "=0.1.25"
thiserror = "1.0"
[dev-dependencies]
serial_test = "0.4.0"
serial_test_derive = "0.4.0"
[lib]
crate-type = ["lib", "cdylib"]
name = "solana_bpf_loader_program"

View File

@ -258,6 +258,7 @@ impl HelperObject<BPFError> for HelperSolAllocFree {
#[cfg(test)]
mod tests {
use super::*;
use serial_test_derive::serial;
use solana_sdk::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey,
@ -403,10 +404,10 @@ mod tests {
.unwrap();
}
// Ignore this test: solana_logger conflicts when running tests concurrently,
// Serialize this test: solana_logger conflicts when running tests concurrently,
// this results in the bad string length being ignored and not returning an error
#[ignore]
#[test]
#[serial]
fn test_helper_sol_log() {
let string = "Gaggablaghblagh!";
let addr = string.as_ptr() as *const _ as u64;
@ -431,7 +432,10 @@ mod tests {
.unwrap_err();
}
// Serialize this test: solana_logger conflicts when running tests concurrently,
// this results in the bad string length being ignored and not returning an error
#[test]
#[serial]
fn test_helper_sol_log_u64() {
solana_logger::setup_with_default("solana=info");