Open nhbusch opened 9 months ago
Thanks for letting us know! I've marked it as a bug and placed it on our backlog. 👍
@nhbusch i cannot reproduce this bug.
In one of my project is set the following presets:
"version": 6,
"cmakeMinimumRequired": {
"major": 3,
"minor": 21,
"patch": 1
},
"configurePresets": [
{
"name": "debug",
"displayName": "GCC 5.4.0 avr",
"description": "Using compilers: C = /usr/bin/avr-gcc, CXX = /usr/bin/avr-g++",
"binaryDir": "${sourceDir}/out/build/${presetName}",
"cacheVariables": {
"CMAKE_INSTALL_PREFIX": "${sourceDir}/out/install/${presetName}",
"CMAKE_C_COMPILER": "/usr/bin/avr-gcc",
"CMAKE_CXX_COMPILER": "/usr/bin/avr-g++",
"CMAKE_BUILD_TYPE": "Debug"
}
}
],
"testPresets": [
{
"name": "myTestPreset",
"configurePreset": "debug",
"description": "A custom test preset",
"hidden": false,
"output": {
"outputLogFile": "/tmp/my_dir/myTestPreset.log"
}
}
]
}
When running the ctest from the command palette (CMake: Run Tests
) the log file is created right in /tmp/my_dir/myTestPreset.log
. Even when launched from the Test Explorer
the log file seems to be created at the right place.
Am I missing something?
@nhbusch Thank you for your GitHub issue! We tried to reproduce your problem based on the information you provided, but we were unable to do so, so in order to better address your issue, could you provide us with the exact steps to reproduce the problem as well as a recording of the reproduction of the problem? Thank you in advance!
Brief Issue Summary
The outputLogFile preset property seems to be interpreted differently when executing tests from the command line via ctest compared to executing from Visual Studio Code. In the latter case, it seems to be interpreted relative to CMAKE_BINARY_DIR while ctest handles it relative to the location of CMakePresets.json. If, say,
CMAKE_BINARY_DIR
isout/build
andoutputLogFile
ispath/to/test_output.log
, then running ctest from the command line will write test output topath/to/test_output.log
while Visual Studio Code will output toout/build/path/to/test_output.log
.CMake Tools Diagnostics
Debug Log
No response
Additional Information
No response