File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -417,4 +417,33 @@ mod memory {
417417 )
418418 . await ;
419419 }
420+
421+ #[ test_log:: test( tokio:: test) ]
422+ async fn test_memory_executor_forwards_path ( ) {
423+ let ( system_info, run_data, _temp_dir) = create_test_setup ( ) . await ;
424+ let ( _permit, _lock, executor) = get_memory_executor ( ) . await ;
425+
426+ let custom_path = "/custom/test/path" ;
427+ let current_path = std:: env:: var ( "PATH" ) . unwrap ( ) ;
428+ let modified_path = format ! ( "{custom_path}:{current_path}" ) ;
429+
430+ temp_env:: async_with_vars ( & [ ( "PATH" , Some ( & modified_path) ) ] , async {
431+ let cmd = format ! (
432+ r#"
433+ if ! echo "$PATH" | grep -q "{custom_path}"; then
434+ echo "FAIL: PATH does not contain custom path {custom_path}"
435+ echo "Got PATH: $PATH"
436+ exit 1
437+ fi
438+ "#
439+ ) ;
440+
441+ let config = memory_config ( & cmd) ;
442+ executor
443+ . run ( & config, & system_info, & run_data, & None )
444+ . await
445+ . unwrap ( ) ;
446+ } )
447+ . await ;
448+ }
420449}
You can’t perform that action at this time.
0 commit comments