C#: Add desktop runtime dependencies integration test.

This commit is contained in:
Michael Nebel
2024-04-05 14:41:10 +02:00
parent 996f535f0b
commit bee54e4247
5 changed files with 245 additions and 0 deletions

View File

@@ -0,0 +1,210 @@
| [...]/Humanizer.dll |
| [...]/Microsoft.Bcl.AsyncInterfaces.dll |
| [...]/Microsoft.Build.Framework.dll |
| [...]/Microsoft.Build.dll |
| [...]/Microsoft.CSharp.dll |
| [...]/Microsoft.CodeAnalysis.CSharp.Workspaces.dll |
| [...]/Microsoft.CodeAnalysis.CSharp.dll |
| [...]/Microsoft.CodeAnalysis.VisualBasic.Workspaces.dll |
| [...]/Microsoft.CodeAnalysis.VisualBasic.dll |
| [...]/Microsoft.CodeAnalysis.Workspaces.dll |
| [...]/Microsoft.CodeAnalysis.dll |
| [...]/Microsoft.NET.StringTools.dll |
| [...]/Microsoft.VisualBasic.Core.dll |
| [...]/Microsoft.VisualBasic.dll |
| [...]/Microsoft.Win32.Primitives.dll |
| [...]/Microsoft.Win32.Registry.dll |
| [...]/Microsoft.Win32.SystemEvents.dll |
| [...]/Mono.Posix.NETStandard.dll |
| [...]/Newtonsoft.Json.dll |
| [...]/Semmle.Autobuild.CSharp.dll |
| [...]/Semmle.Autobuild.Shared.dll |
| [...]/Semmle.Extraction.CSharp.DependencyFetching.dll |
| [...]/Semmle.Extraction.CSharp.Driver.dll |
| [...]/Semmle.Extraction.CSharp.Standalone.dll |
| [...]/Semmle.Extraction.CSharp.Util.dll |
| [...]/Semmle.Extraction.CSharp.dll |
| [...]/Semmle.Extraction.dll |
| [...]/Semmle.Util.dll |
| [...]/System.AppContext.dll |
| [...]/System.Buffers.dll |
| [...]/System.Collections.Concurrent.dll |
| [...]/System.Collections.Immutable.dll |
| [...]/System.Collections.NonGeneric.dll |
| [...]/System.Collections.Specialized.dll |
| [...]/System.Collections.dll |
| [...]/System.ComponentModel.Annotations.dll |
| [...]/System.ComponentModel.DataAnnotations.dll |
| [...]/System.ComponentModel.EventBasedAsync.dll |
| [...]/System.ComponentModel.Primitives.dll |
| [...]/System.ComponentModel.TypeConverter.dll |
| [...]/System.ComponentModel.dll |
| [...]/System.Composition.AttributedModel.dll |
| [...]/System.Composition.Convention.dll |
| [...]/System.Composition.Hosting.dll |
| [...]/System.Composition.Runtime.dll |
| [...]/System.Composition.TypedParts.dll |
| [...]/System.Configuration.ConfigurationManager.dll |
| [...]/System.Configuration.dll |
| [...]/System.Console.dll |
| [...]/System.Core.dll |
| [...]/System.Data.Common.dll |
| [...]/System.Data.DataSetExtensions.dll |
| [...]/System.Data.dll |
| [...]/System.Diagnostics.Contracts.dll |
| [...]/System.Diagnostics.Debug.dll |
| [...]/System.Diagnostics.DiagnosticSource.dll |
| [...]/System.Diagnostics.EventLog.dll |
| [...]/System.Diagnostics.FileVersionInfo.dll |
| [...]/System.Diagnostics.Process.dll |
| [...]/System.Diagnostics.StackTrace.dll |
| [...]/System.Diagnostics.TextWriterTraceListener.dll |
| [...]/System.Diagnostics.Tools.dll |
| [...]/System.Diagnostics.TraceSource.dll |
| [...]/System.Diagnostics.Tracing.dll |
| [...]/System.Drawing.Common.dll |
| [...]/System.Drawing.Primitives.dll |
| [...]/System.Drawing.dll |
| [...]/System.Dynamic.Runtime.dll |
| [...]/System.Formats.Asn1.dll |
| [...]/System.Formats.Tar.dll |
| [...]/System.Globalization.Calendars.dll |
| [...]/System.Globalization.Extensions.dll |
| [...]/System.Globalization.dll |
| [...]/System.IO.Compression.Brotli.dll |
| [...]/System.IO.Compression.FileSystem.dll |
| [...]/System.IO.Compression.ZipFile.dll |
| [...]/System.IO.Compression.dll |
| [...]/System.IO.FileSystem.AccessControl.dll |
| [...]/System.IO.FileSystem.DriveInfo.dll |
| [...]/System.IO.FileSystem.Primitives.dll |
| [...]/System.IO.FileSystem.Watcher.dll |
| [...]/System.IO.FileSystem.dll |
| [...]/System.IO.IsolatedStorage.dll |
| [...]/System.IO.MemoryMappedFiles.dll |
| [...]/System.IO.Pipelines.dll |
| [...]/System.IO.Pipes.AccessControl.dll |
| [...]/System.IO.Pipes.dll |
| [...]/System.IO.UnmanagedMemoryStream.dll |
| [...]/System.IO.dll |
| [...]/System.Linq.Expressions.dll |
| [...]/System.Linq.Parallel.dll |
| [...]/System.Linq.Queryable.dll |
| [...]/System.Linq.dll |
| [...]/System.Memory.dll |
| [...]/System.Net.Http.Json.dll |
| [...]/System.Net.Http.dll |
| [...]/System.Net.HttpListener.dll |
| [...]/System.Net.Mail.dll |
| [...]/System.Net.NameResolution.dll |
| [...]/System.Net.NetworkInformation.dll |
| [...]/System.Net.Ping.dll |
| [...]/System.Net.Primitives.dll |
| [...]/System.Net.Quic.dll |
| [...]/System.Net.Requests.dll |
| [...]/System.Net.Security.dll |
| [...]/System.Net.ServicePoint.dll |
| [...]/System.Net.Sockets.dll |
| [...]/System.Net.WebClient.dll |
| [...]/System.Net.WebHeaderCollection.dll |
| [...]/System.Net.WebProxy.dll |
| [...]/System.Net.WebSockets.Client.dll |
| [...]/System.Net.WebSockets.dll |
| [...]/System.Net.dll |
| [...]/System.Numerics.Vectors.dll |
| [...]/System.Numerics.dll |
| [...]/System.ObjectModel.dll |
| [...]/System.Private.CoreLib.dll |
| [...]/System.Private.DataContractSerialization.dll |
| [...]/System.Private.Uri.dll |
| [...]/System.Private.Xml.Linq.dll |
| [...]/System.Private.Xml.dll |
| [...]/System.Reflection.DispatchProxy.dll |
| [...]/System.Reflection.Emit.ILGeneration.dll |
| [...]/System.Reflection.Emit.Lightweight.dll |
| [...]/System.Reflection.Emit.dll |
| [...]/System.Reflection.Extensions.dll |
| [...]/System.Reflection.Metadata.dll |
| [...]/System.Reflection.MetadataLoadContext.dll |
| [...]/System.Reflection.Primitives.dll |
| [...]/System.Reflection.TypeExtensions.dll |
| [...]/System.Reflection.dll |
| [...]/System.Resources.Reader.dll |
| [...]/System.Resources.ResourceManager.dll |
| [...]/System.Resources.Writer.dll |
| [...]/System.Runtime.CompilerServices.Unsafe.dll |
| [...]/System.Runtime.CompilerServices.VisualC.dll |
| [...]/System.Runtime.Extensions.dll |
| [...]/System.Runtime.Handles.dll |
| [...]/System.Runtime.InteropServices.JavaScript.dll |
| [...]/System.Runtime.InteropServices.RuntimeInformation.dll |
| [...]/System.Runtime.InteropServices.dll |
| [...]/System.Runtime.Intrinsics.dll |
| [...]/System.Runtime.Loader.dll |
| [...]/System.Runtime.Numerics.dll |
| [...]/System.Runtime.Serialization.Formatters.dll |
| [...]/System.Runtime.Serialization.Json.dll |
| [...]/System.Runtime.Serialization.Primitives.dll |
| [...]/System.Runtime.Serialization.Xml.dll |
| [...]/System.Runtime.Serialization.dll |
| [...]/System.Runtime.dll |
| [...]/System.Security.AccessControl.dll |
| [...]/System.Security.Claims.dll |
| [...]/System.Security.Cryptography.Algorithms.dll |
| [...]/System.Security.Cryptography.Cng.dll |
| [...]/System.Security.Cryptography.Csp.dll |
| [...]/System.Security.Cryptography.Encoding.dll |
| [...]/System.Security.Cryptography.OpenSsl.dll |
| [...]/System.Security.Cryptography.Primitives.dll |
| [...]/System.Security.Cryptography.ProtectedData.dll |
| [...]/System.Security.Cryptography.X509Certificates.dll |
| [...]/System.Security.Cryptography.dll |
| [...]/System.Security.Permissions.dll |
| [...]/System.Security.Principal.Windows.dll |
| [...]/System.Security.Principal.dll |
| [...]/System.Security.SecureString.dll |
| [...]/System.Security.dll |
| [...]/System.ServiceModel.Web.dll |
| [...]/System.ServiceProcess.dll |
| [...]/System.Text.Encoding.CodePages.dll |
| [...]/System.Text.Encoding.Extensions.dll |
| [...]/System.Text.Encoding.dll |
| [...]/System.Text.Encodings.Web.dll |
| [...]/System.Text.Json.dll |
| [...]/System.Text.RegularExpressions.dll |
| [...]/System.Threading.Channels.dll |
| [...]/System.Threading.Overlapped.dll |
| [...]/System.Threading.Tasks.Dataflow.dll |
| [...]/System.Threading.Tasks.Extensions.dll |
| [...]/System.Threading.Tasks.Parallel.dll |
| [...]/System.Threading.Tasks.dll |
| [...]/System.Threading.Thread.dll |
| [...]/System.Threading.ThreadPool.dll |
| [...]/System.Threading.Timer.dll |
| [...]/System.Threading.dll |
| [...]/System.Transactions.Local.dll |
| [...]/System.Transactions.dll |
| [...]/System.ValueTuple.dll |
| [...]/System.Web.HttpUtility.dll |
| [...]/System.Web.dll |
| [...]/System.Windows.Extensions.dll |
| [...]/System.Windows.dll |
| [...]/System.Xml.Linq.dll |
| [...]/System.Xml.ReaderWriter.dll |
| [...]/System.Xml.Serialization.dll |
| [...]/System.Xml.XDocument.dll |
| [...]/System.Xml.XPath.XDocument.dll |
| [...]/System.Xml.XPath.dll |
| [...]/System.Xml.XmlDocument.dll |
| [...]/System.Xml.XmlSerializer.dll |
| [...]/System.Xml.dll |
| [...]/System.dll |
| [...]/WindowsBase.dll |
| [...]/mscorlib.dll |
| [...]/netstandard.dll |
| [...]/zh-Hant/Microsoft.CodeAnalysis.CSharp.Workspaces.resources.dll |
| [...]/zh-Hant/Microsoft.CodeAnalysis.CSharp.resources.dll |
| [...]/zh-Hant/Microsoft.CodeAnalysis.VisualBasic.Workspaces.resources.dll |
| [...]/zh-Hant/Microsoft.CodeAnalysis.VisualBasic.resources.dll |
| [...]/zh-Hant/Microsoft.CodeAnalysis.Workspaces.resources.dll |
| [...]/zh-Hant/Microsoft.CodeAnalysis.resources.dll |

View File

@@ -0,0 +1,21 @@
import csharp
private string getPath(Assembly a) {
not a.getCompilation().getOutputAssembly() = a and
exists(string s | s = a.getFile().getAbsolutePath() |
result =
"[...]" +
s.substring(s.indexOf("test-db/working/") + "test-db/working/".length() + 16 +
"/packages".length(), s.length())
or
exists(string sub | sub = "csharp/tools/" + ["osx64", "linux64"] |
result = "[...]" + s.substring(s.indexOf(sub) + sub.length(), s.length())
)
or
result = s and
not exists(s.indexOf(["test-db/working/", "csharp/tools/"]))
)
}
from Assembly a
select getPath(a)

View File

@@ -0,0 +1,6 @@
class Program
{
static void Main(string[] args)
{
}
}

View File

@@ -0,0 +1,5 @@
{
"sdk": {
"version": "8.0.101"
}
}

View File

@@ -0,0 +1,3 @@
from create_database_utils import *
run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none"])