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

${env:PATH} on cmake.testEnvironment setting doesn't work #1536

Closed
skhrshin opened this issue Nov 9, 2020 · 3 comments
Closed

${env:PATH} on cmake.testEnvironment setting doesn't work #1536

skhrshin opened this issue Nov 9, 2020 · 3 comments
Labels
bug a bug in the product Feature: ctest
Milestone

Comments

@skhrshin
Copy link

skhrshin commented Nov 9, 2020

Brief Issue Summary

I tried setting cmake.testEnvironment at settings.json to append path to DLLs and found that ${env:PATH} was not properly substituted.

Expected:

  1. Create a directory named 'cmaketest'
  2. Put CMakeLists.txt under the directory
cmake_minimum_required (VERSION 3.0.0)
project (cmaketest)
enable_testing ()
message (STATUS OK.)
  1. Put .vscode/settings.json under the directory
{
    "cmake.testEnvironment": {
        "PATH": "${env:PATH}"
    }
}
  1. Open the directory with VSCode
  2. Run tests
  3. The following line should appear on the output window.
[ctest] CTest finished with return code 0

Apparent Behavior:

CTest returns -1 instead of 0.

Platform and Versions

  • Operating System: Windows
  • CMake Version: 3.18.0
  • VSCode Version: 1.51.0
  • CMake Tools Extension Version: 1.5.1
  • Compiler/Toolchain: Visual C++ 2017
@andreeis
Copy link
Contributor

andreeis commented Nov 9, 2020

Thank you for reporting this issue. We reproduce it and we will let you know if we need anything else for the investigation.

@andreeis andreeis added bug a bug in the product Feature: ctest labels Nov 9, 2020
@andreeis andreeis added this to the Backlog milestone Nov 9, 2020
@lygstate
Copy link
Contributor

Yeap not work, need fix for it

@andreeis
Copy link
Contributor

CMake Tools 1.7.0 was released today and it contains a fix for this issue. Upgrade the extension in VSCode and let us know if you encounter any other problems.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: ctest
Projects
None yet
Development

No branches or pull requests

3 participants