Describe the bug
The Testing view in vs code performs auto test discovery. For one of our projects (https://github.com/dart-lang/dart-pad/tree/main/pkgs/dart_services, the backend of dartpad), it traverses down into several (very large) subdirectories where we wouldn't want tests discovered or run from.
One of the local directories is flutter-sdks/; this contains a copy of the flutter sdk.
Another is local_pub_cache/; this contains a sub-set of a local pub cache.
Both directories are ignored from the POV of git (via a .gitignore) and analysis (via an analysis options file - https://github.com/dart-lang/dart-pad/blob/main/pkgs/dart_services/analysis_options.yaml#L8).
I suspect the issue here is that we can't just look in test in order to handle cases where the user has opened several packages at once). Perhaps we could stop traversing down into dirs once we see a directory w/ a pubspec? Or, we could have the traverseral algorithm respect the glob excludes from the analysis options files.
Expected behavior
The Testing view should just show tests defined in the test directory, and have a way to exclude discovery in for portions of the project.
Please complete the following information:
- Dart 3.2.0-39.0.dev (dev) (Fri Aug 4 09:04:57 2023 -0700) on "macos_arm64"
- on macos / Version 13.4.1 (c) (Build 22F770820d)