Skip to content

devtools_shared - allow tests to be run with "flutter test"#9874

Closed
srawlins wants to merge 1 commit into
flutter:masterfrom
srawlins:tests-w-flutter
Closed

devtools_shared - allow tests to be run with "flutter test"#9874
srawlins wants to merge 1 commit into
flutter:masterfrom
srawlins:tests-w-flutter

Conversation

@srawlins

@srawlins srawlins commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

In packages/devtools_shared/, I couldn't run tests with flutter test (I assumed it was a flutter-dependent package).

Gemini came up with this to fix the situation. If this is straight-up not a supported workflow, we don't have to land this. But it seems like a good change to me. Just promoting correctness.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a dartVMPath helper in packages/devtools_shared to resolve the Dart VM executable path, particularly when running under flutter_tester. It updates several test files to use dartVMPath instead of Platform.resolvedExecutable. Feedback was provided to make the dartVMPath resolution more robust by checking the FLUTTER_ROOT environment variable first and improving the fallback behavior when the SDK is not found.

Comment thread packages/devtools_shared/lib/src/test/io_utils.dart

@kenzieschmoll kenzieschmoll left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this isn't a flutter package, tests shouldn't be ran with flutter test. The correct workflow is just to run devtools_shared/ tests with dart test.

@srawlins srawlins closed this Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants