vscode-cmake-tools
vscode-cmake-tools copied to clipboard
Ctest prints `[object Object]` after return code
Brief Issue Summary
After running a CTest suite, the line [ctest] [object Object] appears in the CMake/Build output pane. Something probably isn't getting deserialized correctly.
- Create a folder with these files:
CMakeLists.txt
project(ctest_issue)
include(CTest)
add_executable(main main.cpp)
main.cpp
int main() {}
- Open the folder in VS Code and run the CMake: Configure command.
- Run the CMake: Run Tests command.
- Check the content of the CMake/Build output pane.
CMake Tools Diagnostics
{
"os": "win32",
"vscodeVersion": "1.86.1",
"cmtVersion": "1.17.15",
"configurations": [
{
"folder": "c:\\Users\\bemcmorr\\source\\repos\\ctest_issue",
"cmakeVersion": "3.28.0",
"configured": true,
"generator": "Visual Studio 17 2022",
"usesPresets": false,
"compilers": {}
}
],
"cpptoolsIntegration": {
"isReady": true,
"hasCodeModel": true,
"activeBuildType": "Debug",
"buildTypesSeen": [
"Debug",
"Release",
"MinSizeRel",
"RelWithDebInfo"
],
"requests": [],
"responses": [],
"partialMatches": [],
"targetCount": 7,
"executablesCount": 1,
"librariesCount": 0,
"targets": [
{
"name": "ALL_BUILD",
"type": "UTILITY"
},
{
"name": "Continuous",
"type": "UTILITY"
},
{
"name": "Experimental",
"type": "UTILITY"
},
{
"name": "Nightly",
"type": "UTILITY"
},
{
"name": "NightlyMemoryCheck",
"type": "UTILITY"
},
{
"name": "ZERO_CHECK",
"type": "UTILITY"
},
{
"name": "main",
"type": "EXECUTABLE"
}
]
},
"settings": [
{
"communicationMode": "automatic",
"useCMakePresets": "auto",
"configureOnOpen": null
}
]
}
Debug Log
[main] Building folder: ctest_issue
[build] Starting build
[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Main\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --build c:/Users/bemcmorr/source/repos/ctest_issue/build --config Debug --target ALL_BUILD -j 18 --
[build] MSBuild version 17.10.0-preview-24073-01+f0936bf4b for .NET Framework
[build]
[build] 1>Checking Build System
[build] Building Custom Rule C:/Users/bemcmorr/source/repos/ctest_issue/CMakeLists.txt
[build] main.cpp
[build] main.vcxproj -> C:\Users\bemcmorr\source\repos\ctest_issue\build\Debug\main.exe
[build] Building Custom Rule C:/Users/bemcmorr/source/repos/ctest_issue/CMakeLists.txt
[driver] Build completed: 00:00:01.310
[build] Build finished with exit code 0
[proc] Executing command: "C:\Program Files\Microsoft Visual Studio\2022\Main\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\ctest.exe" -j18 -C Debug -T test --output-on-failure -R ^c\:\/users\/bemcmorr\/source\/repos\/ctest_issue$
[ctest] Site: REDACTED
[ctest] Build name: Win32-MSBuild
[ctest] Test project C:/Users/bemcmorr/source/repos/ctest_issue/build
[ctest] No tests were found!!!
[ctest] CTest finished with return code 0
[ctest] [object Object]
Additional Information
No response
The problem is here. The vscode.TestMessage is directly logged in ctestFailed(), but it's not a string.
Thanks @benmcmorran, I've confirmed that this isn't a regression. However, I can confirm that this only repros if the cmake.ctest.allowParallelJobs setting is disabled. I've put the bug in to 1.18.