File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ serde = { version = "1", features = ["derive"] }
1616
1717[dev-dependencies ]
1818tempfile = " 3"
19+ env_logger = " 0.7"
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ impl CSharpPlugin {
3333
3434 /// Extracts the included TMC_CSHARP_RUNNER to the given path
3535 fn extract_runner ( target : & Path ) -> Result < ( ) , CSharpError > {
36+ log:: debug!( "extracting C# runner to {}" , target. display( ) ) ;
37+
3638 let mut zip =
3739 ZipArchive :: new ( Cursor :: new ( TMC_CSHARP_RUNNER ) ) . map_err ( |e| CSharpError :: Zip ( e) ) ?;
3840 for i in 0 ..zip. len ( ) {
@@ -74,11 +76,13 @@ impl CSharpPlugin {
7476 /// Returns the path to the TMC C# runner in the cache. If TMC_CSHARP_BOOTSTRAP_PATH, it is returned instead.
7577 fn get_bootstrap_path ( ) -> Result < PathBuf , CSharpError > {
7678 if let Ok ( var) = env:: var ( "TMC_CSHARP_BOOTSTRAP_PATH" ) {
79+ log:: debug!( "using bootstrap path TMC_CSHARP_BOOTSTRAP_PATH={}" , var) ;
7780 Ok ( PathBuf :: from ( var) )
7881 } else {
7982 let runner_path = Self :: get_runner_dir ( ) ?;
8083 let bootstrap = runner_path. join ( "TestMyCode.CSharp.Bootstrap.dll" ) ;
8184 if bootstrap. exists ( ) {
85+ log:: debug!( "found boostrap dll at {}" , bootstrap. display( ) ) ;
8286 Ok ( bootstrap)
8387 } else {
8488 Err ( CSharpError :: MissingBootstrapDll ( bootstrap) . into ( ) )
@@ -234,6 +238,10 @@ mod test {
234238 use super :: * ;
235239 use tempfile:: TempDir ;
236240
241+ fn init ( ) {
242+ let _ = env_logger:: builder ( ) . is_test ( true ) . try_init ( ) ;
243+ }
244+
237245 fn copy_test_dir ( path : & str ) -> TempDir {
238246 let path = Path :: new ( path) ;
239247
You can’t perform that action at this time.
0 commit comments