[flutter_tools] measure driver success and failure (#69226)
Currently we only have a test that measures if flutter drive can fail. Unfortunately it has been failing for multiple years based on the fact that the error is due to a missing Gradle config. Add a smoke success test case, and update both tests to use the test API and the tester-device.
This commit is contained in:
@@ -239,15 +239,23 @@ Future<void> _runSmokeTests() async {
|
||||
expectFailure: true,
|
||||
printOutput: false,
|
||||
),
|
||||
runCommand(flutter,
|
||||
<String>['drive', '--use-existing-app', '-t', path.join('test_driver', 'failure.dart')],
|
||||
workingDirectory: path.join(flutterRoot, 'packages', 'flutter_driver'),
|
||||
expectNonZeroExit: true,
|
||||
outputMode: OutputMode.capture,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
// The flutter-tester device cannot be run concurrently in the same project directory.
|
||||
await runCommand(flutter,
|
||||
<String>['drive', '--show-test-device', '-d', 'flutter-tester', '-t', path.join('test_driver', 'success.dart')],
|
||||
workingDirectory: path.join(flutterRoot, 'packages', 'flutter_driver'),
|
||||
expectNonZeroExit: false,
|
||||
outputMode: OutputMode.capture,
|
||||
);
|
||||
await runCommand(flutter,
|
||||
<String>['drive', '--show-test-device', '-d', 'flutter-tester', '-t', path.join('test_driver', 'failure.dart')],
|
||||
workingDirectory: path.join(flutterRoot, 'packages', 'flutter_driver'),
|
||||
expectNonZeroExit: true,
|
||||
outputMode: OutputMode.capture,
|
||||
);
|
||||
|
||||
// Verify that we correctly generated the version file.
|
||||
final String versionError = await verifyVersion(File(path.join(flutterRoot, 'version')));
|
||||
if (versionError != null)
|
||||
|
||||
Reference in New Issue
Block a user