Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Run CTest" no longer works when there is no preset #3589

Closed
ebouteillon opened this issue Feb 14, 2024 · 4 comments
Closed

"Run CTest" no longer works when there is no preset #3589

ebouteillon opened this issue Feb 14, 2024 · 4 comments
Assignees
Labels
bug a bug in the product Feature: ctest fixed (release pending) fixed in pre-release and is pending official release regression used to work and no longer does. Regressions are typically high priority
Milestone

Comments

@ebouteillon
Copy link

Brief Issue Summary

Since the upgrade of "CMake Tools" extension to version v1.17.15, when I click "Run CTest" in the status bar, I get the error "[ctest] test.preset.not.set Test preset is not set" and unit tests are not run.

Additional notes:

  • CMake presets are not used in my environment (no "CMakePresets.json" file).
  • When running a single unit test from Test Explorer, test is run successfully.
  • Setting useCMakePresets from "auto" -> "never", does not fix the issue
  • Downgrading "CMake Tools" extension to previous version v1.16.32, fixes the issue.

CMake Tools Diagnostics

{
  "os": "linux",
  "vscodeVersion": "1.86.1",
  "cmtVersion": "1.17.15",
  "configurations": [
    {
      "folder": "/home/axis/workspace/map-core",
      "cmakeVersion": "3.26.4",
      "configured": true,
      "generator": "Unix Makefiles",
      "usesPresets": false,
      "compilers": {
        "C": "/opt/rh/devtoolset-12/root/usr/bin/gcc",
        "CXX": "/opt/rh/devtoolset-12/root/usr/bin/g++"
      }
    }
  ],
  "cpptoolsIntegration": {
    "isReady": true,
    "hasCodeModel": true,
    "activeBuildType": "Debug",
    "buildTypesSeen": [
      "Debug"
    ],
    "requests": [],
    "responses": [],
    "partialMatches": [],
    "targetCount": 97,
    "executablesCount": 32,
    "librariesCount": 36,
    "targets": []
  },
  "settings": [
    {
      "communicationMode": "automatic",
      "useCMakePresets": "auto",
      "configureOnOpen": true
    }
  ]
}

Debug Log

[main] Building folder: map-core 
[build] Starting build
[proc] Executing command: /opt/cmake/bin/cmake --build /home/axis/workspace/map-core/build --config Debug --target all -j 4 --
[build] [  1%] Built target axmapserializer_object

... snip....

[build] [100%] Built target tpv_gtestu
[driver] Build completed: 00:00:01.068
[build] Build finished with exit code 0
[ctest] test.preset.not.set Test preset is not set

Additional Information

No response

@gcampbell-msft gcampbell-msft added bug a bug in the product Feature: ctest regression used to work and no longer does. Regressions are typically high priority and removed triage labels Feb 14, 2024
@gcampbell-msft
Copy link
Collaborator

@ebouteillon Thanks for letting us know about this regression. Is there a way that you could share with us a minimal repro project so that we could quickly investigate this?

@gcampbell-msft
Copy link
Collaborator

gcampbell-msft commented Feb 14, 2024

@ebouteillon Update, I believe I found the issue, could you manually install this vsix and confirm that this fixes your issue?
cmake-tools.zip

To install it,

  1. Download the zip, and rename it to change the extension to .vsix
  2. Navigate to the extensions pane and install a manual vsix:
    image

I believe this will fix your issue, and I have a PR out here: #3590. However, before merging, it'd be great for you to confirm that this fixes your issue. Thanks!

@ebouteillon
Copy link
Author

Hi @gcampbell-msft , thanks for the quick response. I confirm it is working with the .vsix provided.

@gcampbell-msft
Copy link
Collaborator

@ebouteillon Perfect, assuming the PR merges today, it will be in the pre-release starting tomorrow, and we plan to path an official release early next week. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug a bug in the product Feature: ctest fixed (release pending) fixed in pre-release and is pending official release regression used to work and no longer does. Regressions are typically high priority
Projects
Status: Completed
Development

No branches or pull requests

2 participants