diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 74d048f6d79..d306d7e03b1 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -120,27 +120,6 @@ Future main(List 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 _validateEngineHash() async { @@ -358,20 +337,19 @@ Future _runBuildTests() async { // distribution of costs, but the seed is fixed so that issues are reproducible. final List tests = [ for (final FileSystemEntity exampleDirectory in exampleDirectories) - () => _runExampleProjectBuildTests(exampleDirectory), - if (branchName != 'beta' && branchName != 'stable') - ...[ - // 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), + ...[ + // 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 _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 _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 _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);