mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Turn on desktop and web integration tests for beta and stable (#76433)
This commit is contained in:
parent
47ac4ce5ad
commit
90c66f5db3
@ -120,27 +120,6 @@ Future<void> main(List<String> args) async {
|
||||
print('$clock ${bold}Test successful.$reset');
|
||||
}
|
||||
|
||||
/// Returns whether or not Linux desktop tests should be run.
|
||||
///
|
||||
/// The branch restrictions here should stay in sync with features.dart.
|
||||
bool _shouldRunLinux() {
|
||||
return Platform.isLinux && (branchName != 'beta' && branchName != 'stable');
|
||||
}
|
||||
|
||||
/// Returns whether or not macOS desktop tests should be run.
|
||||
///
|
||||
/// The branch restrictions here should stay in sync with features.dart.
|
||||
bool _shouldRunMacOS() {
|
||||
return Platform.isMacOS && (branchName != 'beta' && branchName != 'stable');
|
||||
}
|
||||
|
||||
/// Returns whether or not Windows desktop tests should be run.
|
||||
///
|
||||
/// The branch restrictions here should stay in sync with features.dart.
|
||||
bool _shouldRunWindows() {
|
||||
return Platform.isWindows && (branchName != 'beta' && branchName != 'stable');
|
||||
}
|
||||
|
||||
/// Verify the Flutter Engine is the revision in
|
||||
/// bin/cache/internal/engine.version.
|
||||
Future<void> _validateEngineHash() async {
|
||||
@ -358,20 +337,19 @@ Future<void> _runBuildTests() async {
|
||||
// distribution of costs, but the seed is fixed so that issues are reproducible.
|
||||
final List<ShardRunner> tests = <ShardRunner>[
|
||||
for (final FileSystemEntity exampleDirectory in exampleDirectories)
|
||||
() => _runExampleProjectBuildTests(exampleDirectory),
|
||||
if (branchName != 'beta' && branchName != 'stable')
|
||||
...<ShardRunner>[
|
||||
// Web compilation tests.
|
||||
() => _flutterBuildDart2js(
|
||||
path.join('dev', 'integration_tests', 'web'),
|
||||
path.join('lib', 'main.dart'),
|
||||
),
|
||||
// Should not fail to compile with dart:io.
|
||||
() => _flutterBuildDart2js(
|
||||
path.join('dev', 'integration_tests', 'web_compile_tests'),
|
||||
path.join('lib', 'dart_io_import.dart'),
|
||||
),
|
||||
],
|
||||
() => _runExampleProjectBuildTests(exampleDirectory),
|
||||
...<ShardRunner>[
|
||||
// Web compilation tests.
|
||||
() => _flutterBuildDart2js(
|
||||
path.join('dev', 'integration_tests', 'web'),
|
||||
path.join('lib', 'main.dart'),
|
||||
),
|
||||
// Should not fail to compile with dart:io.
|
||||
() => _flutterBuildDart2js(
|
||||
path.join('dev', 'integration_tests', 'web_compile_tests'),
|
||||
path.join('lib', 'dart_io_import.dart'),
|
||||
),
|
||||
],
|
||||
]..shuffle(math.Random(0));
|
||||
|
||||
await _runShardRunnerIndexOfTotalSubshard(tests);
|
||||
@ -402,7 +380,7 @@ Future<void> _runExampleProjectBuildTests(FileSystemEntity exampleDirectory) asy
|
||||
print('Example project ${path.basename(examplePath)} has no ios directory, skipping ipa');
|
||||
}
|
||||
}
|
||||
if (_shouldRunLinux()) {
|
||||
if (Platform.isLinux) {
|
||||
if (Directory(path.join(examplePath, 'linux')).existsSync()) {
|
||||
await _flutterBuildLinux(examplePath, release: false, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
|
||||
await _flutterBuildLinux(examplePath, release: true, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
|
||||
@ -410,7 +388,7 @@ Future<void> _runExampleProjectBuildTests(FileSystemEntity exampleDirectory) asy
|
||||
print('Example project ${path.basename(examplePath)} has no linux directory, skipping Linux');
|
||||
}
|
||||
}
|
||||
if (_shouldRunMacOS()) {
|
||||
if (Platform.isMacOS) {
|
||||
if (Directory(path.join(examplePath, 'macos')).existsSync()) {
|
||||
await _flutterBuildMacOS(examplePath, release: false, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
|
||||
await _flutterBuildMacOS(examplePath, release: true, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
|
||||
@ -418,7 +396,7 @@ Future<void> _runExampleProjectBuildTests(FileSystemEntity exampleDirectory) asy
|
||||
print('Example project ${path.basename(examplePath)} has no macos directory, skipping macOS');
|
||||
}
|
||||
}
|
||||
if (_shouldRunWindows()) {
|
||||
if (Platform.isWindows) {
|
||||
if (Directory(path.join(examplePath, 'windows')).existsSync()) {
|
||||
await _flutterBuildWin32(examplePath, release: false, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
|
||||
await _flutterBuildWin32(examplePath, release: true, additionalArgs: additionalArgs, verifyCaching: verifyCaching);
|
||||
|
Loading…
Reference in New Issue
Block a user