diff --git a/scripts/customer_testing.dart b/scripts/customer_testing.dart index 38ffd6d7f31..1e377a68236 100644 --- a/scripts/customer_testing.dart +++ b/scripts/customer_testing.dart @@ -6,31 +6,47 @@ import 'dart:io'; -Future main() async { - await _run('flutter', ['analyze', '--no-fatal-infos']); - - // Golden and rendering tests are platform-sensitive, so the full per-package - // test suites only run on Linux, where the golden files are generated. - if (!Platform.isLinux) { - return; - } +// flame_3d builds on the experimental flutter_gpu library, whose API changes +// frequently in flutter/flutter's presubmit. Analyzing it here would block +// framework changes on an unstable dependency that is not representative of +// Flame, so it is excluded from this run. +const _excludedPackages = {'flame_3d'}; +Future main() async { final packages = Directory('packages') .listSync() .whereType() .where( - (directory) => Directory('${directory.path}/test').existsSync(), + (directory) => !_excludedPackages.contains(_packageName(directory)), ) .toList() ..sort((a, b) => a.path.compareTo(b.path)); - for (final package in packages) { + await _run('flutter', [ + 'analyze', + '--no-fatal-infos', + 'doc', + ...packages.map((directory) => directory.path), + ]); + + // Golden and rendering tests are platform-sensitive, so the full per-package + // test suites only run on Linux, where the golden files are generated. + if (!Platform.isLinux) { + return; + } + + for (final package in packages.where( + (directory) => Directory('${directory.path}/test').existsSync(), + )) { stdout.writeln('Running tests in ${package.path}'); await _run('flutter', ['test'], workingDirectory: package.path); } } +String _packageName(Directory directory) => + directory.path.split(Platform.pathSeparator).last; + Future _run( String executable, List arguments, {