Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 60bd88d

Browse files
enable build test, roll engine, flag flip (#77154)
* Tool flag flip, cp of #74444 & #74513 * Roll Engine * enable build test on stable
1 parent 044f2cf commit 60bd88d

6 files changed

Lines changed: 59 additions & 84 deletions

File tree

bin/internal/engine.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
042c82b02c83c20e57a67d86a8d3b7677d983556
1+
40441def692f444660a11e20fac37af9050245ab

dev/bots/test.dart

Lines changed: 16 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -133,27 +133,6 @@ Future<void> main(List<String> args) async {
133133
print('$clock ${bold}Test successful.$reset');
134134
}
135135

136-
/// Returns whether or not Linux desktop tests should be run.
137-
///
138-
/// The branch restrictions here should stay in sync with features.dart.
139-
bool _shouldRunLinux() {
140-
return Platform.isLinux && (branchName != 'beta' && branchName != 'stable');
141-
}
142-
143-
/// Returns whether or not macOS desktop tests should be run.
144-
///
145-
/// The branch restrictions here should stay in sync with features.dart.
146-
bool _shouldRunMacOS() {
147-
return Platform.isMacOS && (branchName != 'beta' && branchName != 'stable');
148-
}
149-
150-
/// Returns whether or not Windows desktop tests should be run.
151-
///
152-
/// The branch restrictions here should stay in sync with features.dart.
153-
bool _shouldRunWindows() {
154-
return Platform.isWindows && (branchName != 'beta' && branchName != 'stable');
155-
}
156-
157136
/// Verify the Flutter Engine is the revision in
158137
/// bin/cache/internal/engine.version.
159138
Future<void> _validateEngineHash() async {
@@ -389,20 +368,19 @@ Future<void> _runBuildTests() async {
389368
// distribution of costs, but the seed is fixed so that issues are reproducible.
390369
final List<ShardRunner> tests = <ShardRunner>[
391370
for (final FileSystemEntity exampleDirectory in exampleDirectories)
392-
() => _runExampleProjectBuildTests(exampleDirectory),
393-
if (branchName != 'beta' && branchName != 'stable')
394-
...<ShardRunner>[
395-
// Web compilation tests.
396-
() => _flutterBuildDart2js(
397-
path.join('dev', 'integration_tests', 'web'),
398-
path.join('lib', 'main.dart'),
399-
),
400-
// Should not fail to compile with dart:io.
401-
() => _flutterBuildDart2js(
402-
path.join('dev', 'integration_tests', 'web_compile_tests'),
403-
path.join('lib', 'dart_io_import.dart'),
404-
),
405-
],
371+
() => _runExampleProjectBuildTests(exampleDirectory),
372+
...<ShardRunner>[
373+
// Web compilation tests.
374+
() => _flutterBuildDart2js(
375+
path.join('dev', 'integration_tests', 'web'),
376+
path.join('lib', 'main.dart'),
377+
),
378+
// Should not fail to compile with dart:io.
379+
() => _flutterBuildDart2js(
380+
path.join('dev', 'integration_tests', 'web_compile_tests'),
381+
path.join('lib', 'dart_io_import.dart'),
382+
),
383+
],
406384
]..shuffle(math.Random(0));
407385

408386
if (!await _runShardRunnerIndexOfTotalSubshard(tests)) {
@@ -436,23 +414,23 @@ Future<void> _runExampleProjectBuildTests(FileSystemEntity exampleDirectory) asy
436414
print('Example project ${path.basename(examplePath)} has no ios directory, skipping ipa');
437415
}
438416
}
439-
if (_shouldRunLinux()) {
417+
if (Platform.isLinux) {
440418
if (Directory(path.join(examplePath, 'linux')).existsSync()) {
441419
await _flutterBuildLinux(examplePath, release: false, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
442420
await _flutterBuildLinux(examplePath, release: true, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
443421
} else {
444422
print('Example project ${path.basename(examplePath)} has no linux directory, skipping Linux');
445423
}
446424
}
447-
if (_shouldRunMacOS()) {
425+
if (Platform.isMacOS) {
448426
if (Directory(path.join(examplePath, 'macos')).existsSync()) {
449427
await _flutterBuildMacOS(examplePath, release: false, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
450428
await _flutterBuildMacOS(examplePath, release: true, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
451429
} else {
452430
print('Example project ${path.basename(examplePath)} has no macos directory, skipping macOS');
453431
}
454432
}
455-
if (_shouldRunWindows()) {
433+
if (Platform.isWindows) {
456434
if (Directory(path.join(examplePath, 'windows')).existsSync()) {
457435
await _flutterBuildWin32(examplePath, release: false, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
458436
await _flutterBuildWin32(examplePath, release: true, additionalArgs: additionalArgs, verifyCaching: verifyCaching);

packages/flutter_tools/lib/src/features.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,4 +452,4 @@ class FeatureChannelSetting {
452452
final bool enabledByDefault;
453453
}
454454

455-
const bool flutterNext = false;
455+
const bool flutterNext = true;

packages/flutter_tools/lib/src/isolated/resident_web_runner.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -185,14 +185,7 @@ abstract class ResidentWebRunner extends ResidentRunner {
185185
fire + globals.terminal.bolden(rawMessage),
186186
TerminalColor.red,
187187
);
188-
if (!flutterNext) {
189-
globals.printStatus(
190-
"Warning: Flutter's support for web development is not stable yet and hasn't");
191-
globals.printStatus('been thoroughly tested in production environments.');
192-
globals.printStatus('For more information see https://flutter.dev/web');
193-
globals.printStatus('');
194-
globals.printStatus(message);
195-
}
188+
globals.printStatus(message);
196189
const String quitMessage = 'To quit, press "q".';
197190
if (device.device is! WebServerDevice) {
198191
globals.printStatus('For a more detailed help message, press "h". $quitMessage');

packages/flutter_tools/test/commands.shard/hermetic/config_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,19 +186,19 @@ void main() {
186186

187187
expect(
188188
testLogger.statusText,
189-
containsIgnoringWhitespace('enable-web: true (Unavailable)'),
189+
containsIgnoringWhitespace('enable-web: true'),
190190
);
191191
expect(
192192
testLogger.statusText,
193-
containsIgnoringWhitespace('enable-linux-desktop: true (Unavailable)'),
193+
containsIgnoringWhitespace('enable-linux-desktop: true'),
194194
);
195195
expect(
196196
testLogger.statusText,
197-
containsIgnoringWhitespace('enable-windows-desktop: true (Unavailable)'),
197+
containsIgnoringWhitespace('enable-windows-desktop: true'),
198198
);
199199
expect(
200200
testLogger.statusText,
201-
containsIgnoringWhitespace('enable-macos-desktop: true (Unavailable)'),
201+
containsIgnoringWhitespace('enable-macos-desktop: true'),
202202
);
203203
verifyNoAnalytics();
204204
}, overrides: <Type, Generator>{

packages/flutter_tools/test/general.shard/features_test.dart

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -79,25 +79,28 @@ void main() {
7979
testWithoutContext('flutter web help string', () {
8080
expect(flutterWebFeature.generateHelpMessage(),
8181
'Enable or disable Flutter for web. '
82-
'This setting will take effect on the master, dev, and beta channels.');
82+
'This setting will take effect on the master, dev, beta, and stable channels.');
8383
});
8484

8585
testWithoutContext('flutter macOS desktop help string', () {
8686
expect(flutterMacOSDesktopFeature.generateHelpMessage(),
8787
'Enable or disable beta-quality support for desktop on macOS. '
88-
'This setting will take effect on the master and dev channels.');
88+
'This setting will take effect on the master, dev, beta, and stable channels. '
89+
'Newer beta versions are available on the beta channel.');
8990
});
9091

9192
testWithoutContext('flutter Linux desktop help string', () {
9293
expect(flutterLinuxDesktopFeature.generateHelpMessage(),
9394
'Enable or disable beta-quality support for desktop on Linux. '
94-
'This setting will take effect on the master and dev channels.');
95+
'This setting will take effect on the master, dev, beta, and stable channels. '
96+
'Newer beta versions are available on the beta channel.');
9597
});
9698

9799
testWithoutContext('flutter Windows desktop help string', () {
98100
expect(flutterWindowsDesktopFeature.generateHelpMessage(),
99101
'Enable or disable beta-quality support for desktop on Windows. '
100-
'This setting will take effect on the master and dev channels.');
102+
'This setting will take effect on the master, dev, beta, and stable channels. '
103+
'Newer beta versions are available on the beta channel.');
101104
});
102105

103106
testWithoutContext('help string on multiple channels', () {
@@ -176,17 +179,18 @@ void main() {
176179
expect(featureFlags.isWebEnabled, true);
177180
});
178181

179-
testWithoutContext('flutter web off by default on stable', () {
182+
testWithoutContext('flutter web on by default on stable', () {
180183
when(mockFlutterVerion.channel).thenReturn('stable');
184+
when<bool>(mockFlutterConfig.getValue(any) as bool).thenReturn(null);
181185

182-
expect(featureFlags.isWebEnabled, false);
186+
expect(featureFlags.isWebEnabled, true);
183187
});
184188

185-
testWithoutContext('flutter web not enabled with config on stable', () {
189+
testWithoutContext('flutter web enabled with config on stable', () {
186190
when(mockFlutterVerion.channel).thenReturn('stable');
187191
when<bool>(mockFlutterConfig.getValue('enable-web') as bool).thenReturn(true);
188192

189-
expect(featureFlags.isWebEnabled, false);
193+
expect(featureFlags.isWebEnabled, true);
190194
});
191195

192196
testWithoutContext('flutter web not enabled with environment variable on stable', () {
@@ -244,18 +248,18 @@ void main() {
244248
expect(featureFlags.isMacOSEnabled, false);
245249
});
246250

247-
testWithoutContext('flutter macos desktop not enabled with config on beta', () {
251+
testWithoutContext('flutter macos desktop enabled with config on beta', () {
248252
when(mockFlutterVerion.channel).thenReturn('beta');
249253
when<bool>(mockFlutterConfig.getValue('enable-macos-desktop') as bool).thenReturn(true);
250254

251-
expect(featureFlags.isMacOSEnabled, false);
255+
expect(featureFlags.isMacOSEnabled, true);
252256
});
253257

254-
testWithoutContext('flutter macos desktop not enabled with environment variable on beta', () {
258+
testWithoutContext('flutter macos desktop enabled with environment variable on beta', () {
255259
when(mockFlutterVerion.channel).thenReturn('beta');
256260
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_MACOS': 'true'});
257261

258-
expect(featureFlags.isMacOSEnabled, false);
262+
expect(featureFlags.isMacOSEnabled, true);
259263
});
260264

261265
testWithoutContext('flutter macos desktop off by default on stable', () {
@@ -264,18 +268,18 @@ void main() {
264268
expect(featureFlags.isMacOSEnabled, false);
265269
});
266270

267-
testWithoutContext('flutter macos desktop not enabled with config on stable', () {
271+
testWithoutContext('flutter macos desktop enabled with config on stable', () {
268272
when(mockFlutterVerion.channel).thenReturn('stable');
269273
when<bool>(mockFlutterConfig.getValue('enable-macos-desktop') as bool).thenReturn(true);
270274

271-
expect(featureFlags.isMacOSEnabled, false);
275+
expect(featureFlags.isMacOSEnabled, true);
272276
});
273277

274-
testWithoutContext('flutter macos desktop not enabled with environment variable on stable', () {
278+
testWithoutContext('flutter macos desktop enabled with environment variable on stable', () {
275279
when(mockFlutterVerion.channel).thenReturn('stable');
276280
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_MACOS': 'true'});
277281

278-
expect(featureFlags.isMacOSEnabled, false);
282+
expect(featureFlags.isMacOSEnabled, true);
279283
});
280284

281285
/// Flutter Linux Desktop
@@ -325,18 +329,18 @@ void main() {
325329
expect(featureFlags.isLinuxEnabled, false);
326330
});
327331

328-
testWithoutContext('flutter linux desktop not enabled with config on beta', () {
332+
testWithoutContext('flutter linux desktop enabled with config on beta', () {
329333
when(mockFlutterVerion.channel).thenReturn('beta');
330334
when<bool>(mockFlutterConfig.getValue('enable-linux-desktop') as bool).thenReturn(true);
331335

332-
expect(featureFlags.isLinuxEnabled, false);
336+
expect(featureFlags.isLinuxEnabled, true);
333337
});
334338

335-
testWithoutContext('flutter linux desktop not enabled with environment variable on beta', () {
339+
testWithoutContext('flutter linux desktop enabled with environment variable on beta', () {
336340
when(mockFlutterVerion.channel).thenReturn('beta');
337341
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_LINUX': 'true'});
338342

339-
expect(featureFlags.isLinuxEnabled, false);
343+
expect(featureFlags.isLinuxEnabled, true);
340344
});
341345

342346
testWithoutContext('flutter linux desktop off by default on stable', () {
@@ -345,18 +349,18 @@ void main() {
345349
expect(featureFlags.isLinuxEnabled, false);
346350
});
347351

348-
testWithoutContext('flutter linux desktop not enabled with config on stable', () {
352+
testWithoutContext('flutter linux desktop enabled with config on stable', () {
349353
when(mockFlutterVerion.channel).thenReturn('stable');
350354
when<bool>(mockFlutterConfig.getValue('enable-linux-desktop') as bool).thenReturn(true);
351355

352-
expect(featureFlags.isLinuxEnabled, false);
356+
expect(featureFlags.isLinuxEnabled, true);
353357
});
354358

355-
testWithoutContext('flutter linux desktop not enabled with environment variable on stable', () {
359+
testWithoutContext('flutter linux desktop enabled with environment variable on stable', () {
356360
when(mockFlutterVerion.channel).thenReturn('stable');
357361
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_LINUX': 'true'});
358362

359-
expect(featureFlags.isLinuxEnabled, false);
363+
expect(featureFlags.isLinuxEnabled, true);
360364
});
361365

362366
/// Flutter Windows desktop.
@@ -406,18 +410,18 @@ void main() {
406410
expect(featureFlags.isWindowsEnabled, false);
407411
});
408412

409-
testWithoutContext('flutter windows desktop not enabled with config on beta', () {
413+
testWithoutContext('flutter windows desktop enabled with config on beta', () {
410414
when(mockFlutterVerion.channel).thenReturn('beta');
411415
when<bool>(mockFlutterConfig.getValue('enable-windows-desktop') as bool).thenReturn(true);
412416

413-
expect(featureFlags.isWindowsEnabled, false);
417+
expect(featureFlags.isWindowsEnabled, true);
414418
});
415419

416-
testWithoutContext('flutter windows desktop not enabled with environment variable on beta', () {
420+
testWithoutContext('flutter windows desktop enabled with environment variable on beta', () {
417421
when(mockFlutterVerion.channel).thenReturn('beta');
418422
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_WINDOWS': 'true'});
419423

420-
expect(featureFlags.isWindowsEnabled, false);
424+
expect(featureFlags.isWindowsEnabled, true);
421425
});
422426

423427
testWithoutContext('flutter windows desktop off by default on stable', () {
@@ -426,18 +430,18 @@ void main() {
426430
expect(featureFlags.isWindowsEnabled, false);
427431
});
428432

429-
testWithoutContext('flutter windows desktop not enabled with config on stable', () {
433+
testWithoutContext('flutter windows desktop enabled with config on stable', () {
430434
when(mockFlutterVerion.channel).thenReturn('stable');
431435
when<bool>(mockFlutterConfig.getValue('enable-windows-desktop') as bool).thenReturn(true);
432436

433-
expect(featureFlags.isWindowsEnabled, false);
437+
expect(featureFlags.isWindowsEnabled, true);
434438
});
435439

436-
testWithoutContext('flutter windows desktop not enabled with environment variable on stable', () {
440+
testWithoutContext('flutter windows desktop enabled with environment variable on stable', () {
437441
when(mockFlutterVerion.channel).thenReturn('stable');
438442
when(mockPlatform.environment).thenReturn(<String, String>{'FLUTTER_WINDOWS': 'true'});
439443

440-
expect(featureFlags.isWindowsEnabled, false);
444+
expect(featureFlags.isWindowsEnabled, true);
441445
});
442446
});
443447
}

0 commit comments

Comments
 (0)