diff --git a/engine/src/flutter/lib/web_ui/dev/build.dart b/engine/src/flutter/lib/web_ui/dev/build.dart index 17953a40a0..459dc19582 100644 --- a/engine/src/flutter/lib/web_ui/dev/build.dart +++ b/engine/src/flutter/lib/web_ui/dev/build.dart @@ -10,8 +10,8 @@ import 'package:path/path.dart' as path; import 'package:watcher/src/watch_event.dart'; import 'environment.dart'; +import 'pipeline.dart'; import 'utils.dart'; -import 'watcher.dart'; class BuildCommand extends Command with ArgUtils { BuildCommand() { diff --git a/engine/src/flutter/lib/web_ui/dev/watcher.dart b/engine/src/flutter/lib/web_ui/dev/pipeline.dart similarity index 96% rename from engine/src/flutter/lib/web_ui/dev/watcher.dart rename to engine/src/flutter/lib/web_ui/dev/pipeline.dart index b8ad28b711..18399fe225 100644 --- a/engine/src/flutter/lib/web_ui/dev/watcher.dart +++ b/engine/src/flutter/lib/web_ui/dev/pipeline.dart @@ -87,13 +87,16 @@ abstract class ProcessStep implements PipelineStep { } } -/// Represents a sequence of asynchronous tasks to be executed. +/// Executes a sequence of asynchronous tasks, typically as part of a build/test +/// process. /// /// The pipeline can be executed by calling [start] and stopped by calling /// [stop]. /// /// When a pipeline is stopped, it switches to the [PipelineStatus.stopping] -/// state and waits until the current task finishes. +/// state. If [PipelineStep.isSafeToInterrupt] is true, interrupts the currently +/// running step and skips the rest. Otherwise, waits until the current task +/// finishes and skips the rest. class Pipeline { Pipeline({required this.steps}); diff --git a/engine/src/flutter/lib/web_ui/dev/run.dart b/engine/src/flutter/lib/web_ui/dev/run.dart index 955fd06b45..f45770ec22 100644 --- a/engine/src/flutter/lib/web_ui/dev/run.dart +++ b/engine/src/flutter/lib/web_ui/dev/run.dart @@ -8,10 +8,10 @@ import 'dart:io' as io; import 'package:args/command_runner.dart'; import 'common.dart'; +import 'pipeline.dart'; import 'steps/compile_tests_step.dart'; import 'steps/run_tests_step.dart'; import 'utils.dart'; -import 'watcher.dart'; /// Runs build and test steps. /// diff --git a/engine/src/flutter/lib/web_ui/dev/steps/compile_tests_step.dart b/engine/src/flutter/lib/web_ui/dev/steps/compile_tests_step.dart index a351bc1b9d..dcd688039d 100644 --- a/engine/src/flutter/lib/web_ui/dev/steps/compile_tests_step.dart +++ b/engine/src/flutter/lib/web_ui/dev/steps/compile_tests_step.dart @@ -10,8 +10,8 @@ import 'package:web_test_utils/goldens.dart'; import '../environment.dart'; import '../exceptions.dart'; +import '../pipeline.dart'; import '../utils.dart'; -import '../watcher.dart'; /// Compiles web tests and their dependencies. /// diff --git a/engine/src/flutter/lib/web_ui/dev/steps/run_tests_step.dart b/engine/src/flutter/lib/web_ui/dev/steps/run_tests_step.dart index bd5009b137..99a9cf7256 100644 --- a/engine/src/flutter/lib/web_ui/dev/steps/run_tests_step.dart +++ b/engine/src/flutter/lib/web_ui/dev/steps/run_tests_step.dart @@ -19,9 +19,9 @@ import 'package:test_core/src/runner/reporter.dart' as hack; import '../browser.dart'; import '../environment.dart'; import '../exceptions.dart'; +import '../pipeline.dart'; import '../test_platform.dart'; import '../utils.dart'; -import '../watcher.dart'; // Maximum number of tests that run concurrently. const int _testConcurrency = int.fromEnvironment('FELT_TEST_CONCURRENCY', defaultValue: 10); diff --git a/engine/src/flutter/lib/web_ui/dev/test_runner.dart b/engine/src/flutter/lib/web_ui/dev/test_runner.dart index 08f36a2d4d..1022f4c2d0 100644 --- a/engine/src/flutter/lib/web_ui/dev/test_runner.dart +++ b/engine/src/flutter/lib/web_ui/dev/test_runner.dart @@ -12,10 +12,10 @@ import 'package:watcher/src/watch_event.dart'; import 'browser.dart'; import 'common.dart'; +import 'pipeline.dart'; import 'steps/compile_tests_step.dart'; import 'steps/run_tests_step.dart'; import 'utils.dart'; -import 'watcher.dart'; /// Runs tests. class TestCommand extends Command with ArgUtils {