Skip to content

Commit

Permalink
Fix fork_name and env
Browse files Browse the repository at this point in the history
  • Loading branch information
ackintosh committed Sep 4, 2024
1 parent cf49d44 commit 4590a1c
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions beacon_node/beacon_chain/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ use types::{typenum::U4294967296, *};
pub const HARNESS_GENESIS_TIME: u64 = 1_567_552_690;
// Environment variable to read if `fork_from_env` feature is enabled.
pub const FORK_NAME_ENV_VAR: &str = "FORK_NAME";
// Environment variable to read if `ci_logger` feature is enabled.
pub const CI_LOGGER_DIR_ENV_VAR: &str = "CI_LOGGER_DIR";

// Default target aggregators to set during testing, this ensures an aggregator at each slot.
//
Expand Down Expand Up @@ -2614,11 +2616,11 @@ fn test_decorator() -> TermDecorator {
}

fn ci_decorator() -> PlainSyncDecorator<BufWriter<File>> {
let log_dir = std::env::var("CI_LOGGER_DIR").unwrap_or_else(|e| {
panic!("CI_LOGGER_DIR env var must be defined when using ci_logger: {e:?}");
let log_dir = std::env::var(CI_LOGGER_DIR_ENV_VAR).unwrap_or_else(|e| {
panic!("{CI_LOGGER_DIR_ENV_VAR} env var must be defined when using ci_logger: {e:?}");
});
let fork_name = std::env::var(FORK_NAME_ENV_VAR)
.map(|n| format!("_{n}"))
.map(|n| format!("{n}_"))
.unwrap_or_default();
let test_name = std::thread::current()
.name()
Expand Down

0 comments on commit 4590a1c

Please sign in to comment.