diff --git a/v2/robotmk/src/bin/scheduler/results.rs b/v2/robotmk/src/bin/scheduler/results.rs index e2104228..9e0d03a1 100644 --- a/v2/robotmk/src/bin/scheduler/results.rs +++ b/v2/robotmk/src/bin/scheduler/results.rs @@ -28,6 +28,7 @@ impl WriteSection for SchedulerPhase { #[derive(Serialize)] pub struct RCCSetupFailures { pub telemetry_disabling: Vec, + pub long_path_support: Vec, pub shared_holotree: Vec, pub holotree_init: Vec, } diff --git a/v2/robotmk/src/bin/scheduler/setup/rcc.rs b/v2/robotmk/src/bin/scheduler/setup/rcc.rs index 5cfa2305..7d98367c 100644 --- a/v2/robotmk/src/bin/scheduler/setup/rcc.rs +++ b/v2/robotmk/src/bin/scheduler/setup/rcc.rs @@ -53,6 +53,7 @@ fn rcc_setup_working_directory(working_directory: &Utf8Path) -> Utf8PathBuf { fn rcc_setup(global_config: &GlobalConfig, rcc_suites: Vec) -> Result> { let mut rcc_setup_failures = RCCSetupFailures { telemetry_disabling: vec![], + long_path_support: vec![], shared_holotree: vec![], holotree_init: vec![], }; @@ -64,11 +65,24 @@ fn rcc_setup(global_config: &GlobalConfig, rcc_suites: Vec) -> Result, +) -> Result<(Vec, Vec)> { + run_command_spec_once_in_current_session( + global_config, + suites, + &CommandSpec { + executable: global_config.rcc_binary_path.to_string(), + arguments: vec!["configure".into(), "longpaths".into(), "--enable".into()], + }, + "long_path_support_enabling", ) } @@ -123,38 +152,19 @@ fn shared_holotree_init( global_config: &GlobalConfig, suites: Vec, ) -> Result<(Vec, Vec)> { - Ok( - if run_command_spec_in_session( - &Session::Current(CurrentSession {}), - &RunSpec { - id: "rcc_shared_holotree_init", - command_spec: &CommandSpec { - executable: global_config.rcc_binary_path.to_string(), - arguments: vec![ - "holotree".into(), - "shared".into(), - "--enable".into(), - "--once".into(), - ], - }, - base_path: &rcc_setup_working_directory(&global_config.working_directory) - .join("shared_holotree_init"), - timeout: 120, - termination_flag: &global_config.termination_flag, - }, - )? { - (suites, vec![]) - } else { - error!( - "Shared holotree initialization failed for the following suites which will now be dropped: {}", - suites - .iter() - .map(|suite| suite.name.as_str()) - .collect::>() - .join(", ") - ); - (vec![], suites) + run_command_spec_once_in_current_session( + global_config, + suites, + &CommandSpec { + executable: global_config.rcc_binary_path.to_string(), + arguments: vec![ + "holotree".into(), + "shared".into(), + "--enable".into(), + "--once".into(), + ], }, + "shared_holotree_init", ) } @@ -173,6 +183,30 @@ fn holotree_init( ) } +fn run_command_spec_once_in_current_session( + global_config: &GlobalConfig, + suites: Vec, + command_spec: &CommandSpec, + id: &str, +) -> Result<(Vec, Vec)> { + Ok( + if run_command_spec_in_session( + &Session::Current(CurrentSession {}), + &RunSpec { + id: &format!("robotmk_{id}"), + command_spec, + base_path: &rcc_setup_working_directory(&global_config.working_directory).join(id), + timeout: 120, + termination_flag: &global_config.termination_flag, + }, + )? { + (suites, vec![]) + } else { + (vec![], suites) + }, + ) +} + fn run_command_spec_per_session( global_config: &GlobalConfig, suites: Vec,