Add Compilation DeviceLab test for Windows (#109540)
* Add Windows compilation test (hello_world_windows__compile) * Add devicelab target to .ci.yaml * Bringup on new target * Add license to generated files * Indicate test ownership * Delete asset from repo * Add Windows compilation test (hello_world_windows__compile) * Add devicelab target to .ci.yaml * Bringup on new target * Add license to generated files * Indicate test ownership * Delete icon * Use path.basename Re triggering tests * Update test owner to desktop team
This commit is contained in:
12
dev/devicelab/bin/tasks/hello_world_windows__compile.dart
Normal file
12
dev/devicelab/bin/tasks/hello_world_windows__compile.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
// Copyright 2014 The Flutter Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter_devicelab/framework/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/perf_tests.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.windows;
|
||||
await task(createHelloWorldCompileTest());
|
||||
}
|
||||
@@ -1446,7 +1446,27 @@ class CompileTest {
|
||||
case DeviceOperatingSystem.macos:
|
||||
throw Exception('Unsupported option for macOS devices');
|
||||
case DeviceOperatingSystem.windows:
|
||||
throw Exception('Unsupported option for Windows devices');
|
||||
unawaited(stderr.flush());
|
||||
options.insert(0, 'windows');
|
||||
options.add('--tree-shake-icons');
|
||||
options.add('--split-debug-info=infos/');
|
||||
watch.start();
|
||||
await flutter('build', options: options);
|
||||
watch.stop();
|
||||
final String basename = path.basename(cwd);
|
||||
final String exePath = path.join(
|
||||
cwd,
|
||||
'build',
|
||||
'windows',
|
||||
'runner',
|
||||
'release',
|
||||
'$basename.exe');
|
||||
final File exe = file(exePath);
|
||||
// On Windows, we do not produce a single installation package file,
|
||||
// rather a directory containing an .exe and .dll files.
|
||||
// The release size is set to the size of the produced .exe file
|
||||
releaseSizeInBytes = exe.lengthSync();
|
||||
break;
|
||||
}
|
||||
|
||||
metrics.addAll(<String, dynamic>{
|
||||
@@ -1486,7 +1506,9 @@ class CompileTest {
|
||||
case DeviceOperatingSystem.macos:
|
||||
throw Exception('Unsupported option for Fuchsia devices');
|
||||
case DeviceOperatingSystem.windows:
|
||||
throw Exception('Unsupported option for Windows devices');
|
||||
unawaited(stderr.flush());
|
||||
options.insert(0, 'windows');
|
||||
break;
|
||||
}
|
||||
watch.start();
|
||||
await flutter('build', options: options);
|
||||
|
||||
Reference in New Issue
Block a user