@@ -18,8 +18,7 @@ partial class Build
1818 const string SnapshotExplorationTestProbesFileName = "SnapshotExplorationTestProbes.csv" ;
1919 const string SnapshotExplorationTestReportFolderName = "SnapshotExplorationTestReport" ;
2020 const string SnapshotExplorationEnabledKey = "DD_INTERNAL_SNAPSHOT_EXPLORATION_TEST_ENABLED" ;
21- const string SnapshotExplorationProbesFilePathKey = "DD_INTERNAL_SNAPSHOT_EXPLORATION_TEST_PROBES_FILE_PATH" ;
22- const string SnapshotExplorationReportFolderPathKey = "DD_INTERNAL_SNAPSHOT_EXPLORATION_TEST_REPORT_FOLDER_PATH" ;
21+ const string SnapshotExplorationRootPathKey = "DD_INTERNAL_SNAPSHOT_EXPLORATION_TEST_ROOT_PATH" ;
2322 const char SpecialSeparator = '#' ;
2423
2524 readonly List < string > IgnoredNamespaces = new ( )
@@ -39,6 +38,15 @@ partial class Build
3938 "testhost"
4039 } ;
4140
41+ static string GetSnapshotExplorationRootPath ( string testRootPath , TargetFramework framework )
42+ => Path . Combine ( testRootPath , SnapshotExplorationTestFolderName , framework ) ;
43+
44+ static string GetSnapshotExplorationProbesFilePath ( string snapshotExplorationRootPath )
45+ => Path . Combine ( snapshotExplorationRootPath , SnapshotExplorationTestProbesFileName ) ;
46+
47+ static string GetSnapshotExplorationReportFolderPath ( string snapshotExplorationRootPath )
48+ => Path . Combine ( snapshotExplorationRootPath , SnapshotExplorationTestReportFolderName ) ;
49+
4250 void RunSnapshotExplorationTestsInternal ( )
4351 {
4452 if ( ExplorationTestName . HasValue )
@@ -80,15 +88,16 @@ void RunSnapshotExplorationTest(ExplorationTestDescription testDescription)
8088 testDescription . IsSnapshotScenario = true ;
8189 var envVariables = GetEnvironmentVariables ( testDescription , framework ) ;
8290 var testRootPath = testDescription . GetTestTargetPath ( ExplorationTestsDirectory , framework , BuildConfiguration ) ;
83- FileSystemTasks . EnsureCleanDirectory ( Path . Combine ( testRootPath , SnapshotExplorationTestFolderName , framework , SnapshotExplorationTestReportFolderName ) ) ;
91+ var snapshotExplorationRootPath = GetSnapshotExplorationRootPath ( testRootPath , framework ) ;
92+ FileSystemTasks . EnsureCleanDirectory ( GetSnapshotExplorationReportFolderPath ( snapshotExplorationRootPath ) ) ;
8493
8594 var testStopwatch = Stopwatch . StartNew ( ) ;
8695 Test ( testDescription , framework , envVariables ) ;
8796 testStopwatch . Stop ( ) ;
8897
8998 VerifySnapshotExplorationTestResults (
90- envVariables [ SnapshotExplorationProbesFilePathKey ] ,
91- envVariables [ SnapshotExplorationReportFolderPathKey ] ,
99+ GetSnapshotExplorationProbesFilePath ( snapshotExplorationRootPath ) ,
100+ GetSnapshotExplorationReportFolderPath ( snapshotExplorationRootPath ) ,
92101 testStopwatch . Elapsed ) ;
93102 }
94103 }
@@ -117,7 +126,8 @@ void CreateSnapshotExplorationTestCsv(ExplorationTestDescription testDescription
117126 foreach ( var framework in frameworks )
118127 {
119128 var testRootPath = testDescription . GetTestTargetPath ( ExplorationTestsDirectory , framework , BuildConfiguration ) ;
120- FileSystemTasks . EnsureCleanDirectory ( Path . Combine ( testRootPath , SnapshotExplorationTestFolderName , framework ) ) ;
129+ var snapshotExplorationRootPath = GetSnapshotExplorationRootPath ( testRootPath , framework ) ;
130+ FileSystemTasks . EnsureCleanDirectory ( snapshotExplorationRootPath ) ;
121131 var tracerAssemblyPath = GetTracerAssemblyPath ( framework ) ;
122132 var tracer = Assembly . LoadFile ( tracerAssemblyPath ) ;
123133 var extractorType = tracer . GetType ( "Datadog.Trace.Debugger.Symbols.SymbolExtractor" ) ;
@@ -158,7 +168,7 @@ void CreateSnapshotExplorationTestCsv(ExplorationTestDescription testDescription
158168 }
159169 }
160170
161- File . WriteAllText ( Path . Combine ( testRootPath , SnapshotExplorationTestFolderName , framework , SnapshotExplorationTestProbesFileName ) , csvBuilder . ToString ( ) ) ;
171+ File . WriteAllText ( GetSnapshotExplorationProbesFilePath ( snapshotExplorationRootPath ) , csvBuilder . ToString ( ) ) ;
162172 }
163173
164174 return ;
@@ -802,6 +812,13 @@ public void VerifySnapshotExplorationTestResults(string probesFilePath, string r
802812 throw new Exception ( $ "Snapshot exploration test failed: { invalidOrErrorProbes . Count } invalid snapshots, { failedDuringProcessing . Count } processing failures, { probeRelatedErrors . Count } probe errors, { criticalNativeFailures . Count } native rewriter failures, { skippedProbes . Count } signature mismatches") ;
803813 }
804814
815+ if ( installedCount == 0 && definedProbes . Count > 0 )
816+ {
817+ Logger . Error ( "║ RESULT: FAILED - No probes installed ║" ) ;
818+ Logger . Error ( "╚══════════════════════════════════════════════════════════════╝" ) ;
819+ throw new Exception ( "Snapshot exploration test failed: No probes were installed. Check debugger initialization and probe loading." ) ;
820+ }
821+
805822 if ( reportedCount == 0 && installedCount > 0 )
806823 {
807824 Logger . Error ( "║ RESULT: FAILED - No snapshots collected ║" ) ;
0 commit comments