From 616f9bcffabecafe861afb1e3de942052946d3b5 Mon Sep 17 00:00:00 2001 From: Kate Lovett Date: Mon, 30 Aug 2021 17:41:02 -0500 Subject: [PATCH] Add tag support for executing reduced test sets (#86821) --- dev/bots/analyze.dart | 70 +++++++++++++++++++ dev/bots/test.dart | 8 +++ .../root/packages/foo/golden_class.dart | 9 +++ .../root/packages/foo/golden_doc.dart | 42 +++++++++++ .../root/packages/foo/golden_ignore.dart | 16 +++++ .../root/packages/foo/golden_missing_tag.dart | 14 ++++ .../root/packages/foo/golden_no_tag.dart | 11 +++ dev/bots/test/analyze_test.dart | 45 ++++++++++++ packages/flutter/dart_test.yaml | 3 + .../test/animation/animation_sheet_test.dart | 4 ++ .../test/animation/live_binding_test.dart | 4 ++ .../cupertino/activity_indicator_test.dart | 4 ++ .../test/cupertino/date_picker_test.dart | 14 ++-- .../flutter/test/cupertino/dialog_test.dart | 4 ++ .../flutter/test/cupertino/nav_bar_test.dart | 4 ++ .../cupertino/segmented_control_test.dart | 4 ++ .../flutter/test/cupertino/switch_test.dart | 4 ++ .../test/cupertino/text_field_test.dart | 14 ++-- .../test/cupertino/text_selection_test.dart | 4 ++ .../test/material/bottom_app_bar_test.dart | 4 ++ .../material/bottom_app_bar_theme_test.dart | 4 ++ .../material/bottom_navigation_bar_test.dart | 4 ++ .../test/material/card_theme_test.dart | 4 ++ .../test/material/circle_avatar_test.dart | 4 ++ .../test/material/dialog_theme_test.dart | 4 ++ .../flutter/test/material/dropdown_test.dart | 14 ++-- .../flexible_space_bar_stretch_mode_test.dart | 4 ++ .../material/floating_action_button_test.dart | 4 ++ .../test/material/flutter_logo_test.dart | 4 ++ .../flutter/test/material/icons_test.dart | 4 ++ .../test/material/input_decorator_test.dart | 4 ++ .../flutter/test/material/material_test.dart | 4 ++ .../material/progress_indicator_test.dart | 14 ++-- .../flutter/test/material/radio_test.dart | 4 ++ .../test/material/reorderable_list_test.dart | 4 ++ .../flutter/test/material/snack_bar_test.dart | 4 ++ .../flutter/test/material/switch_test.dart | 4 ++ .../test/material/tab_bar_theme_test.dart | 4 ++ .../test/material/text_field_test.dart | 14 ++-- .../test/material/text_selection_test.dart | 4 ++ .../test/material/toggle_buttons_test.dart | 4 ++ .../test/painting/box_painter_test.dart | 4 ++ .../continuous_rectangle_border_test.dart | 4 ++ .../test/painting/flutter_logo_test.dart | 4 ++ .../flutter/test/painting/gradient_test.dart | 4 ++ .../test/rendering/localized_fonts_test.dart | 4 ++ .../test/widgets/backdrop_filter_test.dart | 4 ++ packages/flutter/test/widgets/basic_test.dart | 4 ++ packages/flutter/test/widgets/clip_test.dart | 14 ++-- .../test/widgets/color_filter_test.dart | 4 ++ .../flutter/test/widgets/container_test.dart | 4 ++ .../widgets/editable_text_cursor_test.dart | 4 ++ .../widgets/image_filter_quality_test.dart | 4 ++ .../test/widgets/image_filter_test.dart | 4 ++ packages/flutter/test/widgets/image_test.dart | 4 ++ .../test/widgets/invert_colors_test.dart | 4 ++ .../widgets/list_wheel_scroll_view_test.dart | 4 ++ .../flutter/test/widgets/opacity_test.dart | 4 ++ .../overscroll_stretch_indicator_test.dart | 4 ++ .../test/widgets/page_route_builder_test.dart | 4 ++ .../test/widgets/physical_model_test.dart | 4 ++ .../test/widgets/selectable_text_test.dart | 4 ++ .../test/widgets/shader_mask_test.dart | 4 ++ .../flutter/test/widgets/shadow_test.dart | 4 ++ .../test/widgets/text_golden_test.dart | 4 ++ .../flutter/test/widgets/transform_test.dart | 4 ++ .../test/widgets/widget_inspector_test.dart | 24 ++++--- packages/flutter_test/lib/src/matchers.dart | 3 +- packages/flutter_test/test/matchers_test.dart | 2 + .../flutter_tools/lib/src/commands/test.dart | 2 +- 70 files changed, 495 insertions(+), 42 deletions(-) create mode 100644 dev/bots/test/analyze-test-input/root/packages/foo/golden_class.dart create mode 100644 dev/bots/test/analyze-test-input/root/packages/foo/golden_doc.dart create mode 100644 dev/bots/test/analyze-test-input/root/packages/foo/golden_ignore.dart create mode 100644 dev/bots/test/analyze-test-input/root/packages/foo/golden_missing_tag.dart create mode 100644 dev/bots/test/analyze-test-input/root/packages/foo/golden_no_tag.dart diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart index 2876b8cca28..8cfaeec34ef 100644 --- a/dev/bots/analyze.dart +++ b/dev/bots/analyze.dart @@ -23,6 +23,7 @@ import 'utils.dart'; final String flutterRoot = path.dirname(path.dirname(path.dirname(path.fromUri(Platform.script)))); final String flutter = path.join(flutterRoot, 'bin', Platform.isWindows ? 'flutter.bat' : 'flutter'); +final String flutterPackages = path.join(flutterRoot, 'packages'); final String dart = path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', Platform.isWindows ? 'dart.exe' : 'dart'); final String pub = path.join(flutterRoot, 'bin', 'cache', 'dart-sdk', 'bin', Platform.isWindows ? 'pub.bat' : 'pub'); final String pubCache = path.join(flutterRoot, '.pub-cache'); @@ -65,6 +66,9 @@ Future run(List arguments) async { print('$clock Deprecations...'); await verifyDeprecations(flutterRoot); + print('$clock Goldens...'); + await verifyGoldenTags(flutterPackages); + print('$clock Skip test comments...'); await verifySkipTestComments(flutterRoot); @@ -146,6 +150,72 @@ Future run(List arguments) async { // TESTS +final RegExp _findGoldenTestPattern = RegExp(r'matchesGoldenFile\('); +final RegExp _findGoldenDefinitionPattern = RegExp(r'matchesGoldenFile\(Object'); +final RegExp _leadingComment = RegExp(r'\/\/'); +final RegExp _goldenTagPattern1 = RegExp(r'@Tags\('); +final RegExp _goldenTagPattern2 = RegExp(r"'reduced-test-set'"); + +/// Only golden file tests in the flutter package are subject to reduced testing, +/// for example, invocations in flutter_test to validate comparator +/// functionality do not require tagging. +const String _ignoreGoldenTag = '// flutter_ignore: golden_tag (see analyze.dart)'; +const String _ignoreGoldenTagForFile = '// flutter_ignore_for_file: golden_tag (see analyze.dart)'; + +Future verifyGoldenTags(String workingDirectory, { int minimumMatches = 2000 }) async { + final List errors = []; + await for (final File file in _allFiles(workingDirectory, 'dart', minimumMatches: minimumMatches)) { + bool needsTag = false; + bool hasTagNotation = false; + bool hasReducedTag = false; + bool ignoreForFile = false; + final List lines = file.readAsLinesSync(); + for (final String line in lines) { + if (line.contains(_goldenTagPattern1)) { + hasTagNotation = true; + } + if (line.contains(_goldenTagPattern2)) { + hasReducedTag = true; + } + if (line.contains(_findGoldenTestPattern) + && !line.contains(_findGoldenDefinitionPattern) + && !line.contains(_leadingComment) + && !line.contains(_ignoreGoldenTag)) { + needsTag = true; + } + if (line.contains(_ignoreGoldenTagForFile)) { + ignoreForFile = true; + } + // If the file is being ignored or a reduced test tag is already accounted + // for, skip parsing the rest of the lines for golden file tests. + if (ignoreForFile || (hasTagNotation && hasReducedTag)) { + break; + } + } + // If a reduced test tag is already accounted for, move on to the next file. + if (ignoreForFile || (hasTagNotation && hasReducedTag)) { + continue; + } + // If there are golden file tests, ensure they are tagged for all reduced + // test environments. + if (needsTag) { + if (!hasTagNotation) { + errors.add('${file.path}: Files containing golden tests must be tagged using ' + '`@Tags(...)` at the top of the file before import statements.'); + } else if (!hasReducedTag) { + errors.add('${file.path}: Files containing golden tests must be tagged with ' + "'reduced-test-set'."); + } + } + } + if (errors.isNotEmpty) { + exitWithError([ + ...errors, + '${bold}See: https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter$reset', + ]); + } +} + final RegExp _findDeprecationPattern = RegExp(r'@[Dd]eprecated'); final RegExp _deprecationPattern1 = RegExp(r'^( *)@Deprecated\($'); // flutter_ignore: deprecation_syntax (see analyze.dart) final RegExp _deprecationPattern2 = RegExp(r"^ *'(.+) '$"); diff --git a/dev/bots/test.dart b/dev/bots/test.dart index 9f21a2d3970..30a2177b259 100644 --- a/dev/bots/test.dart +++ b/dev/bots/test.dart @@ -1565,10 +1565,18 @@ Future _runFlutterTest(String workingDirectory, { }) async { assert(!printOutput || outputChecker == null, 'Output either can be printed or checked but not both'); + final List tags = []; + // Recipe configured reduced test shards will only execute tests with the + // appropriate tag. + if ((Platform.environment['REDUCED_TEST_SET'] ?? 'False') == 'True') { + tags.addAll(['-t', 'reduced-test-set']); + } + final List args = [ 'test', if (shuffleTests) '--test-randomize-ordering-seed=$shuffleSeed', ...options, + ...tags, ...flutterTestArgs, ]; diff --git a/dev/bots/test/analyze-test-input/root/packages/foo/golden_class.dart b/dev/bots/test/analyze-test-input/root/packages/foo/golden_class.dart new file mode 100644 index 00000000000..6d5b7630543 --- /dev/null +++ b/dev/bots/test/analyze-test-input/root/packages/foo/golden_class.dart @@ -0,0 +1,9 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/// Mack class definition for testing. +/// Should not be tag-enforced, no analysis failures should be found. +void matchesGoldenFile(Object key) { + return; +} diff --git a/dev/bots/test/analyze-test-input/root/packages/foo/golden_doc.dart b/dev/bots/test/analyze-test-input/root/packages/foo/golden_doc.dart new file mode 100644 index 00000000000..f6a365b457e --- /dev/null +++ b/dev/bots/test/analyze-test-input/root/packages/foo/golden_doc.dart @@ -0,0 +1,42 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +/// Sample Code +/// +/// Should not be tag-enforced, no analysis failures should be found. +/// +/// {@tool snippet} +/// Sample invocations of [matchesGoldenFile]. +/// +/// ```dart +/// await expectLater( +/// find.text('Save'), +/// matchesGoldenFile('save.png'), +/// ); +/// +/// await expectLater( +/// image, +/// matchesGoldenFile('save.png'), +/// ); +/// +/// await expectLater( +/// imageFuture, +/// matchesGoldenFile( +/// 'save.png', +/// version: 2, +/// ), +/// ); +/// +/// await expectLater( +/// find.byType(MyWidget), +/// matchesGoldenFile('goldens/myWidget.png'), +/// ); +/// ``` +/// {@end-tool} +/// + +// Other comments +// matchesGoldenFile('comment.png'); + +String literal = 'matchesGoldenFile()'; // flutter_ignore: golden_tag (see analyze.dart) diff --git a/dev/bots/test/analyze-test-input/root/packages/foo/golden_ignore.dart b/dev/bots/test/analyze-test-input/root/packages/foo/golden_ignore.dart new file mode 100644 index 00000000000..d9b179ede40 --- /dev/null +++ b/dev/bots/test/analyze-test-input/root/packages/foo/golden_ignore.dart @@ -0,0 +1,16 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// This would fail analysis, but it is ignored +// flutter_ignore_for_file: golden_tag (see analyze.dart) + +@Tags(['some-other-tag']) + +import 'package:test/test.dart'; + +import 'golden_class.dart'; + +void main() { + matchesGoldenFile('missing_tag.png'); +} diff --git a/dev/bots/test/analyze-test-input/root/packages/foo/golden_missing_tag.dart b/dev/bots/test/analyze-test-input/root/packages/foo/golden_missing_tag.dart new file mode 100644 index 00000000000..543562b6d12 --- /dev/null +++ b/dev/bots/test/analyze-test-input/root/packages/foo/golden_missing_tag.dart @@ -0,0 +1,14 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// The reduced test set tag is missing. This should fail analysis. +@Tags(['some-other-tag']) + +import 'package:test/test.dart'; + +import 'golden_class.dart'; + +void main() { + matchesGoldenFile('missing_tag.png'); +} diff --git a/dev/bots/test/analyze-test-input/root/packages/foo/golden_no_tag.dart b/dev/bots/test/analyze-test-input/root/packages/foo/golden_no_tag.dart new file mode 100644 index 00000000000..12bdc5b331c --- /dev/null +++ b/dev/bots/test/analyze-test-input/root/packages/foo/golden_no_tag.dart @@ -0,0 +1,11 @@ +// Copyright 2014 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// The tag is missing. This should fail analysis. + +import 'golden_class.dart'; + +void main() { + matchesGoldenFile('missing_tag.png'); +} diff --git a/dev/bots/test/analyze_test.dart b/dev/bots/test/analyze_test.dart index 2dc53d42cfa..54dcc22b664 100644 --- a/dev/bots/test/analyze_test.dart +++ b/dev/bots/test/analyze_test.dart @@ -73,6 +73,51 @@ void main() { ); }); + test('analyze.dart - verifyGoldenTags', () async { + final String result = await capture(() => verifyGoldenTags(testRootPath, minimumMatches: 6), exitCode: 1); + const String noTag = 'Files containing golden tests must be ' + 'tagged using `@Tags(...)` at the top of the file before import statements.'; + const String missingTag = 'Files containing golden tests must be ' + "tagged with 'reduced-test-set'."; + String lines = [ + 'test/analyze-test-input/root/packages/foo/golden_missing_tag.dart: $missingTag', + 'test/analyze-test-input/root/packages/foo/golden_no_tag.dart: $noTag', + ] + .map((String line) { + return line + .replaceAll('/', Platform.isWindows ? r'\' : '/'); + }) + .join('\n'); + + try { + expect( + result, + '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n' + '$lines\n' + 'See: https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter\n' + '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n' + ); + } catch (_) { + // This list of files may come up in one order or the other. + lines = [ + 'test/analyze-test-input/root/packages/foo/golden_no_tag.dart: $noTag', + 'test/analyze-test-input/root/packages/foo/golden_missing_tag.dart: $missingTag', + ] + .map((String line) { + return line + .replaceAll('/', Platform.isWindows ? r'\' : '/'); + }) + .join('\n'); + expect( + result, + '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n' + '$lines\n' + 'See: https://github.com/flutter/flutter/wiki/Writing-a-golden-file-test-for-package:flutter\n' + '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n' + ); + } + }); + test('analyze.dart - verifyNoMissingLicense', () async { final String result = await capture(() => verifyNoMissingLicense(testRootPath, checkMinimums: false), exitCode: 1); final String lines = 'test/analyze-test-input/root/packages/foo/foo.dart' diff --git a/packages/flutter/dart_test.yaml b/packages/flutter/dart_test.yaml index fb3b8a21d3f..819ad5f9f07 100644 --- a/packages/flutter/dart_test.yaml +++ b/packages/flutter/dart_test.yaml @@ -1,4 +1,7 @@ tags: + # This tag tells the test framework to run these tagged files as part of a + # reduced test set. + reduced-test-set: # This tag tells the test framework to not shuffle the test order according to # the --test-randomize-ordering-seed for the suites that have this tag. no-shuffle: diff --git a/packages/flutter/test/animation/animation_sheet_test.dart b/packages/flutter/test/animation/animation_sheet_test.dart index 5eb3933eec4..59e119a36ae 100644 --- a/packages/flutter/test/animation/animation_sheet_test.dart +++ b/packages/flutter/test/animation/animation_sheet_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/animation/live_binding_test.dart b/packages/flutter/test/animation/live_binding_test.dart index ed9fbd91154..6fbafb99ad9 100644 --- a/packages/flutter/test/animation/live_binding_test.dart +++ b/packages/flutter/test/animation/live_binding_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/cupertino/activity_indicator_test.dart b/packages/flutter/test/cupertino/activity_indicator_test.dart index d25ae0c2d9e..fbcde0b1023 100644 --- a/packages/flutter/test/cupertino/activity_indicator_test.dart +++ b/packages/flutter/test/cupertino/activity_indicator_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/cupertino.dart'; import 'package:flutter/scheduler.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/cupertino/date_picker_test.dart b/packages/flutter/test/cupertino/date_picker_test.dart index 38c910958a9..c9bc0457e94 100644 --- a/packages/flutter/test/cupertino/date_picker_test.dart +++ b/packages/flutter/test/cupertino/date_picker_test.dart @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(gspencergoog): Remove this tag once this test's state leaks/test -// dependencies have been fixed. -// https://github.com/flutter/flutter/issues/85160 -// Fails with "flutter test --test-randomize-ordering-seed=123" -@Tags(['no-shuffle']) +// no-shuffle: +// //TODO(gspencergoog): Remove this tag once this test's state leaks/test +// dependencies have been fixed. +// https://github.com/flutter/flutter/issues/85160 +// Fails with "flutter test --test-randomize-ordering-seed=456" +// reduced-test-set: +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set', 'no-shuffle']) import 'dart:ui'; diff --git a/packages/flutter/test/cupertino/dialog_test.dart b/packages/flutter/test/cupertino/dialog_test.dart index 22d83f92f75..84ccbb8ce31 100644 --- a/packages/flutter/test/cupertino/dialog_test.dart +++ b/packages/flutter/test/cupertino/dialog_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:math'; import 'package:flutter/cupertino.dart'; diff --git a/packages/flutter/test/cupertino/nav_bar_test.dart b/packages/flutter/test/cupertino/nav_bar_test.dart index 84c330f5eaf..2d2820f231a 100644 --- a/packages/flutter/test/cupertino/nav_bar_test.dart +++ b/packages/flutter/test/cupertino/nav_bar_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/cupertino.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; diff --git a/packages/flutter/test/cupertino/segmented_control_test.dart b/packages/flutter/test/cupertino/segmented_control_test.dart index 603a3767c01..55278221569 100644 --- a/packages/flutter/test/cupertino/segmented_control_test.dart +++ b/packages/flutter/test/cupertino/segmented_control_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:ui' as ui; import 'package:flutter/cupertino.dart'; diff --git a/packages/flutter/test/cupertino/switch_test.dart b/packages/flutter/test/cupertino/switch_test.dart index c569f0f9886..5eb2a424f0b 100644 --- a/packages/flutter/test/cupertino/switch_test.dart +++ b/packages/flutter/test/cupertino/switch_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/cupertino.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; diff --git a/packages/flutter/test/cupertino/text_field_test.dart b/packages/flutter/test/cupertino/text_field_test.dart index ddc43c72970..698032124b2 100644 --- a/packages/flutter/test/cupertino/text_field_test.dart +++ b/packages/flutter/test/cupertino/text_field_test.dart @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(gspencergoog): Remove this tag once this test's state leaks/test -// dependencies have been fixed. -// https://github.com/flutter/flutter/issues/85160 -// Fails with "flutter test --test-randomize-ordering-seed=123" -@Tags(['no-shuffle']) +// no-shuffle: +// //TODO(gspencergoog): Remove this tag once this test's state leaks/test +// dependencies have been fixed. +// https://github.com/flutter/flutter/issues/85160 +// Fails with "flutter test --test-randomize-ordering-seed=456" +// reduced-test-set: +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set', 'no-shuffle']) import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle, Color; diff --git a/packages/flutter/test/cupertino/text_selection_test.dart b/packages/flutter/test/cupertino/text_selection_test.dart index 70cf5596865..84a801d3b13 100644 --- a/packages/flutter/test/cupertino/text_selection_test.dart +++ b/packages/flutter/test/cupertino/text_selection_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:ui' as ui show BoxHeightStyle; import 'package:flutter/cupertino.dart'; diff --git a/packages/flutter/test/material/bottom_app_bar_test.dart b/packages/flutter/test/material/bottom_app_bar_test.dart index f6a8b5e09fd..00271fdab77 100644 --- a/packages/flutter/test/material/bottom_app_bar_test.dart +++ b/packages/flutter/test/material/bottom_app_bar_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/material/bottom_app_bar_theme_test.dart b/packages/flutter/test/material/bottom_app_bar_theme_test.dart index 5d70721bfea..665d1b389d6 100644 --- a/packages/flutter/test/material/bottom_app_bar_theme_test.dart +++ b/packages/flutter/test/material/bottom_app_bar_theme_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/material/bottom_navigation_bar_test.dart b/packages/flutter/test/material/bottom_navigation_bar_test.dart index 465db8c4727..5a8bff64327 100644 --- a/packages/flutter/test/material/bottom_navigation_bar_test.dart +++ b/packages/flutter/test/material/bottom_navigation_bar_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:ui'; import 'package:flutter/material.dart'; diff --git a/packages/flutter/test/material/card_theme_test.dart b/packages/flutter/test/material/card_theme_test.dart index c5246dabfdd..9f290993400 100644 --- a/packages/flutter/test/material/card_theme_test.dart +++ b/packages/flutter/test/material/card_theme_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/material/circle_avatar_test.dart b/packages/flutter/test/material/circle_avatar_test.dart index 6c743210ed4..19015f9f3da 100644 --- a/packages/flutter/test/material/circle_avatar_test.dart +++ b/packages/flutter/test/material/circle_avatar_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:typed_data'; import 'package:flutter/material.dart'; diff --git a/packages/flutter/test/material/dialog_theme_test.dart b/packages/flutter/test/material/dialog_theme_test.dart index 2826884dd92..ab8047d53c8 100644 --- a/packages/flutter/test/material/dialog_theme_test.dart +++ b/packages/flutter/test/material/dialog_theme_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/material/dropdown_test.dart b/packages/flutter/test/material/dropdown_test.dart index f5c30a8fbf8..3af943ddfdb 100644 --- a/packages/flutter/test/material/dropdown_test.dart +++ b/packages/flutter/test/material/dropdown_test.dart @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(gspencergoog): Remove this tag once this test's state leaks/test -// dependencies have been fixed. -// https://github.com/flutter/flutter/issues/85160 -// Fails with "flutter test --test-randomize-ordering-seed=1408669812" -@Tags(['no-shuffle']) +// no-shuffle: +// //TODO(gspencergoog): Remove this tag once this test's state leaks/test +// dependencies have been fixed. +// https://github.com/flutter/flutter/issues/85160 +// Fails with "flutter test --test-randomize-ordering-seed=456" +// reduced-test-set: +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set', 'no-shuffle']) import 'dart:math' as math; import 'dart:ui' show window; diff --git a/packages/flutter/test/material/flexible_space_bar_stretch_mode_test.dart b/packages/flutter/test/material/flexible_space_bar_stretch_mode_test.dart index c8d0e443189..52edc91f7a4 100644 --- a/packages/flutter/test/material/flexible_space_bar_stretch_mode_test.dart +++ b/packages/flutter/test/material/flexible_space_bar_stretch_mode_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/material/floating_action_button_test.dart b/packages/flutter/test/material/floating_action_button_test.dart index 9733a25f47b..9a0e62f8c74 100644 --- a/packages/flutter/test/material/floating_action_button_test.dart +++ b/packages/flutter/test/material/floating_action_button_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + @TestOn('!chrome') import 'dart:ui'; diff --git a/packages/flutter/test/material/flutter_logo_test.dart b/packages/flutter/test/material/flutter_logo_test.dart index f97c0187175..3a391620ed9 100644 --- a/packages/flutter/test/material/flutter_logo_test.dart +++ b/packages/flutter/test/material/flutter_logo_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/material/icons_test.dart b/packages/flutter/test/material/icons_test.dart index 7e75d79c5f0..02fe3efdead 100644 --- a/packages/flutter/test/material/icons_test.dart +++ b/packages/flutter/test/material/icons_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:file/file.dart'; import 'package:file/local.dart'; import 'package:flutter/material.dart'; diff --git a/packages/flutter/test/material/input_decorator_test.dart b/packages/flutter/test/material/input_decorator_test.dart index 3df03c20327..ee74400108e 100644 --- a/packages/flutter/test/material/input_decorator_test.dart +++ b/packages/flutter/test/material/input_decorator_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:async'; import 'package:flutter/foundation.dart'; diff --git a/packages/flutter/test/material/material_test.dart b/packages/flutter/test/material/material_test.dart index df7ae5d788d..d1446c5a9f6 100644 --- a/packages/flutter/test/material/material_test.dart +++ b/packages/flutter/test/material/material_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/material/progress_indicator_test.dart b/packages/flutter/test/material/progress_indicator_test.dart index b97e6a42377..2b133739153 100644 --- a/packages/flutter/test/material/progress_indicator_test.dart +++ b/packages/flutter/test/material/progress_indicator_test.dart @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(gspencergoog): Remove this tag once this test's state leaks/test -// dependencies have been fixed. -// https://github.com/flutter/flutter/issues/85160 -// Fails with "flutter test --test-randomize-ordering-seed=456" -@Tags(['no-shuffle']) +// no-shuffle: +// //TODO(gspencergoog): Remove this tag once this test's state leaks/test +// dependencies have been fixed. +// https://github.com/flutter/flutter/issues/85160 +// Fails with "flutter test --test-randomize-ordering-seed=456" +// reduced-test-set: +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set', 'no-shuffle']) import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; diff --git a/packages/flutter/test/material/radio_test.dart b/packages/flutter/test/material/radio_test.dart index 048e1470c4c..c3ccf6fb6d9 100644 --- a/packages/flutter/test/material/radio_test.dart +++ b/packages/flutter/test/material/radio_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:ui'; import 'package:flutter/foundation.dart'; diff --git a/packages/flutter/test/material/reorderable_list_test.dart b/packages/flutter/test/material/reorderable_list_test.dart index af0e52260d6..f250ccb34fb 100644 --- a/packages/flutter/test/material/reorderable_list_test.dart +++ b/packages/flutter/test/material/reorderable_list_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; diff --git a/packages/flutter/test/material/snack_bar_test.dart b/packages/flutter/test/material/snack_bar_test.dart index 3425f4a66e9..ccc3ab1d8a2 100644 --- a/packages/flutter/test/material/snack_bar_test.dart +++ b/packages/flutter/test/material/snack_bar_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/foundation.dart' show FlutterExceptionHandler; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; diff --git a/packages/flutter/test/material/switch_test.dart b/packages/flutter/test/material/switch_test.dart index e0e968f5e09..27131c5e000 100644 --- a/packages/flutter/test/material/switch_test.dart +++ b/packages/flutter/test/material/switch_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:async'; import 'dart:ui' as ui; diff --git a/packages/flutter/test/material/tab_bar_theme_test.dart b/packages/flutter/test/material/tab_bar_theme_test.dart index 728ea4ada83..d3113113eae 100644 --- a/packages/flutter/test/material/tab_bar_theme_test.dart +++ b/packages/flutter/test/material/tab_bar_theme_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/material/text_field_test.dart b/packages/flutter/test/material/text_field_test.dart index cca0af72753..02bc2d0bc89 100644 --- a/packages/flutter/test/material/text_field_test.dart +++ b/packages/flutter/test/material/text_field_test.dart @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(gspencergoog): Remove this tag once this test's state leaks/test -// dependencies have been fixed. -// https://github.com/flutter/flutter/issues/85160 -// Fails with "flutter test --test-randomize-ordering-seed=3890307731" -@Tags(['no-shuffle']) +// no-shuffle: +// //TODO(gspencergoog): Remove this tag once this test's state leaks/test +// dependencies have been fixed. +// https://github.com/flutter/flutter/issues/85160 +// Fails with "flutter test --test-randomize-ordering-seed=456" +// reduced-test-set: +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set', 'no-shuffle']) import 'dart:math' as math; import 'dart:ui' as ui show window, BoxHeightStyle, BoxWidthStyle, WindowPadding; diff --git a/packages/flutter/test/material/text_selection_test.dart b/packages/flutter/test/material/text_selection_test.dart index 0ed4bacf792..d0cf606070e 100644 --- a/packages/flutter/test/material/text_selection_test.dart +++ b/packages/flutter/test/material/text_selection_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; diff --git a/packages/flutter/test/material/toggle_buttons_test.dart b/packages/flutter/test/material/toggle_buttons_test.dart index 22e2227b539..66824527135 100644 --- a/packages/flutter/test/material/toggle_buttons_test.dart +++ b/packages/flutter/test/material/toggle_buttons_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; diff --git a/packages/flutter/test/painting/box_painter_test.dart b/packages/flutter/test/painting/box_painter_test.dart index b8074c66c02..04a674523d6 100644 --- a/packages/flutter/test/painting/box_painter_test.dart +++ b/packages/flutter/test/painting/box_painter_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter/painting.dart'; import 'package:flutter/widgets.dart'; diff --git a/packages/flutter/test/painting/continuous_rectangle_border_test.dart b/packages/flutter/test/painting/continuous_rectangle_border_test.dart index 7fda5b39360..84eddb53797 100644 --- a/packages/flutter/test/painting/continuous_rectangle_border_test.dart +++ b/packages/flutter/test/painting/continuous_rectangle_border_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/painting/flutter_logo_test.dart b/packages/flutter/test/painting/flutter_logo_test.dart index ae210b6851d..08b9828a8c7 100644 --- a/packages/flutter/test/painting/flutter_logo_test.dart +++ b/packages/flutter/test/painting/flutter_logo_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/painting/gradient_test.dart b/packages/flutter/test/painting/gradient_test.dart index 406977e3480..ed798c0b231 100644 --- a/packages/flutter/test/painting/gradient_test.dart +++ b/packages/flutter/test/painting/gradient_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:math' as math; import 'package:flutter/widgets.dart'; diff --git a/packages/flutter/test/rendering/localized_fonts_test.dart b/packages/flutter/test/rendering/localized_fonts_test.dart index 2bb460fd6fc..bcb029d837c 100644 --- a/packages/flutter/test/rendering/localized_fonts_test.dart +++ b/packages/flutter/test/rendering/localized_fonts_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/backdrop_filter_test.dart b/packages/flutter/test/widgets/backdrop_filter_test.dart index 8e5b24de141..b962e2a3dc0 100644 --- a/packages/flutter/test/widgets/backdrop_filter_test.dart +++ b/packages/flutter/test/widgets/backdrop_filter_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:ui'; import 'package:flutter/material.dart'; diff --git a/packages/flutter/test/widgets/basic_test.dart b/packages/flutter/test/widgets/basic_test.dart index 1417587ce38..618db7ead5a 100644 --- a/packages/flutter/test/widgets/basic_test.dart +++ b/packages/flutter/test/widgets/basic_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:math' as math; import 'dart:ui' as ui; diff --git a/packages/flutter/test/widgets/clip_test.dart b/packages/flutter/test/widgets/clip_test.dart index 4086efd0b78..cf1a4022410 100644 --- a/packages/flutter/test/widgets/clip_test.dart +++ b/packages/flutter/test/widgets/clip_test.dart @@ -2,11 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(gspencergoog): Remove this tag once this test's state leaks/test -// dependencies have been fixed. -// https://github.com/flutter/flutter/issues/85160 -// Fails with "flutter test --test-randomize-ordering-seed=456" -@Tags(['no-shuffle']) +// no-shuffle: +// //TODO(gspencergoog): Remove this tag once this test's state leaks/test +// dependencies have been fixed. +// https://github.com/flutter/flutter/issues/85160 +// Fails with "flutter test --test-randomize-ordering-seed=456" +// reduced-test-set: +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set', 'no-shuffle']) import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; diff --git a/packages/flutter/test/widgets/color_filter_test.dart b/packages/flutter/test/widgets/color_filter_test.dart index e5baacf2ce8..1c3d20ed592 100644 --- a/packages/flutter/test/widgets/color_filter_test.dart +++ b/packages/flutter/test/widgets/color_filter_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + @TestOn('!chrome') import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; diff --git a/packages/flutter/test/widgets/container_test.dart b/packages/flutter/test/widgets/container_test.dart index 294eeb43c16..d48fbee46c5 100644 --- a/packages/flutter/test/widgets/container_test.dart +++ b/packages/flutter/test/widgets/container_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/editable_text_cursor_test.dart b/packages/flutter/test/widgets/editable_text_cursor_test.dart index a562b539163..94f8609944f 100644 --- a/packages/flutter/test/widgets/editable_text_cursor_test.dart +++ b/packages/flutter/test/widgets/editable_text_cursor_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + @TestOn('!chrome') import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; diff --git a/packages/flutter/test/widgets/image_filter_quality_test.dart b/packages/flutter/test/widgets/image_filter_quality_test.dart index ba1e4377d95..1bacdb1abb2 100644 --- a/packages/flutter/test/widgets/image_filter_quality_test.dart +++ b/packages/flutter/test/widgets/image_filter_quality_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:async'; import 'dart:typed_data'; import 'dart:ui' as ui; diff --git a/packages/flutter/test/widgets/image_filter_test.dart b/packages/flutter/test/widgets/image_filter_test.dart index 96538681a31..38d949860ba 100644 --- a/packages/flutter/test/widgets/image_filter_test.dart +++ b/packages/flutter/test/widgets/image_filter_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:typed_data'; import 'dart:ui'; diff --git a/packages/flutter/test/widgets/image_test.dart b/packages/flutter/test/widgets/image_test.dart index b033eca0266..458b9cc0959 100644 --- a/packages/flutter/test/widgets/image_test.dart +++ b/packages/flutter/test/widgets/image_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:async'; import 'dart:math' as math; import 'dart:typed_data'; diff --git a/packages/flutter/test/widgets/invert_colors_test.dart b/packages/flutter/test/widgets/invert_colors_test.dart index 34739e2284c..e59a22b77e9 100644 --- a/packages/flutter/test/widgets/invert_colors_test.dart +++ b/packages/flutter/test/widgets/invert_colors_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart b/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart index 3a4492baa46..b2bf144373c 100644 --- a/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart +++ b/packages/flutter/test/widgets/list_wheel_scroll_view_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/opacity_test.dart b/packages/flutter/test/widgets/opacity_test.dart index 9c7be0c6874..f3225c92a4a 100644 --- a/packages/flutter/test/widgets/opacity_test.dart +++ b/packages/flutter/test/widgets/opacity_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/overscroll_stretch_indicator_test.dart b/packages/flutter/test/widgets/overscroll_stretch_indicator_test.dart index 9358b182302..cd7504435e0 100644 --- a/packages/flutter/test/widgets/overscroll_stretch_indicator_test.dart +++ b/packages/flutter/test/widgets/overscroll_stretch_indicator_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/rendering.dart'; import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/page_route_builder_test.dart b/packages/flutter/test/widgets/page_route_builder_test.dart index 1a7de69e599..b24f918da13 100644 --- a/packages/flutter/test/widgets/page_route_builder_test.dart +++ b/packages/flutter/test/widgets/page_route_builder_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/physical_model_test.dart b/packages/flutter/test/widgets/physical_model_test.dart index be374d411a7..06357f0dde0 100644 --- a/packages/flutter/test/widgets/physical_model_test.dart +++ b/packages/flutter/test/widgets/physical_model_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/selectable_text_test.dart b/packages/flutter/test/widgets/selectable_text_test.dart index 3cdb542053e..e08bebc98e3 100644 --- a/packages/flutter/test/widgets/selectable_text_test.dart +++ b/packages/flutter/test/widgets/selectable_text_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + @TestOn('!chrome') import 'dart:ui' as ui show BoxHeightStyle, BoxWidthStyle; diff --git a/packages/flutter/test/widgets/shader_mask_test.dart b/packages/flutter/test/widgets/shader_mask_test.dart index f00b5d439c9..905b09f15f7 100644 --- a/packages/flutter/test/widgets/shader_mask_test.dart +++ b/packages/flutter/test/widgets/shader_mask_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/widgets.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/shadow_test.dart b/packages/flutter/test/widgets/shadow_test.dart index f3a97b331d7..b91b579cb3e 100644 --- a/packages/flutter/test/widgets/shadow_test.dart +++ b/packages/flutter/test/widgets/shadow_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/text_golden_test.dart b/packages/flutter/test/widgets/text_golden_test.dart index e2c13a47669..ce2fd45079e 100644 --- a/packages/flutter/test/widgets/text_golden_test.dart +++ b/packages/flutter/test/widgets/text_golden_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + @TestOn('!chrome') import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; diff --git a/packages/flutter/test/widgets/transform_test.dart b/packages/flutter/test/widgets/transform_test.dart index 51e815ff652..76265b3292b 100644 --- a/packages/flutter/test/widgets/transform_test.dart +++ b/packages/flutter/test/widgets/transform_test.dart @@ -2,6 +2,10 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set']) + import 'dart:math' as math; import 'dart:ui' as ui; diff --git a/packages/flutter/test/widgets/widget_inspector_test.dart b/packages/flutter/test/widgets/widget_inspector_test.dart index 53c5d040682..73a3e1580e6 100644 --- a/packages/flutter/test/widgets/widget_inspector_test.dart +++ b/packages/flutter/test/widgets/widget_inspector_test.dart @@ -2,13 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -@TestOn('!chrome') +// no-shuffle: +// //TODO(gspencergoog): Remove this tag once this test's state leaks/test +// dependencies have been fixed. +// https://github.com/flutter/flutter/issues/85160 +// Fails with "flutter test --test-randomize-ordering-seed=456" +// reduced-test-set: +// This file is run as part of a reduced test set in CI on Mac and Windows +// machines. +@Tags(['reduced-test-set', 'no-shuffle']) -// TODO(gspencergoog): Remove this tag once this test's state leaks/test -// dependencies have been fixed. -// https://github.com/flutter/flutter/issues/85160 -// Fails with "flutter test --test-randomize-ordering-seed=456" -@Tags(['no-shuffle']) +@TestOn('!chrome') import 'dart:async'; import 'dart:convert'; @@ -1999,7 +2003,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { _CreationLocation location = knownLocations[id]!; expect(location.file, equals(file)); // ClockText widget. - expect(location.line, equals(60)); + expect(location.line, equals(64)); expect(location.column, equals(9)); expect(location.name, equals('ClockText')); expect(count, equals(1)); @@ -2009,7 +2013,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { location = knownLocations[id]!; expect(location.file, equals(file)); // Text widget in _ClockTextState build method. - expect(location.line, equals(98)); + expect(location.line, equals(102)); expect(location.column, equals(12)); expect(location.name, equals('Text')); expect(count, equals(1)); @@ -2036,7 +2040,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { location = knownLocations[id]!; expect(location.file, equals(file)); // ClockText widget. - expect(location.line, equals(60)); + expect(location.line, equals(64)); expect(location.column, equals(9)); expect(location.name, equals('ClockText')); expect(count, equals(3)); // 3 clock widget instances rebuilt. @@ -2046,7 +2050,7 @@ class _TestWidgetInspectorService extends TestWidgetInspectorService { location = knownLocations[id]!; expect(location.file, equals(file)); // Text widget in _ClockTextState build method. - expect(location.line, equals(98)); + expect(location.line, equals(102)); expect(location.column, equals(12)); expect(location.name, equals('Text')); expect(count, equals(3)); // 3 clock widget instances rebuilt. diff --git a/packages/flutter_test/lib/src/matchers.dart b/packages/flutter_test/lib/src/matchers.dart index ab461d52a5b..edd4ca8a188 100644 --- a/packages/flutter_test/lib/src/matchers.dart +++ b/packages/flutter_test/lib/src/matchers.dart @@ -363,7 +363,8 @@ Matcher coversSameAreaAs(Path expectedPath, { required Rect areaToCompare, int s /// verify that two different code paths create identical images. /// * [flutter_test] for a discussion of test configurations, whereby callers /// may swap out the backend for this matcher. -AsyncMatcher matchesGoldenFile(Object key, {int? version}) { +AsyncMatcher +matchesGoldenFile(Object key, {int? version}) { if (key is Uri) { return MatchesGoldenFile(key, version); } else if (key is String) { diff --git a/packages/flutter_test/test/matchers_test.dart b/packages/flutter_test/test/matchers_test.dart index 9e63df845f7..f157214bc39 100644 --- a/packages/flutter_test/test/matchers_test.dart +++ b/packages/flutter_test/test/matchers_test.dart @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// flutter_ignore_for_file: golden_tag (see analyze.dart) + import 'dart:typed_data'; import 'dart:ui'; diff --git a/packages/flutter_tools/lib/src/commands/test.dart b/packages/flutter_tools/lib/src/commands/test.dart index 0ab7a69fc52..aeba69a00f3 100644 --- a/packages/flutter_tools/lib/src/commands/test.dart +++ b/packages/flutter_tools/lib/src/commands/test.dart @@ -140,7 +140,7 @@ class TestCommand extends FlutterCommand with DeviceBasedDevelopmentArtifacts { ) ..addFlag('update-goldens', negatable: false, - help: 'Whether "matchesGoldenFile()" calls within your test methods should ' + help: 'Whether "matchesGoldenFile()" calls within your test methods should ' // flutter_ignore: golden_tag (see analyze.dart) 'update the golden files rather than test for an existing match.', ) ..addOption('concurrency',