Document that flutter drive --test-arguments can opt-in to dart test (#152410)
Closes https://github.com/flutter/flutter/issues/51135. Closes https://github.com/flutter/flutter/issues/145499. Making this the _default_, or better discoverable, is tracked in https://github.com/flutter/flutter/issues/152409. You'll notice I also removed `-rexpanded`; @jonahwilliams believes that was accidentally copied over from else-where, and never did anything (someone I guess could have parsed it in `void main(...)`, but given https://github.com/flutter/flutter/issues/51135 & https://github.com/flutter/flutter/issues/145499 that seems unlikely.
This commit is contained in:
@@ -136,8 +136,14 @@ class DriveCommand extends RunCommandBase {
|
||||
..addOption('write-sksl-on-exit',
|
||||
help: 'Attempts to write an SkSL file when the drive process is finished '
|
||||
'to the provided file, overwriting it if necessary.')
|
||||
..addMultiOption('test-arguments', help: 'Additional arguments to pass to the '
|
||||
'Dart VM running The test script.')
|
||||
..addMultiOption(
|
||||
'test-arguments',
|
||||
help: 'Additional arguments to pass to the Dart VM running The test script.\n\n'
|
||||
'This can be used to opt-in to use "dart test" as a runner for the test script, '
|
||||
'which allows, among other things, changing the reporter. For example, to opt-in '
|
||||
'to the "expanded" reporter, pass both "test" and "--reporter=expanded".\n\n'
|
||||
'Please leave feedback at <https://github.com/flutter/flutter/issues/152409>.',
|
||||
)
|
||||
..addOption('profile-memory', help: 'Launch devtools and profile application memory, writing '
|
||||
'The output data to the file path provided to this argument as JSON.',
|
||||
valueHelp: 'profile_memory.json')
|
||||
|
||||
@@ -262,7 +262,8 @@ class FlutterDriverService extends DriverService {
|
||||
try {
|
||||
final int result = await _processUtils.stream(<String>[
|
||||
_dartSdkPath,
|
||||
...<String>[...arguments, testFile, '-rexpanded'],
|
||||
...arguments,
|
||||
testFile,
|
||||
], environment: <String, String>{
|
||||
'VM_SERVICE_URL': _vmServiceUri,
|
||||
...environment,
|
||||
|
||||
@@ -195,7 +195,6 @@ class WebDriverService extends DriverService {
|
||||
_dartSdkPath,
|
||||
...arguments,
|
||||
testFile,
|
||||
'-rexpanded',
|
||||
], environment: <String, String>{
|
||||
'VM_SERVICE_URL': _webUri.toString(),
|
||||
..._additionalDriverEnvironment(webDriver, browserName, androidEmulator),
|
||||
|
||||
Reference in New Issue
Block a user