Comments (7)
I have Cmake Tools extension installed.
from vscode-catch2-test-adapter.
And my test binary is on build
directory and has test
keyword.
from vscode-catch2-test-adapter.
I have the same issue. This appears to be a regression in v4.8.0. In v4.7.0, my test binaries are correctly scanned and show up in the test explorer. In v4.8.0 they do not show up. I also use CMake Tools, but I am not sure it is related.
Per the changelog, files matching files.watcherExclude are ignored in v4.8.0. I removed my build/ directory (which contains my test binaries) from the ignore list, and this did not make a difference, even after reloading.
from vscode-catch2-test-adapter.
I also have this issue. From the logs, it seems that 4.8.0 never transitions into the "Checking file for tests: " log statements.
Here's the not working log from 4.8.0
[2024-02-06 20:02:45.194] [INFO] 8
[2024-02-06 20:02:45.194] [INFO] `test.advancedExecutables` is not defined. trying to use `test.executables`
[2024-02-06 20:02:45.195] [DEBUG] ExecutableConfig.resolveVariable: {
value: '{build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}*',
resolved: Promise { <pending> },
strictAllowed: false
}
[2024-02-06 20:02:45.196] [INFO] pattern {build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}* /home/rmulder/devel/MonitoringController/monitoring-controller/tests {
isAbsolute: false,
absPath: '/home/rmulder/devel/MonitoringController/monitoring-controller/tests/{build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}*',
isPartOfWs: true,
relativeToWsPosix: '{build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}*'
}
Here's the working log from 4.7.0
[2024-02-06 20:05:58.310] [INFO] 8
[2024-02-06 20:05:58.310] [INFO] `test.advancedExecutables` is not defined. trying to use `test.executables`
[2024-02-06 20:05:58.311] [DEBUG] ExecutableConfig.resolveVariable: {
value: '{build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}*',
resolved: Promise { <pending> },
strictAllowed: false
}
[2024-02-06 20:05:58.312] [INFO] pattern {build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}* /home/rmulder/devel/MonitoringController/monitoring-controller/tests {
isAbsolute: false,
absPath: '/home/rmulder/devel/MonitoringController/monitoring-controller/tests/{build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}*',
isPartOfWs: true,
relativeToWsPosix: '{build,Build,BUILD,out,Out,OUT}/**/*{test,Test,TEST}*'
}
[2024-02-06 20:05:58.331] [DEBUG] Checking file for tests: ...
{and many more lines like this}
from vscode-catch2-test-adapter.
Please follow the instructions in template
from vscode-catch2-test-adapter.
Released a new version with improved logging. I bet your issue is related to the files.watcherExclude
config which is respected since v4.8.0
.
I'm closing this in faith that I'm right and the issue can be easily solved but let me know if I'm wrong and we can investigate further. Also let me know if changing that config makes your workflow uncomfortable in some way.
Bests,
from vscode-catch2-test-adapter.
[EDIT 2/16 to give more specific information about our use case]
@matepek I did some more investigation. It appears that there are actually two settings: files.watcherExclude
and files.exclude
. On 4.7.0, both appear to be ignored. However, in 4.8.3 both settings must not contain a pattern that excludes the executable. If I remove the exclusion in both places, the tests show up.
In our CMake use case, we have a "build" symlink in each package root that points to a directory containing the build artifacts including test binaries. We'd like to not show that directory in the file browser, but we do need TestMate to scan that directory for tests. Tests are never installed, so there's no other directory to look for.
Any thoughts on how to best achieve this?
I also looked at #414, which seems to be the driver for honoring files.exclude
. As I understand it, the use case there is that the build directory is too large to be scanned, and the solution is to copy the tests to a different directory that is much smaller and is scannable. The user then points test.executables
to that directory instead, while presumably keeping the build directory excluded. Why would TestMate have to honor files.exclude
in this case, since test.executables
doesn't point to a large directory anymore?
Hope you see this update even if the issue is closed. I don't seem to be getting any email updates for it though, so I may open a new issue to just make sure you see this.
from vscode-catch2-test-adapter.
Related Issues (20)
- Bazel, Runfiles, and C++ TestMate - how to use properly? HOT 11
- runTask always reporting "Task not found" HOT 2
- Parallel execution requires per-instance unique identifiers HOT 5
- Don't re-indent `std::cout` output HOT 1
- [Catch2] Custom main file not being picked up HOT 3
- Implicit gtest_filter fails when running 300 tests HOT 1
- Different configTemplate depending on executed tests HOT 4
- Should files.watcherExclude be honored when finding tests? HOT 5
- Label merging is broken after adding current working directory in the advanced executables configuration HOT 8
- Unexpected warning in Test Results related to "Unknown XML tag: TestCase" HOT 4
- How to setup bazel properly? (pattern, cwd, ...) HOT 2
- how to get run target path
- deactive discovery watcher at build time HOT 1
- [Abritrary Test grouping] : allow to make custom groups based on several config for advancedExecutables HOT 2
- Feature request: Test Coverage API support
- Highlight the first error, not the last
- Continuous run only selected tests
- Missing additionnal context from GoogleTest failures HOT 4
- Leading whitespace in test output unexpectedly stripped
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-catch2-test-adapter.