Skip to content

use pub run for create test and remove [INFO] logs #35839

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

Merged
merged 7 commits into from
Jul 10, 2019

Conversation

jonahwilliams
Copy link
Contributor

Description

Since we're only running one (or two?) test files the overhead of pre-compilation is not worth it. This will also cut down on the logspam in this particular case.

@jonahwilliams jonahwilliams added the tool Affects the "flutter" command-line tool. See also t: labels. label Jul 10, 2019
@jonahwilliams jonahwilliams changed the title use pub run for create test use pub run for create test and remove [INFO] logs Jul 10, 2019
@@ -240,7 +240,8 @@ Future<void> _runToolTests() async {
File(path.join(flutterRoot, 'bin', 'cache', 'flutter_tools.snapshot')).deleteSync();
File(path.join(flutterRoot, 'bin', 'cache', 'flutter_tools.stamp')).deleteSync();
}
if (noUseBuildRunner) {
// reduce overhead of build_runner in the create case.
if (noUseBuildRunner || Platform.environment['SUBSHARD'] == 'create') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not quite sure what you mean

Copy link
Contributor

Choose a reason for hiding this comment

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

There's logic in there to check the subshard and run the right subset of tests using tags. I don't think it matches the logic in the build runner variant of the method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh duh, got it my bad

@dnfield
Copy link
Contributor

dnfield commented Jul 10, 2019

Thanks - I meant to do this and forgot

@jonahwilliams
Copy link
Contributor Author

Is commands/create_test.dart the only test that uses the 'create' tag? I can just pass the test file directly to avoid loading everything else

@dnfield
Copy link
Contributor

dnfield commented Jul 10, 2019

I think so but would have to double check. Actually for this one we probably don't want to use tags so test doesn't have to scan the whole thing

@jonahwilliams
Copy link
Contributor Author

Updated to use the testfile

@dnfield
Copy link
Contributor

dnfield commented Jul 10, 2019

LGTM

@jonahwilliams jonahwilliams merged commit 2b20345 into flutter:master Jul 10, 2019
@jonahwilliams jonahwilliams deleted the quite_down_br_tests branch July 10, 2019 15:48
johnsonmh pushed a commit to johnsonmh/flutter that referenced this pull request Jul 30, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants