Skip to content

Use the executable from package:test for the flutter drive host script - #73017

Closed
jiahaog wants to merge 1 commit into
flutter:masterfrom
jiahaog:driver-machine
Closed

jiahaog wants to merge 1 commit into
flutter:masterfrom
jiahaog:driver-machine

Conversation

@jiahaog

@jiahaog jiahaog commented Dec 28, 2020

Copy link
Copy Markdown
Member

Description

(This is a quick hack)

This will allow the following command to print machine readable output:

flutter drive --driver=test_driver/driver.dart  --target=lib/main.dart --test-arguments='--reporter=json'

Things that are needed:

  1. Actually use the test executable from package:test. Or wrap that executable somehow like how flutter test does it
  2. Make test-arguments pass args to the test script rather than the Dart executable

Related Issues

#51135

Tests

I added the following tests:

Replace this with a list of the tests that you added as part of this PR. A change in behavior with no test covering it
will likely get reverted accidentally sooner or later. PRs must include tests for all changed/updated/fixed behaviors. See Test Coverage.

Checklist

Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I signed the CLA.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Did any tests fail when you ran them? Please read Handling breaking changes.

This will allow the following command to print machine readable output:

```
flutter drive --driver=test_driver/driver.dart  --target=lib/main.dart --test-arguments='--reporter=json'
```

Things that are needed:
1. Actually use the test executable from package:test. Or wrap that executable somehow like how `flutter test` does it
2. Make `test-arguments` pass args to the test script rather than the Dart executable
@flutter-dashboard flutter-dashboard Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Dec 28, 2020
@google-cla google-cla Bot added the cla: yes label Dec 28, 2020
return _processUtils.stream(<String>[
_dartSdkPath,
...<String>[...arguments, testFile, '-rexpanded'],
// This is probably not the correct way of calling the executable from

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.

This won't work reliably because pub will sometimes thing that pub run needs to be repeated

@Hixie

Hixie commented Oct 12, 2021

Copy link
Copy Markdown
Contributor

@jiahaog I'm going to close this one since it looks like we decided not to land it. Feel free to reopen it if it's still relevant.

@Hixie Hixie closed this Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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