Skip to content

[ci] Remove web renderer option from tools. #8055

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 4 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions script/tool/lib/src/dart_test_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,9 @@ class DartTestCommand extends PackageLoopingCommand {
platform = 'chrome';
}

// All the web tests assume the canvaskit renderer currently.
final String? webRenderer = (platform == 'chrome') ? 'canvaskit' : null;
bool passed;
if (package.requiresFlutter()) {
passed = await _runFlutterTests(package,
platform: platform, webRenderer: webRenderer);
passed = await _runFlutterTests(package, platform: platform);
} else {
passed = await _runDartTests(package, platform: platform);
}
Expand All @@ -122,7 +119,7 @@ class DartTestCommand extends PackageLoopingCommand {

/// Runs the Dart tests for a Flutter package, returning true on success.
Future<bool> _runFlutterTests(RepositoryPackage package,
{String? platform, String? webRenderer}) async {
{String? platform}) async {
final String experiment = getStringArg(kEnableExperiment);

final int exitCode = await processRunner.runAndStream(
Expand All @@ -134,7 +131,6 @@ class DartTestCommand extends PackageLoopingCommand {
// Flutter defaults to VM mode (under a different name) and explicitly
// setting it is deprecated, so pass nothing in that case.
if (platform != null && platform != 'vm') '--platform=$platform',
if (webRenderer != null) '--web-renderer=$webRenderer',
],
workingDir: package.directory,
);
Expand Down
8 changes: 1 addition & 7 deletions script/tool/lib/src/drive_examples_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,7 @@ class DriveExamplesCommand extends PackageLoopingCommand {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
if (useWasm)
'--wasm'
// TODO(dit): Clean this up, https://github.com/flutter/flutter/issues/151869
else if (platform.environment['CHANNEL']?.toLowerCase() == 'master')
'--web-renderer=canvaskit'
else
'--web-renderer=html',
if (useWasm) '--wasm',
if (platform.environment.containsKey('CHROME_EXECUTABLE'))
'--chrome-binary=${platform.environment['CHROME_EXECUTABLE']}',
],
Expand Down
5 changes: 0 additions & 5 deletions script/tool/test/dart_test_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
package.path),
]),
Expand Down Expand Up @@ -360,7 +359,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
plugin.path),
]),
Expand Down Expand Up @@ -390,7 +388,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
plugin.path),
]),
Expand Down Expand Up @@ -420,7 +417,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
plugin.path),
]),
Expand Down Expand Up @@ -495,7 +491,6 @@ test_on: vm && browser
'test',
'--color',
'--platform=chrome',
'--web-renderer=canvaskit',
],
plugin.path),
]),
Expand Down
63 changes: 0 additions & 63 deletions script/tool/test/drive_examples_command_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,6 @@ void main() {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
'--web-renderer=canvaskit',
'--screenshot=/path/to/logs/plugin_example-drive',
'--driver',
'test_driver/integration_test.dart',
Expand Down Expand Up @@ -822,61 +821,6 @@ void main() {
]));
});

// TODO(dit): Clean this up, https://github.com/flutter/flutter/issues/151869
test('drives a web plugin (html renderer in stable)', () async {
// Override the platform to simulate CHANNEL: stable
mockPlatform.environment['CHANNEL'] = 'stable';

final RepositoryPackage plugin = createFakePlugin(
'plugin',
packagesDir,
extraFiles: <String>[
'example/integration_test/plugin_test.dart',
'example/test_driver/integration_test.dart',
'example/web/index.html',
],
platformSupport: <String, PlatformDetails>{
platformWeb: const PlatformDetails(PlatformSupport.inline),
},
);

final Directory pluginExampleDirectory = getExampleDir(plugin);

final List<String> output = await runCapturingPrint(runner, <String>[
'drive-examples',
'--web',
]);

expect(
output,
containsAllInOrder(<Matcher>[
contains('Running for plugin'),
contains('No issues found!'),
]),
);

expect(
processRunner.recordedCalls,
orderedEquals(<ProcessCall>[
ProcessCall(
getFlutterCommand(mockPlatform),
const <String>[
'drive',
'-d',
'web-server',
'--web-port=7357',
'--browser-name=chrome',
'--web-renderer=html',
'--screenshot=/path/to/logs/plugin_example-drive',
'--driver',
'test_driver/integration_test.dart',
'--target',
'integration_test/plugin_test.dart',
],
pluginExampleDirectory.path),
]));
});

test('runs chromedriver when requested', () async {
final RepositoryPackage plugin = createFakePlugin(
'plugin',
Expand Down Expand Up @@ -916,7 +860,6 @@ void main() {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
'--web-renderer=canvaskit',
'--screenshot=/path/to/logs/plugin_example-drive',
'--driver',
'test_driver/integration_test.dart',
Expand Down Expand Up @@ -969,7 +912,6 @@ void main() {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
'--web-renderer=canvaskit',
'--chrome-binary=/path/to/chrome',
'--screenshot=/path/to/logs/plugin_example-drive',
'--driver',
Expand Down Expand Up @@ -1421,7 +1363,6 @@ void main() {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
'--web-renderer=canvaskit',
'--screenshot=/path/to/logs/plugin_example-drive',
'--driver',
'test_driver/integration_test.dart',
Expand All @@ -1437,7 +1378,6 @@ void main() {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
'--web-renderer=canvaskit',
'--screenshot=/path/to/logs/plugin_example-drive',
'--driver',
'test_driver/integration_test.dart',
Expand Down Expand Up @@ -1537,7 +1477,6 @@ void main() {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
'--web-renderer=canvaskit',
'--screenshot=/path/to/logs/a_package_example-drive',
'--driver',
'test_driver/integration_test.dart',
Expand Down Expand Up @@ -1583,7 +1522,6 @@ void main() {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
'--web-renderer=canvaskit',
'--driver',
'test_driver/integration_test.dart',
'--target',
Expand Down Expand Up @@ -1663,7 +1601,6 @@ void main() {
'web-server',
'--web-port=7357',
'--browser-name=chrome',
'--web-renderer=canvaskit',
'--screenshot=/path/to/logs/a_package_example_with_web-drive',
'--driver',
'test_driver/integration_test.dart',
Expand Down