[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
This commit is contained in:
@@ -47,17 +47,12 @@ class NewGalleryChromeRunTest {
|
||||
'-v',
|
||||
'--release',
|
||||
'--no-pub',
|
||||
], environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
});
|
||||
]);
|
||||
|
||||
final List<String> options = <String>['-d', 'chrome', '--verbose', '--resident'];
|
||||
final Process process = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
flutterCommandArgs('run', options),
|
||||
environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
},
|
||||
);
|
||||
|
||||
final Completer<void> stdoutDone = Completer<void>();
|
||||
|
||||
@@ -8,7 +8,5 @@ import 'package:flutter_devicelab/tasks/hot_mode_tests.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
await task(createHotModeTest(deviceIdOverride: 'macos', environment: <String, String>{
|
||||
'FLUTTER_MACOS': 'true',
|
||||
}));
|
||||
await task(createHotModeTest(deviceIdOverride: 'macos'));
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import 'dart:developer';
|
||||
import 'dart:io';
|
||||
import 'dart:isolate';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:stack_trace/stack_trace.dart';
|
||||
|
||||
@@ -85,9 +86,22 @@ class _TaskRunner {
|
||||
).toSet();
|
||||
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();
|
||||
if (taskTimeout != null)
|
||||
futureResult = futureResult.timeout(taskTimeout);
|
||||
|
||||
TaskResult result = await futureResult;
|
||||
|
||||
section('Checking running Dart$exe processes after task...');
|
||||
|
||||
@@ -71,9 +71,6 @@ TaskFunction createCodegenerationIntegrationTest() {
|
||||
return DriverTest(
|
||||
'${flutterDirectory.path}/dev/integration_tests/codegen',
|
||||
'lib/main.dart',
|
||||
environment: <String, String>{
|
||||
'FLUTTER_EXPERIMENTAL_BUILD': 'true',
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -350,9 +350,7 @@ class WebCompileTest {
|
||||
rmTree(sampleDir);
|
||||
|
||||
await inDirectory<void>(Directory.systemTemp, () async {
|
||||
await flutter('create', options: <String>['--template=app', sampleAppName], environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
});
|
||||
await flutter('create', options: <String>['--template=app', sampleAppName]);
|
||||
});
|
||||
|
||||
metrics.addAll(await runSingleBuildTest(
|
||||
@@ -379,9 +377,7 @@ class WebCompileTest {
|
||||
'-v',
|
||||
'--release',
|
||||
'--no-pub',
|
||||
], environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
});
|
||||
]);
|
||||
watch?.stop();
|
||||
final String outputFileName = path.join(directory, 'build/web/main.dart.js');
|
||||
metrics.addAll(await getSize(outputFileName, metric: metric));
|
||||
|
||||
@@ -46,10 +46,6 @@ class TrackWidgetCreationEnabledTask {
|
||||
deviceIdOverride,
|
||||
path.join('lib/track_widget_creation.dart'),
|
||||
]),
|
||||
environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
'FLUTTER_MACOS': 'true'
|
||||
}
|
||||
);
|
||||
runProcess.stdout
|
||||
.transform(utf8.decoder)
|
||||
@@ -84,10 +80,6 @@ class TrackWidgetCreationEnabledTask {
|
||||
deviceIdOverride,
|
||||
path.join('lib/track_widget_creation.dart'),
|
||||
]),
|
||||
environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
'FLUTTER_MACOS': 'true'
|
||||
}
|
||||
);
|
||||
runProcess.stdout
|
||||
.transform(utf8.decoder)
|
||||
|
||||
@@ -34,9 +34,7 @@ Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async {
|
||||
'--profile',
|
||||
'-t',
|
||||
'lib/web_benchmarks.dart',
|
||||
], environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
});
|
||||
]);
|
||||
final Completer<List<Map<String, dynamic>>> profileData = Completer<List<Map<String, dynamic>>>();
|
||||
final List<Map<String, dynamic>> collectedProfiles = <Map<String, dynamic>>[];
|
||||
List<String> benchmarks;
|
||||
|
||||
@@ -45,21 +45,11 @@ TaskFunction createWebDevModeTest(String webDevice, bool enableIncrementalCompil
|
||||
final Process packagesGet = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['packages', 'get'],
|
||||
environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
if (enableIncrementalCompiler)
|
||||
'WEB_INCREMENTAL_COMPILER': 'true',
|
||||
},
|
||||
);
|
||||
await packagesGet.exitCode;
|
||||
final Process process = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
flutterCommandArgs('run', options),
|
||||
environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
if (enableIncrementalCompiler)
|
||||
'WEB_INCREMENTAL_COMPILER': 'true',
|
||||
},
|
||||
);
|
||||
|
||||
final Completer<void> stdoutDone = Completer<void>();
|
||||
@@ -140,11 +130,6 @@ TaskFunction createWebDevModeTest(String webDevice, bool enableIncrementalCompil
|
||||
final Process process = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
flutterCommandArgs('run', options),
|
||||
environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
if (enableIncrementalCompiler)
|
||||
'WEB_INCREMENTAL_COMPILER': 'true',
|
||||
},
|
||||
);
|
||||
final Completer<void> stdoutDone = Completer<void>();
|
||||
final Completer<void> stderrDone = Completer<void>();
|
||||
|
||||
Reference in New Issue
Block a user