mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-06 10:11:44 +00:00
Output network-test logs into files in CI (#6355)
* Add ci_logger * Update artifact name * Add env var * Add fork_name * Fix clippy error * Add comments
This commit is contained in:
@@ -57,3 +57,4 @@ disable-backfill = []
|
||||
fork_from_env = ["beacon_chain/fork_from_env"]
|
||||
portable = ["beacon_chain/portable"]
|
||||
test_logger = []
|
||||
ci_logger = []
|
||||
|
||||
@@ -15,7 +15,7 @@ use beacon_chain::data_availability_checker::Availability;
|
||||
use beacon_chain::eth1_chain::CachingEth1Backend;
|
||||
use beacon_chain::test_utils::{
|
||||
build_log, generate_rand_block_and_blobs, generate_rand_block_and_data_columns, test_spec,
|
||||
BeaconChainHarness, EphemeralHarnessType, NumBlobs,
|
||||
BeaconChainHarness, EphemeralHarnessType, LoggerType, NumBlobs,
|
||||
};
|
||||
use beacon_chain::validator_monitor::timestamp_now;
|
||||
use beacon_chain::{
|
||||
@@ -103,8 +103,14 @@ struct TestRigConfig {
|
||||
|
||||
impl TestRig {
|
||||
fn test_setup_with_config(config: Option<TestRigConfig>) -> Self {
|
||||
let enable_log = cfg!(feature = "test_logger");
|
||||
let log = build_log(slog::Level::Trace, enable_log);
|
||||
let logger_type = if cfg!(feature = "test_logger") {
|
||||
LoggerType::Test
|
||||
} else if cfg!(feature = "ci_logger") {
|
||||
LoggerType::CI
|
||||
} else {
|
||||
LoggerType::Null
|
||||
};
|
||||
let log = build_log(slog::Level::Trace, logger_type);
|
||||
|
||||
// Use `fork_from_env` logic to set correct fork epochs
|
||||
let mut spec = test_spec::<E>();
|
||||
|
||||
Reference in New Issue
Block a user