Unverified Commit f04d6194 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[devicelab] enable macOS, windows, linux, and web on devicelab bots (#56336)

* enable macOS desktop

* enable all configs on CI

* Update track_widget_creation_enabled_task.dart

* Update framework.dart

* remove FLUTTER_WEB

* remove config environment variables

* configure in correct spot
parent e963bfe1
...@@ -47,17 +47,12 @@ class NewGalleryChromeRunTest { ...@@ -47,17 +47,12 @@ class NewGalleryChromeRunTest {
'-v', '-v',
'--release', '--release',
'--no-pub', '--no-pub',
], environment: <String, String>{ ]);
'FLUTTER_WEB': 'true',
});
final List<String> options = <String>['-d', 'chrome', '--verbose', '--resident']; final List<String> options = <String>['-d', 'chrome', '--verbose', '--resident'];
final Process process = await startProcess( final Process process = await startProcess(
path.join(flutterDirectory.path, 'bin', 'flutter'), path.join(flutterDirectory.path, 'bin', 'flutter'),
flutterCommandArgs('run', options), flutterCommandArgs('run', options),
environment: <String, String>{
'FLUTTER_WEB': 'true',
},
); );
final Completer<void> stdoutDone = Completer<void>(); final Completer<void> stdoutDone = Completer<void>();
......
...@@ -8,7 +8,5 @@ import 'package:flutter_devicelab/tasks/hot_mode_tests.dart'; ...@@ -8,7 +8,5 @@ import 'package:flutter_devicelab/tasks/hot_mode_tests.dart';
import 'package:flutter_devicelab/framework/framework.dart'; import 'package:flutter_devicelab/framework/framework.dart';
Future<void> main() async { Future<void> main() async {
await task(createHotModeTest(deviceIdOverride: 'macos', environment: <String, String>{ await task(createHotModeTest(deviceIdOverride: 'macos'));
'FLUTTER_MACOS': 'true',
}));
} }
...@@ -8,6 +8,7 @@ import 'dart:developer'; ...@@ -8,6 +8,7 @@ import 'dart:developer';
import 'dart:io'; import 'dart:io';
import 'dart:isolate'; import 'dart:isolate';
import 'package:path/path.dart' as path;
import 'package:logging/logging.dart'; import 'package:logging/logging.dart';
import 'package:stack_trace/stack_trace.dart'; import 'package:stack_trace/stack_trace.dart';
...@@ -85,9 +86,22 @@ class _TaskRunner { ...@@ -85,9 +86,22 @@ class _TaskRunner {
).toSet(); ).toSet();
beforeRunningDartInstances.forEach(print); beforeRunningDartInstances.forEach(print);
print('enabling configs for macOS, Linux, Windows, and Web...');
final int configResult = await exec(path.join(flutterDirectory.path, 'bin', 'flutter'), <String>[
'config',
'--enable-macos-desktop',
'--enable-windows-desktop',
'--enable-linux-desktop',
'--enable-web'
]);
if (configResult != 0) {
print('Failed to enable configuration, tasks may not run.');
}
Future<TaskResult> futureResult = _performTask(); Future<TaskResult> futureResult = _performTask();
if (taskTimeout != null) if (taskTimeout != null)
futureResult = futureResult.timeout(taskTimeout); futureResult = futureResult.timeout(taskTimeout);
TaskResult result = await futureResult; TaskResult result = await futureResult;
section('Checking running Dart$exe processes after task...'); section('Checking running Dart$exe processes after task...');
......
...@@ -71,9 +71,6 @@ TaskFunction createCodegenerationIntegrationTest() { ...@@ -71,9 +71,6 @@ TaskFunction createCodegenerationIntegrationTest() {
return DriverTest( return DriverTest(
'${flutterDirectory.path}/dev/integration_tests/codegen', '${flutterDirectory.path}/dev/integration_tests/codegen',
'lib/main.dart', 'lib/main.dart',
environment: <String, String>{
'FLUTTER_EXPERIMENTAL_BUILD': 'true',
},
); );
} }
......
...@@ -350,9 +350,7 @@ class WebCompileTest { ...@@ -350,9 +350,7 @@ class WebCompileTest {
rmTree(sampleDir); rmTree(sampleDir);
await inDirectory<void>(Directory.systemTemp, () async { await inDirectory<void>(Directory.systemTemp, () async {
await flutter('create', options: <String>['--template=app', sampleAppName], environment: <String, String>{ await flutter('create', options: <String>['--template=app', sampleAppName]);
'FLUTTER_WEB': 'true',
});
}); });
metrics.addAll(await runSingleBuildTest( metrics.addAll(await runSingleBuildTest(
...@@ -379,9 +377,7 @@ class WebCompileTest { ...@@ -379,9 +377,7 @@ class WebCompileTest {
'-v', '-v',
'--release', '--release',
'--no-pub', '--no-pub',
], environment: <String, String>{ ]);
'FLUTTER_WEB': 'true',
});
watch?.stop(); watch?.stop();
final String outputFileName = path.join(directory, 'build/web/main.dart.js'); final String outputFileName = path.join(directory, 'build/web/main.dart.js');
metrics.addAll(await getSize(outputFileName, metric: metric)); metrics.addAll(await getSize(outputFileName, metric: metric));
......
...@@ -46,10 +46,6 @@ class TrackWidgetCreationEnabledTask { ...@@ -46,10 +46,6 @@ class TrackWidgetCreationEnabledTask {
deviceIdOverride, deviceIdOverride,
path.join('lib/track_widget_creation.dart'), path.join('lib/track_widget_creation.dart'),
]), ]),
environment: <String, String>{
'FLUTTER_WEB': 'true',
'FLUTTER_MACOS': 'true'
}
); );
runProcess.stdout runProcess.stdout
.transform(utf8.decoder) .transform(utf8.decoder)
...@@ -84,10 +80,6 @@ class TrackWidgetCreationEnabledTask { ...@@ -84,10 +80,6 @@ class TrackWidgetCreationEnabledTask {
deviceIdOverride, deviceIdOverride,
path.join('lib/track_widget_creation.dart'), path.join('lib/track_widget_creation.dart'),
]), ]),
environment: <String, String>{
'FLUTTER_WEB': 'true',
'FLUTTER_MACOS': 'true'
}
); );
runProcess.stdout runProcess.stdout
.transform(utf8.decoder) .transform(utf8.decoder)
......
...@@ -34,9 +34,7 @@ Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async { ...@@ -34,9 +34,7 @@ Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async {
'--profile', '--profile',
'-t', '-t',
'lib/web_benchmarks.dart', 'lib/web_benchmarks.dart',
], environment: <String, String>{ ]);
'FLUTTER_WEB': 'true',
});
final Completer<List<Map<String, dynamic>>> profileData = Completer<List<Map<String, dynamic>>>(); final Completer<List<Map<String, dynamic>>> profileData = Completer<List<Map<String, dynamic>>>();
final List<Map<String, dynamic>> collectedProfiles = <Map<String, dynamic>>[]; final List<Map<String, dynamic>> collectedProfiles = <Map<String, dynamic>>[];
List<String> benchmarks; List<String> benchmarks;
......
...@@ -45,21 +45,11 @@ TaskFunction createWebDevModeTest(String webDevice, bool enableIncrementalCompil ...@@ -45,21 +45,11 @@ TaskFunction createWebDevModeTest(String webDevice, bool enableIncrementalCompil
final Process packagesGet = await startProcess( final Process packagesGet = await startProcess(
path.join(flutterDirectory.path, 'bin', 'flutter'), path.join(flutterDirectory.path, 'bin', 'flutter'),
<String>['packages', 'get'], <String>['packages', 'get'],
environment: <String, String>{
'FLUTTER_WEB': 'true',
if (enableIncrementalCompiler)
'WEB_INCREMENTAL_COMPILER': 'true',
},
); );
await packagesGet.exitCode; await packagesGet.exitCode;
final Process process = await startProcess( final Process process = await startProcess(
path.join(flutterDirectory.path, 'bin', 'flutter'), path.join(flutterDirectory.path, 'bin', 'flutter'),
flutterCommandArgs('run', options), flutterCommandArgs('run', options),
environment: <String, String>{
'FLUTTER_WEB': 'true',
if (enableIncrementalCompiler)
'WEB_INCREMENTAL_COMPILER': 'true',
},
); );
final Completer<void> stdoutDone = Completer<void>(); final Completer<void> stdoutDone = Completer<void>();
...@@ -140,11 +130,6 @@ TaskFunction createWebDevModeTest(String webDevice, bool enableIncrementalCompil ...@@ -140,11 +130,6 @@ TaskFunction createWebDevModeTest(String webDevice, bool enableIncrementalCompil
final Process process = await startProcess( final Process process = await startProcess(
path.join(flutterDirectory.path, 'bin', 'flutter'), path.join(flutterDirectory.path, 'bin', 'flutter'),
flutterCommandArgs('run', options), flutterCommandArgs('run', options),
environment: <String, String>{
'FLUTTER_WEB': 'true',
if (enableIncrementalCompiler)
'WEB_INCREMENTAL_COMPILER': 'true',
},
); );
final Completer<void> stdoutDone = Completer<void>(); final Completer<void> stdoutDone = Completer<void>();
final Completer<void> stderrDone = Completer<void>(); final Completer<void> stderrDone = Completer<void>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment