Start using bin/cache/engine.{stamp|realm} instead of bin/internal/engine.{realm|version}. (#164352)

Towards https://github.com/flutter/flutter/issues/164315.

See also:
https://github.com/flutter/flutter/blob/master/docs/tool/Engine-artifacts.md.

There are more usages in `flutter/flutter`, but some will require more
specialized review (i.e. from release folks, or the Dart SDK team), so
I'll split those off.

~~Requires https://github.com/flutter/flutter/pull/164317 to merge
first.~~ 
This commit is contained in:
Matan Lurey
2025-03-01 16:54:33 -08:00
committed by GitHub
parent 0c055f2c50
commit 71d50a1616
16 changed files with 60 additions and 39 deletions

View File

@@ -133,8 +133,7 @@ Future<void> testHarnessTestsRunner() async {
}
}
/// Verify the Flutter Engine is the revision in
/// bin/cache/internal/engine.version.
/// Verify the Flutter Engine is the revision in `bin/cache/engine.stamp`.
Future<void> _validateEngineHash() async {
final String flutterTester = path.join(
flutterRoot,
@@ -146,6 +145,7 @@ Future<void> _validateEngineHash() async {
'flutter_tester$exe',
);
// TODO(matanlurey): Revisit with the Dart team if this is true now that they use FLUTTER_PREBUILT_ENGINE_VERSION=...
if (runningInDartHHHBot) {
// The Dart HHH bots intentionally modify the local artifact cache
// and then use this script to run Flutter's test suites.

View File

@@ -91,8 +91,8 @@ class WebTestsSuite {
/// Coarse-grained integration tests running on the Web.
Future<void> webLongRunningTestsRunner() async {
final String engineVersionFile = path.join(flutterRoot, 'bin', 'internal', 'engine.version');
final String engineRealmFile = path.join(flutterRoot, 'bin', 'internal', 'engine.realm');
final String engineVersionFile = path.join(flutterRoot, 'bin', 'cache', 'engine.stamp');
final String engineRealmFile = path.join(flutterRoot, 'bin', 'cache', 'engine.realm');
final String engineVersion = File(engineVersionFile).readAsStringSync().trim();
final String engineRealm = File(engineRealmFile).readAsStringSync().trim();
if (engineRealm.isNotEmpty) {

View File

@@ -61,7 +61,7 @@ final String flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(P
final String flutter = path.join(flutterRoot, 'bin', 'flutter$bat');
final String dart = path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', 'dart$exe');
final String pubCache = path.join(flutterRoot, '.pub-cache');
final String engineVersionFile = path.join(flutterRoot, 'bin', 'internal', 'engine.version');
final String engineVersionFile = path.join(flutterRoot, 'bin', 'cache', 'engine.stamp');
final String luciBotId = Platform.environment['SWARMING_BOT_ID'] ?? '';
final bool runningInDartHHHBot =
luciBotId.startsWith('luci-dart-') || luciBotId.startsWith('dart-tests-');