From c8927447f50c43824afae37c845e11bafec25bbb Mon Sep 17 00:00:00 2001 From: Tamas Vajk Date: Fri, 28 Jun 2024 09:40:13 +0200 Subject: [PATCH] Record diagnostics in binlog extraction test --- .../all-platforms/binlog/diagnostics.expected | 28 +++++++++++++++++++ .../all-platforms/binlog/test.py | 2 ++ 2 files changed, 30 insertions(+) create mode 100644 csharp/ql/integration-tests/all-platforms/binlog/diagnostics.expected diff --git a/csharp/ql/integration-tests/all-platforms/binlog/diagnostics.expected b/csharp/ql/integration-tests/all-platforms/binlog/diagnostics.expected new file mode 100644 index 000000000000..19390ed2af26 --- /dev/null +++ b/csharp/ql/integration-tests/all-platforms/binlog/diagnostics.expected @@ -0,0 +1,28 @@ +{ + "markdownMessage": "C# analysis with build-mode 'none' completed.", + "severity": "unknown", + "source": { + "extractorName": "csharp", + "id": "csharp/autobuilder/buildless/complete", + "name": "C# analysis with build-mode 'none' completed" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": false, + "telemetry": true + } +} +{ + "markdownMessage": "C# was extracted with build-mode set to 'none'. This means that all C# source in the working directory will be scanned, with build tools, such as Nuget and Dotnet CLIs, only contributing information about external dependencies.", + "severity": "note", + "source": { + "extractorName": "csharp", + "id": "csharp/autobuilder/buildless/mode-active", + "name": "C# was extracted with build-mode set to 'none'" + }, + "visibility": { + "cliSummaryTable": true, + "statusPage": true, + "telemetry": true + } +} diff --git a/csharp/ql/integration-tests/all-platforms/binlog/test.py b/csharp/ql/integration-tests/all-platforms/binlog/test.py index deca02b731bf..ad36c9599c3b 100644 --- a/csharp/ql/integration-tests/all-platforms/binlog/test.py +++ b/csharp/ql/integration-tests/all-platforms/binlog/test.py @@ -1,5 +1,7 @@ import subprocess from create_database_utils import * +from diagnostics_test_utils import * subprocess.check_call(["dotnet", "build", "test.sln", "/bl:test.binlog"]) run_codeql_database_create([], lang="csharp", extra_args=["--build-mode=none", "-Obinlog=test.binlog"]) +check_diagnostics()