From 17ba4abebf4f21f9e96bb662de7dec436a4e46bc Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Mon, 17 Mar 2025 14:12:57 +0100 Subject: [PATCH] C#: Add buildless integration test with .net 8.0 --- .../Assemblies.ql | 5 +++++ .../standalone_dependencies_net8/Program.cs | 6 ++++++ .../standalone_dependencies_net8/global.json | 5 +++++ .../standalone.csproj | 19 +++++++++++++++++++ .../standalone_dependencies_net8/test.py | 6 ++++++ 5 files changed, 41 insertions(+) create mode 100644 csharp/ql/integration-tests/posix/standalone_dependencies_net8/Assemblies.ql create mode 100644 csharp/ql/integration-tests/posix/standalone_dependencies_net8/Program.cs create mode 100644 csharp/ql/integration-tests/posix/standalone_dependencies_net8/global.json create mode 100644 csharp/ql/integration-tests/posix/standalone_dependencies_net8/standalone.csproj create mode 100644 csharp/ql/integration-tests/posix/standalone_dependencies_net8/test.py diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_net8/Assemblies.ql b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/Assemblies.ql new file mode 100644 index 000000000000..931e64d87ba1 --- /dev/null +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/Assemblies.ql @@ -0,0 +1,5 @@ +import csharp + +from Assembly a +where not a.getCompilation().getOutputAssembly() = a +select a diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_net8/Program.cs b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/Program.cs new file mode 100644 index 000000000000..39a9e95bb6e3 --- /dev/null +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/Program.cs @@ -0,0 +1,6 @@ +class Program +{ + static void Main(string[] args) + { + } +} \ No newline at end of file diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_net8/global.json b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/global.json new file mode 100644 index 000000000000..6537190e0600 --- /dev/null +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/global.json @@ -0,0 +1,5 @@ +{ + "sdk": { + "version": "8.0.407" + } +} diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_net8/standalone.csproj b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/standalone.csproj new file mode 100644 index 000000000000..10d4781d145a --- /dev/null +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/standalone.csproj @@ -0,0 +1,19 @@ + + + + Exe + net8.0 + + + + + + + + + + + + + + diff --git a/csharp/ql/integration-tests/posix/standalone_dependencies_net8/test.py b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/test.py new file mode 100644 index 000000000000..5aaafca6a46a --- /dev/null +++ b/csharp/ql/integration-tests/posix/standalone_dependencies_net8/test.py @@ -0,0 +1,6 @@ +import runs_on + + +@runs_on.posix +def test(codeql, csharp): + codeql.database.create(build_mode="none")