[devicelab] migrate new gallery benchmarks to local copy. (#143545)
This is the next step in archiving flutter/gallery - move devicelab tests to use the local copy.
This commit is contained in:
@@ -9,8 +9,6 @@ import 'dart:io';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/versions/gallery.dart' show galleryVersion;
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
await task(const NewGalleryChromeRunTest().run);
|
||||
@@ -34,14 +32,13 @@ class NewGalleryChromeRunTest {
|
||||
|
||||
/// Runs the test.
|
||||
Future<TaskResult> run() async {
|
||||
final Directory galleryParentDir =
|
||||
Directory.systemTemp.createTempSync('flutter_gallery_v2_chrome_run.');
|
||||
final Directory galleryDir =
|
||||
Directory(path.join(galleryParentDir.path, 'gallery'));
|
||||
|
||||
await getNewGallery(galleryVersion, galleryDir);
|
||||
|
||||
final TaskResult result = await inDirectory<TaskResult>(galleryDir, () async {
|
||||
final TaskResult result = await inDirectory<TaskResult>('${flutterDirectory.path}/dev/integration_tests/new_gallery/', () async {
|
||||
await flutter('create', options: <String>[
|
||||
'--platforms',
|
||||
'web,android,ios',
|
||||
'--no-overwrite',
|
||||
'.'
|
||||
]);
|
||||
await flutter('doctor');
|
||||
await flutter('packages', options: <String>['get']);
|
||||
|
||||
@@ -105,8 +102,6 @@ class NewGalleryChromeRunTest {
|
||||
}
|
||||
});
|
||||
|
||||
rmTree(galleryParentDir);
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
// 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/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/task_result.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/perf_tests.dart' show WebCompileTest;
|
||||
import 'package:flutter_devicelab/versions/gallery.dart' show galleryVersion;
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
await task(const NewGalleryWebCompileTest().run);
|
||||
@@ -24,28 +20,26 @@ class NewGalleryWebCompileTest {
|
||||
|
||||
/// Runs the test.
|
||||
Future<TaskResult> run() async {
|
||||
final Directory galleryParentDir =
|
||||
Directory.systemTemp.createTempSync('flutter_gallery_v2_web_compile.');
|
||||
final Directory galleryDir =
|
||||
Directory(path.join(galleryParentDir.path, 'gallery'));
|
||||
|
||||
await getNewGallery(galleryVersion, galleryDir);
|
||||
|
||||
final Map<String, Object> metrics = await inDirectory<Map<String, int>>(
|
||||
galleryDir,
|
||||
'${flutterDirectory.path}/dev/integration_tests/new_gallery/',
|
||||
() async {
|
||||
await flutter('doctor');
|
||||
|
||||
await flutter('create', options: <String>[
|
||||
'--platforms',
|
||||
'web,android,ios',
|
||||
'--no-overwrite',
|
||||
'.'
|
||||
]);
|
||||
|
||||
return WebCompileTest.runSingleBuildTest(
|
||||
directory: galleryDir.path,
|
||||
directory: '${flutterDirectory.path}/dev/integration_tests/new_gallery/',
|
||||
metric: metricKeyPrefix,
|
||||
measureBuildTime: true,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
rmTree(galleryParentDir);
|
||||
|
||||
return TaskResult.success(metrics, benchmarkScoreKeys: metrics.keys.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,31 +2,17 @@
|
||||
// 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/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/new_gallery.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
|
||||
final Directory galleryParentDir =
|
||||
Directory.systemTemp.createTempSync('flutter_new_gallery_test.');
|
||||
final Directory galleryDir =
|
||||
Directory(path.join(galleryParentDir.path, 'gallery'));
|
||||
|
||||
try {
|
||||
await task(
|
||||
NewGalleryPerfTest(
|
||||
galleryDir,
|
||||
timelineFileName: 'transitions-crane',
|
||||
dartDefine: 'onlyCrane=true',
|
||||
).run,
|
||||
);
|
||||
} finally {
|
||||
rmTree(galleryParentDir);
|
||||
}
|
||||
await task(
|
||||
NewGalleryPerfTest(
|
||||
timelineFileName: 'transitions-crane',
|
||||
dartDefine: 'onlyCrane=true',
|
||||
).run,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,30 +2,18 @@
|
||||
// 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/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/new_gallery.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
|
||||
final Directory galleryParentDir = Directory.systemTemp.createTempSync('flutter_new_gallery_test.');
|
||||
final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery'));
|
||||
|
||||
try {
|
||||
await task(
|
||||
NewGalleryPerfTest(
|
||||
galleryDir,
|
||||
// time out after 20 minutes allowing the tool to take a screenshot to debug
|
||||
// https://github.com/flutter/flutter/issues/114025.
|
||||
timeoutSeconds: 20 * 60,
|
||||
).run,
|
||||
);
|
||||
} finally {
|
||||
rmTree(galleryParentDir);
|
||||
}
|
||||
await task(
|
||||
NewGalleryPerfTest(
|
||||
// time out after 20 minutes allowing the tool to take a screenshot to debug
|
||||
// https://github.com/flutter/flutter/issues/114025.
|
||||
timeoutSeconds: 20 * 60,
|
||||
).run,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -2,23 +2,12 @@
|
||||
// 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/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/new_gallery.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
|
||||
final Directory galleryParentDir = Directory.systemTemp.createTempSync('flutter_new_gallery_test.');
|
||||
final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery'));
|
||||
|
||||
try {
|
||||
await task(NewGalleryPerfTest(galleryDir, enableImpeller: true).run);
|
||||
} finally {
|
||||
rmTree(galleryParentDir);
|
||||
}
|
||||
await task(NewGalleryPerfTest(enableImpeller: true).run);
|
||||
}
|
||||
|
||||
@@ -2,23 +2,12 @@
|
||||
// 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/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/new_gallery.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
|
||||
final Directory galleryParentDir = Directory.systemTemp.createTempSync('flutter_new_gallery_test.');
|
||||
final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery'));
|
||||
|
||||
try {
|
||||
await task(NewGalleryPerfTest(galleryDir, enableImpeller: true, dartDefine: 'flutter.benchmarks.force_disable_snapshot=true').run);
|
||||
} finally {
|
||||
rmTree(galleryParentDir);
|
||||
}
|
||||
await task(NewGalleryPerfTest(enableImpeller: true, dartDefine: 'flutter.benchmarks.force_disable_snapshot=true').run);
|
||||
}
|
||||
|
||||
@@ -2,23 +2,12 @@
|
||||
// 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/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/new_gallery.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||
|
||||
final Directory galleryParentDir = Directory.systemTemp.createTempSync('flutter_new_gallery_test.');
|
||||
final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery'));
|
||||
|
||||
try {
|
||||
await task(NewGalleryPerfTest(galleryDir).run);
|
||||
} finally {
|
||||
rmTree(galleryParentDir);
|
||||
}
|
||||
await task(NewGalleryPerfTest().run);
|
||||
}
|
||||
|
||||
@@ -2,23 +2,12 @@
|
||||
// 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/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/new_gallery.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.android;
|
||||
|
||||
final Directory galleryParentDir = Directory.systemTemp.createTempSync('flutter_new_gallery_test.');
|
||||
final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery'));
|
||||
|
||||
try {
|
||||
await task(NewGalleryPerfTest(galleryDir, enableImpeller: true, forceOpenGLES: true).run);
|
||||
} finally {
|
||||
rmTree(galleryParentDir);
|
||||
}
|
||||
await task(NewGalleryPerfTest(enableImpeller: true, forceOpenGLES: true).run);
|
||||
}
|
||||
|
||||
@@ -2,23 +2,12 @@
|
||||
// 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/devices.dart';
|
||||
import 'package:flutter_devicelab/framework/framework.dart';
|
||||
import 'package:flutter_devicelab/framework/utils.dart';
|
||||
import 'package:flutter_devicelab/tasks/new_gallery.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
Future<void> main() async {
|
||||
deviceOperatingSystem = DeviceOperatingSystem.ios;
|
||||
|
||||
final Directory galleryParentDir = Directory.systemTemp.createTempSync('flutter_new_gallery_test.');
|
||||
final Directory galleryDir = Directory(path.join(galleryParentDir.path, 'gallery'));
|
||||
|
||||
try {
|
||||
await task(NewGalleryPerfTest(galleryDir, enableImpeller: false).run);
|
||||
} finally {
|
||||
rmTree(galleryParentDir);
|
||||
}
|
||||
await task(NewGalleryPerfTest(enableImpeller: false).run);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user