-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
Update driver script to execute test through test_core #24168
Update driver script to execute test through test_core #24168
Conversation
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'package:test_core/src/executable.dart' as executable; // ignore: implementation_imports |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels a bit too cryptic. Would we recommend that our users do this too? So far the flutter drive
command has been a fairly simple convenience command. Some users don't even use it but instead launch their apps and scripts by hand. It seems this will make it less obvious how to run things yourself. Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair question, this is really more of a cleanup for the flutter repo. It doesn't effect users at all.
A user can write a test which uses package:test
and then run the test with dart or pub the same as normal. This is because the package:test
entry point is ultimately the same as the package:test_core
entry point.
However, this slight refactoring allows flutter/flutter
to stop using package test and instead export test_api
from our testing shims.
In the future we might could consider exporting test_api
from flutter_driver
to completely remove the need for package test. This would actually remove the ability to run the test script directly with dart. However, that is not what the change is about.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had another through - we could always make this a command line toggle (something like --flutter-repo), then we can have our cake and eat it too
@yjbanov PTAL updated to make this functionality flag based (defaulting to false). I believe this removes any risk from the feature. |
This reverts commit 6c62cf3.
This allows us to remove the package:test requirement for driver scripts. I've only updated one set of tests so we can confirm it is backwards compatible.
Cleanup: moved dev deps on integration/ui into dev deps section
Fixes #24005