Revert "fix devicelab manfiest (#33698)" This reverts commit5a6a00dc54. This reverts commit0d79f0fc79.
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
// Copyright 2019 The Chromium 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/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/web_dev_mode_tests.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
await task(createWebDevModeTest());
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// Copyright 2019 The Chromium 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/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/web_dev_mode_tests.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
await task(createWebDevModeTest());
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// Copyright 2019 The Chromium 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/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/web_dev_mode_tests.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
await task(createWebDevModeTest());
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
// Copyright 2019 The Chromium 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 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
import '../framework/framework.dart';
|
||||
import '../framework/utils.dart';
|
||||
|
||||
final Directory _editedFlutterGalleryDir = dir(path.join(Directory.systemTemp.path, 'edited_flutter_gallery'));
|
||||
final Directory flutterGalleryDir = dir(path.join(flutterDirectory.path, 'examples/flutter_gallery'));
|
||||
|
||||
TaskFunction createWebDevModeTest() {
|
||||
return () async {
|
||||
final List<String> options = <String>[
|
||||
'--hot', '-d', 'web', '--verbose', '--resident', '--target=lib/main_web.dart',
|
||||
];
|
||||
setLocalEngineOptionIfNecessary(options);
|
||||
int hotRestartCount = 0;
|
||||
await inDirectory<void>(flutterDirectory, () async {
|
||||
rmTree(_editedFlutterGalleryDir);
|
||||
mkdirs(_editedFlutterGalleryDir);
|
||||
recursiveCopy(flutterGalleryDir, _editedFlutterGalleryDir);
|
||||
await inDirectory<void>(_editedFlutterGalleryDir, () async {
|
||||
{
|
||||
final Process packagesGet = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['packages', 'get'],
|
||||
environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
},
|
||||
);
|
||||
await packagesGet.exitCode;
|
||||
final Process process = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['run']..addAll(options),
|
||||
environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
},
|
||||
);
|
||||
|
||||
final Completer<void> stdoutDone = Completer<void>();
|
||||
final Completer<void> stderrDone = Completer<void>();
|
||||
process.stdout
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
if (line.contains('To hot restart')) {
|
||||
process.stdin.write('R');
|
||||
}
|
||||
if (line.contains('Restarted')) {
|
||||
if (hotRestartCount == 0) {
|
||||
// Update the file and reload again.
|
||||
final File appDartSource = file(path.join(
|
||||
_editedFlutterGalleryDir.path, 'lib/gallery/app.dart',
|
||||
));
|
||||
appDartSource.writeAsStringSync(
|
||||
appDartSource.readAsStringSync().replaceFirst(
|
||||
"'Flutter Gallery'", "'Updated Flutter Gallery'",
|
||||
)
|
||||
);
|
||||
process.stdin.writeln('R');
|
||||
++hotRestartCount;
|
||||
} else {
|
||||
// Quit after second hot restart.
|
||||
process.stdin.writeln('q');
|
||||
}
|
||||
}
|
||||
print('stdout: $line');
|
||||
}, onDone: () {
|
||||
stdoutDone.complete();
|
||||
});
|
||||
process.stderr
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('stderr: $line');
|
||||
}, onDone: () {
|
||||
stderrDone.complete();
|
||||
});
|
||||
|
||||
await Future.wait<void>(<Future<void>>[
|
||||
stdoutDone.future,
|
||||
stderrDone.future,
|
||||
]);
|
||||
await process.exitCode;
|
||||
|
||||
}
|
||||
|
||||
// Start `flutter run` again to make sure it loads from the previous
|
||||
// state. dev compilers loads up from previously compiled JavaScript.
|
||||
{
|
||||
final Process process = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['run']..addAll(options),
|
||||
environment: <String, String>{
|
||||
'FLUTTER_WEB': 'true',
|
||||
},
|
||||
);
|
||||
final Completer<void> stdoutDone = Completer<void>();
|
||||
final Completer<void> stderrDone = Completer<void>();
|
||||
process.stdout
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
if (line.contains('To hot restart')) {
|
||||
process.stdin.write('R');
|
||||
}
|
||||
if (line.contains('Restarted')) {
|
||||
process.stdin.writeln('q');
|
||||
}
|
||||
print('stdout: $line');
|
||||
}, onDone: () {
|
||||
stdoutDone.complete();
|
||||
});
|
||||
process.stderr
|
||||
.transform<String>(utf8.decoder)
|
||||
.transform<String>(const LineSplitter())
|
||||
.listen((String line) {
|
||||
print('stderr: $line');
|
||||
}, onDone: () {
|
||||
stderrDone.complete();
|
||||
});
|
||||
|
||||
await Future.wait<void>(<Future<void>>[
|
||||
stdoutDone.future,
|
||||
stderrDone.future,
|
||||
]);
|
||||
await process.exitCode;
|
||||
}
|
||||
});
|
||||
});
|
||||
return TaskResult.success(null);
|
||||
};
|
||||
}
|
||||
@@ -125,13 +125,6 @@ tasks:
|
||||
stage: devicelab_win
|
||||
required_agent_capabilities: ["windows/android"]
|
||||
|
||||
windows_chrome_dev_mode:
|
||||
description: >
|
||||
Run flutter web on the devicelab and hot restart.
|
||||
stage: devicelab_win
|
||||
required_agent_capabilities: ["windows/android"]
|
||||
flaky: true
|
||||
|
||||
# Android on-device tests
|
||||
|
||||
complex_layout_scroll_perf__timeline_summary:
|
||||
@@ -331,13 +324,6 @@ tasks:
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["linux/android"]
|
||||
|
||||
linux_chrome_dev_mode:
|
||||
description: >
|
||||
Run flutter web on the devicelab and hot restart.
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["linux/android"]
|
||||
flaky: true
|
||||
|
||||
# iOS on-device tests
|
||||
|
||||
flavors_test_ios:
|
||||
@@ -435,13 +421,6 @@ tasks:
|
||||
stage: devicelab_ios
|
||||
required_agent_capabilities: ["mac/ios"]
|
||||
|
||||
macos_chrome_dev_mode:
|
||||
description: >
|
||||
Run flutter web on the devicelab and hot restart.
|
||||
stage: devicelab_ios
|
||||
required_agent_capabilities: ["mac/ios"]
|
||||
flaky: true
|
||||
|
||||
# Tests running on Windows host
|
||||
|
||||
flavors_test_win:
|
||||
|
||||
@@ -8,7 +8,7 @@ environment:
|
||||
sdk: ">=2.0.0-dev.68.0 <3.0.0"
|
||||
|
||||
dependencies:
|
||||
args: 1.5.2
|
||||
args: 1.5.1
|
||||
file: 5.0.8
|
||||
image: 2.1.3
|
||||
meta: 1.1.6
|
||||
@@ -73,4 +73,4 @@ dev_dependencies:
|
||||
watcher: 0.9.7+10 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
yaml: 2.1.15 # THIS LINE IS AUTOGENERATED - TO UPDATE USE "flutter update-packages --force-upgrade"
|
||||
|
||||
# PUBSPEC CHECKSUM: e419
|
||||
# PUBSPEC CHECKSUM: b018
|
||||
|
||||
Reference in New Issue
Block a user