File tree Expand file tree Collapse file tree 3 files changed +29
-9
lines changed
ql/integration-tests/all-platforms/binlog Expand file tree Collapse file tree 3 files changed +29
-9
lines changed Original file line number Diff line number Diff line change @@ -154,8 +154,20 @@ static bool filter(CompilerCall compilerCall)
154154
155155 var compilerCall = compilationData . CompilerCall ;
156156 var diagnosticName = compilerCall . GetDiagnosticName ( ) ;
157- logger . LogInfo ( $ " Processing compilation { diagnosticName } ") ;
157+ logger . LogInfo ( $ " Processing compilation { diagnosticName } at { compilerCall . ProjectDirectory } ") ;
158158 var compilerArgs = compilerCall . GetArguments ( ) ;
159+
160+ var compilationIdentifierPath = string . Empty ;
161+ try
162+ {
163+ compilationIdentifierPath = FileUtils . ConvertPathToSafeRelativePath (
164+ Path . GetRelativePath ( Directory . GetCurrentDirectory ( ) , compilerCall . ProjectDirectory ) ) ;
165+ }
166+ catch ( ArgumentException exc )
167+ {
168+ logger . LogWarning ( $ " Failed to get relative path for { compilerCall . ProjectDirectory } from current working directory { Directory . GetCurrentDirectory ( ) } : { exc . Message } ") ;
169+ }
170+
159171 var args = reader . ReadCommandLineArguments ( compilerCall ) ;
160172
161173 // Generated syntax trees are always added to the end of the list of syntax trees.
@@ -173,7 +185,7 @@ static bool filter(CompilerCall compilerCall)
173185 TracingAnalyser . GetOutputName ( compilation , args ) ,
174186 compilation ,
175187 generatedSyntaxTrees ,
176- diagnosticName ,
188+ Path . Combine ( compilationIdentifierPath , diagnosticName ) ,
177189 options ) ,
178190 ( ) => { } ) ;
179191
Original file line number Diff line number Diff line change @@ -113,17 +113,24 @@ private static async Task DownloadFileAsync(string address, string filename)
113113 public static void DownloadFile ( string address , string fileName ) =>
114114 DownloadFileAsync ( address , fileName ) . GetAwaiter ( ) . GetResult ( ) ;
115115
116+ public static string ConvertPathToSafeRelativePath ( string path )
117+ {
118+ // Remove all leading path separators / or \
119+ // For example, UNC paths have two leading \\
120+ path = path . TrimStart ( Path . DirectorySeparatorChar , Path . AltDirectorySeparatorChar ) ;
121+
122+ if ( path . Length > 1 && path [ 1 ] == ':' )
123+ path = path [ 0 ] + "_" + path . Substring ( 2 ) ;
124+
125+ return path ;
126+ }
127+
116128 public static string NestPaths ( ILogger logger , string ? outerpath , string innerpath )
117129 {
118130 var nested = innerpath ;
119131 if ( ! string . IsNullOrEmpty ( outerpath ) )
120132 {
121- // Remove all leading path separators / or \
122- // For example, UNC paths have two leading \\
123- innerpath = innerpath . TrimStart ( Path . DirectorySeparatorChar , Path . AltDirectorySeparatorChar ) ;
124-
125- if ( innerpath . Length > 1 && innerpath [ 1 ] == ':' )
126- innerpath = innerpath [ 0 ] + "_" + innerpath . Substring ( 2 ) ;
133+ innerpath = ConvertPathToSafeRelativePath ( innerpath ) ;
127134
128135 nested = Path . Combine ( outerpath , innerpath ) ;
129136 }
Original file line number Diff line number Diff line change 66| b/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs:0:0:0:0 | b/obj/Debug/net8.0/.NETCoreApp,Version=v8.0.AssemblyAttributes.cs |
77| b/obj/Debug/net8.0/test.AssemblyInfo.cs:0:0:0:0 | b/obj/Debug/net8.0/test.AssemblyInfo.cs |
88| b/obj/Debug/net8.0/test.GlobalUsings.g.cs:0:0:0:0 | b/obj/Debug/net8.0/test.GlobalUsings.g.cs |
9- | generated/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs:0:0:0:0 | generated/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs |
9+ | generated/a/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs:0:0:0:0 | generated/a/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs |
10+ | generated/b/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs:0:0:0:0 | generated/b/test.csproj (net8.0)/System.Text.RegularExpressions.Generator/System.Text.RegularExpressions.Generator.RegexGenerator/RegexGenerator.g.cs |
You can’t perform that action at this time.
0 commit comments