[devicelab] delete disabled or not useful benchmarks (#68107)
- run_without_leak_tests: have been disabled for months - build_benchmark: the tooling work here is mostly done and we're not tracking further improvements, free up more devicelab capacity - system_debug_ios: does not work post iOS13 - mac_enable_twc: not adding more mac tests to devicelab - hello_world_start_up: disabled Any tests that we think will be valuable in the future can be resurrected from the git history.
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
// 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/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/build_benchmarks.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
await task(createAndroidBuildBenchmarkTask());
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
// 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/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/build_benchmarks.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
await task(createIosBuildBenchmarkTask());
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// 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/tasks/perf_tests.dart';
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
await task(createHelloWorldStartupTest());
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// 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/framework.dart';
|
||||
import 'package:flutter_devicelab/tasks/track_widget_creation_enabled_task.dart';
|
||||
|
||||
/// Verify that twc can be enabled/disabled on macOS
|
||||
Future<void> main() async {
|
||||
await task(TrackWidgetCreationEnabledTask('macos').task);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// 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/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/run_without_leak.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
await task(createRunWithoutLeakTest(path.join(flutterDirectory.path, 'examples', 'hello_world')));
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// 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/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/run_without_leak.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
await task(createRunWithoutLeakTest(path.join(flutterDirectory.path, 'examples', 'hello_world')));
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
// 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/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/run_without_leak.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
await task(createRunWithoutLeakTest(path.join(flutterDirectory.path, 'examples', 'hello_world')));
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
// 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 'dart:io';
|
||||
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
|
||||
import 'service_extensions_test.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||
await task(() async {
|
||||
final Device device = await devices.workingDevice;
|
||||
await device.unlock();
|
||||
final String deviceId = device.deviceId;
|
||||
|
||||
final Directory testDirectory =
|
||||
dir('${flutterDirectory.path}/dev/integration_tests/ui');
|
||||
await inDirectory<void>(testDirectory, () async {
|
||||
await flutter('packages', options: <String>['get']);
|
||||
|
||||
await checkNoWarningHostLaunch(deviceId);
|
||||
await checkNoWarningXcodeLaunch(deviceId);
|
||||
await checkWarningHomeScreenLaunch(deviceId);
|
||||
});
|
||||
return TaskResult.success(<String, dynamic>{});
|
||||
});
|
||||
}
|
||||
|
||||
const String expectedWarning =
|
||||
'Launching a debug-mode app from the home screen may cause problems.';
|
||||
|
||||
// When a debug-mode app is launched from the host there should be no warnings.
|
||||
Future<void> checkNoWarningHostLaunch(String deviceId) async {
|
||||
final String output = await evalFlutter('drive', options: <String>[
|
||||
'--debug',
|
||||
'--verbose',
|
||||
'--verbose-system-logs',
|
||||
'-d',
|
||||
deviceId,
|
||||
'lib/empty.dart',
|
||||
]);
|
||||
|
||||
expect(!output.contains(expectedWarning));
|
||||
}
|
||||
|
||||
// When a debug-mode app is launched from Xcode there should be no warnings. The
|
||||
// Xcode launch is simulated by keeping LLDB attached throughout the lifetime of
|
||||
// the app.
|
||||
Future<void> checkNoWarningXcodeLaunch(String deviceId) async {
|
||||
await flutter('build',
|
||||
options: <String>['ios', '--debug', '--verbose', 'lib/exit.dart']);
|
||||
|
||||
final String output = await eval(
|
||||
'${flutterDirectory.path}/bin/cache/artifacts/ios-deploy/ios-deploy',
|
||||
<String>[
|
||||
'--bundle',
|
||||
'build/ios/iphoneos/Runner.app',
|
||||
'-d', // Actually start the app in LLDB, don't just install it.
|
||||
'--noninteractive',
|
||||
'--args',
|
||||
'--verbose-logging',
|
||||
]);
|
||||
|
||||
expect(output.contains('success') && !output.contains(expectedWarning));
|
||||
}
|
||||
|
||||
// When a debug-mode app is launched from the home screen there should be a
|
||||
// warning every ~100 launches. We lower the threshold from to 1 via
|
||||
// "--verbose-system-logs" and simulate a home-screen-launch by setting an
|
||||
// environment variable. The environment variable forces "flutter drive" to not
|
||||
// pass a flag which it normally passes to debug-mode apps, imitating launchd,
|
||||
// which doesn't pass any command-line flags.
|
||||
Future<void> checkWarningHomeScreenLaunch(String deviceId) async {
|
||||
final String output = await evalFlutter('drive', options: <String>[
|
||||
'--debug',
|
||||
'--verbose',
|
||||
'--verbose-system-logs',
|
||||
'-d',
|
||||
deviceId,
|
||||
'lib/empty.dart',
|
||||
], environment: <String, String>{
|
||||
'FLUTTER_TOOLS_DEBUG_WITHOUT_CHECKED_MODE': 'true',
|
||||
});
|
||||
expect(output.contains(expectedWarning));
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
// 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 'dart:io';
|
||||
|
||||
import 'package:flutter_devicelab/framework/adb.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
await task(createTimeToDevelopmentCommand);
|
||||
}
|
||||
|
||||
final Directory flutterGalleryDir =
|
||||
dir(path.join(flutterDirectory.path, 'dev', 'integration_tests', 'flutter_gallery'));
|
||||
final Directory editedFlutterGalleryDir =
|
||||
dir(path.join(Directory.systemTemp.path, 'edited_flutter_gallery'));
|
||||
|
||||
Future<TaskResult> createTimeToDevelopmentCommand() async {
|
||||
final Map<String, double> allResults = <String, double>{};
|
||||
bool failed = false;
|
||||
await inDirectory<void>(flutterDirectory, () async {
|
||||
rmTree(editedFlutterGalleryDir);
|
||||
mkdirs(editedFlutterGalleryDir);
|
||||
recursiveCopy(flutterGalleryDir, editedFlutterGalleryDir);
|
||||
await inDirectory<void>(editedFlutterGalleryDir, () async {
|
||||
final Device device = await devices.workingDevice;
|
||||
await device.unlock();
|
||||
final Stopwatch stopwatch = Stopwatch()..start();
|
||||
final Process initialBuild = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['run', '--debug', '-d', device.deviceId, '--no-resident',],
|
||||
);
|
||||
int exitCode = await initialBuild.exitCode;
|
||||
if (exitCode != 0) {
|
||||
failed = true;
|
||||
return;
|
||||
}
|
||||
final int initialBuildMilliseconds = stopwatch.elapsedMilliseconds;
|
||||
stopwatch
|
||||
..reset()
|
||||
..start();
|
||||
// Update a source file.
|
||||
final File appDartSource = file(path.join(
|
||||
editedFlutterGalleryDir.path,
|
||||
'lib/gallery/app.dart',
|
||||
));
|
||||
appDartSource.writeAsStringSync(
|
||||
appDartSource.readAsStringSync().replaceFirst(
|
||||
"'Flutter Gallery'",
|
||||
"'Updated Flutter Gallery'",
|
||||
),
|
||||
);
|
||||
|
||||
final Process secondBuild = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['run', '--debug', '-d', device.deviceId, '--no-resident'],
|
||||
environment: null,
|
||||
);
|
||||
exitCode = await secondBuild.exitCode;
|
||||
if (exitCode != 0) {
|
||||
failed = true;
|
||||
return;
|
||||
}
|
||||
stopwatch.stop();
|
||||
allResults['time_to_development'] = initialBuildMilliseconds.toDouble();
|
||||
allResults['time_to_development_incremental'] =
|
||||
stopwatch.elapsedMilliseconds.toDouble();
|
||||
});
|
||||
});
|
||||
if (failed) {
|
||||
return TaskResult.failure('Failed to build debug app');
|
||||
}
|
||||
|
||||
return TaskResult.success(allResults,
|
||||
benchmarkScoreKeys: allResults.keys.toList());
|
||||
}
|
||||
Reference in New Issue
Block a user