From a8137d1db821819f4955914a08cc4e9caadd574f Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 6 Feb 2017 19:12:53 -0800 Subject: [PATCH 01/65] Add template files. --- pkgs/test_process/.gitignore | 9 +++++++++ pkgs/test_process/AUTHORS | 6 ++++++ pkgs/test_process/CHANGELOG.md | 3 +++ pkgs/test_process/CONTRIBUTING.md | 33 +++++++++++++++++++++++++++++++ pkgs/test_process/LICENSE | 26 ++++++++++++++++++++++++ pkgs/test_process/README.md | 1 + pkgs/test_process/pubspec.yaml | 11 +++++++++++ 7 files changed, 89 insertions(+) create mode 100644 pkgs/test_process/.gitignore create mode 100644 pkgs/test_process/AUTHORS create mode 100644 pkgs/test_process/CHANGELOG.md create mode 100644 pkgs/test_process/CONTRIBUTING.md create mode 100644 pkgs/test_process/LICENSE create mode 100644 pkgs/test_process/README.md create mode 100644 pkgs/test_process/pubspec.yaml diff --git a/pkgs/test_process/.gitignore b/pkgs/test_process/.gitignore new file mode 100644 index 000000000..25a1df332 --- /dev/null +++ b/pkgs/test_process/.gitignore @@ -0,0 +1,9 @@ +.buildlog +.DS_Store +.idea +.pub/ +.settings/ +build/ +packages +.packages +pubspec.lock diff --git a/pkgs/test_process/AUTHORS b/pkgs/test_process/AUTHORS new file mode 100644 index 000000000..e8063a8cd --- /dev/null +++ b/pkgs/test_process/AUTHORS @@ -0,0 +1,6 @@ +# Below is a list of people and organizations that have contributed +# to the project. Names should be added to the list like so: +# +# Name/Organization + +Google Inc. diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md new file mode 100644 index 000000000..5b26ad30f --- /dev/null +++ b/pkgs/test_process/CHANGELOG.md @@ -0,0 +1,3 @@ +## 1.0.0 + +* Initial version. diff --git a/pkgs/test_process/CONTRIBUTING.md b/pkgs/test_process/CONTRIBUTING.md new file mode 100644 index 000000000..6f5e0ea67 --- /dev/null +++ b/pkgs/test_process/CONTRIBUTING.md @@ -0,0 +1,33 @@ +Want to contribute? Great! First, read this page (including the small print at +the end). + +### Before you contribute +Before we can use your code, you must sign the +[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) +(CLA), which you can do online. The CLA is necessary mainly because you own the +copyright to your changes, even after your contribution becomes part of our +codebase, so we need your permission to use and distribute your code. We also +need to be sure of various other things—for instance that you'll tell us if you +know that your code infringes on other people's patents. You don't have to sign +the CLA until after you've submitted your code for review and a member has +approved it, but you must do it before we can put your code into our codebase. + +Before you start working on a larger contribution, you should get in touch with +us first through the issue tracker with your idea so that we can help out and +possibly guide you. Coordinating up front makes it much easier to avoid +frustration later on. + +### Code reviews +All submissions, including submissions by project members, require review. + +### File headers +All files in the project must start with the following header. + + // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file + // for details. All rights reserved. Use of this source code is governed by a + // BSD-style license that can be found in the LICENSE file. + +### The small print +Contributions made by corporations are covered by a different agreement than the +one above, the +[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/test_process/LICENSE b/pkgs/test_process/LICENSE new file mode 100644 index 000000000..389ce9856 --- /dev/null +++ b/pkgs/test_process/LICENSE @@ -0,0 +1,26 @@ +Copyright 2017, the Dart project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pkgs/test_process/README.md b/pkgs/test_process/README.md new file mode 100644 index 000000000..4e7484cee --- /dev/null +++ b/pkgs/test_process/README.md @@ -0,0 +1 @@ +A library for testing subprocesses. diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml new file mode 100644 index 000000000..6ca6e3a1a --- /dev/null +++ b/pkgs/test_process/pubspec.yaml @@ -0,0 +1,11 @@ +name: test_process +version: 1.0.0-dev +description: A library for testing subprocesses. +author: Dart Team +homepage: https://github.com/dart-lang/test_process + +environment: + sdk: '>=1.8.0 <2.0.0' + +dependencies: + test: "^0.12.19" From d916bb9602a393c6abe4fbf32215dc7b6090d8ef Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Fri, 10 Mar 2017 17:36:57 -0800 Subject: [PATCH 02/65] Add the package implementation. (dart-lang/test_process#1) --- pkgs/test_process/lib/test_process.dart | 224 ++++++++++++++++++ pkgs/test_process/pubspec.yaml | 8 +- pkgs/test_process/test/test_process_test.dart | 131 ++++++++++ 3 files changed, 362 insertions(+), 1 deletion(-) create mode 100644 pkgs/test_process/lib/test_process.dart create mode 100644 pkgs/test_process/test/test_process_test.dart diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart new file mode 100644 index 000000000..b4f01c38e --- /dev/null +++ b/pkgs/test_process/lib/test_process.dart @@ -0,0 +1,224 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:convert'; +import 'dart:io'; + +import 'package:async/async.dart'; +import 'package:meta/meta.dart'; +import 'package:path/path.dart' as p; +import 'package:test/test.dart'; + +/// A wrapper for [Process] that provides a convenient API for testing its +/// standard IO and interacting with it from a test. +/// +/// If the test fails, this will automatically print out any stdout and stderr +/// from the process to aid debugging. +/// +/// This may be extended to provide custom implementations of [stdoutStream] and +/// [stderrStream]. These will automatically be picked up by the [stdout] and +/// [stderr] queues, but the debug log will still contain the original output. +class TestProcess { + /// The underlying process. + final Process _process; + + /// A human-friendly description of this process. + final String description; + + /// A [StreamQueue] that emits each line of stdout from the process. + /// + /// A copy of the underlying stream can be retreived using [stdoutStream]. + StreamQueue get stdout => _stdout; + StreamQueue _stdout; + + /// A [StreamQueue] that emits each line of stderr from the process. + /// + /// A copy of the underlying stream can be retreived using [stderrStream]. + StreamQueue get stderr => _stderr; + StreamQueue _stderr; + + /// A splitter that can emit new copies of [stdout]. + final StreamSplitter _stdoutSplitter; + + /// A splitter that can emit new copies of [stderr]. + final StreamSplitter _stderrSplitter; + + /// The standard input sink for this process. + IOSink get stdin => _process.stdin; + + /// A buffer of mixed stdout and stderr lines. + final _log = []; + + /// Whether [_log] has been passed to [printOnFailure] yet. + bool _loggedOutput = false; + + /// Completes to [_process]'s exit code if it's exited, otherwise completes to + /// `null` immediately. + Future get _exitCodeOrNull async => + await _process.exitCode.timeout(Duration.ZERO, onTimeout: () => null); + + /// Starts a process. + /// + /// [executable], [arguments], [workingDirectory], and [environment] have the + /// same meaning as for [Process.start]. + /// + /// [description] is a string description of this process; it defaults to the + /// command-line invocation. [encoding] is the [Encoding] that will be used + /// for the process's input and output; it defaults to [UTF8]. + /// + /// If [forwardStdio] is `true`, the process's stdout and stderr will be + /// printed to the console as they appear. This is only intended to be set + /// temporarily to help when debugging test failures. + static Future start( + String executable, + Iterable arguments, + {String workingDirectory, + Map environment, + bool includeParentEnvironment: true, + bool runInShell: false, + String description, + Encoding encoding, + bool forwardStdio: false}) async { + var process = await Process.start(executable, arguments.toList(), + workingDirectory: workingDirectory, + environment: environment, + includeParentEnvironment: includeParentEnvironment, + runInShell: runInShell); + + if (description == null) { + var humanExecutable = p.isWithin(p.current, executable) + ? p.relative(executable) + : executable; + description = "$humanExecutable ${arguments.join(" ")}"; + } + + encoding ??= UTF8; + return new TestProcess( + process, description, encoding: encoding, forwardStdio: forwardStdio); + } + + /// Creates a [TestProcess] for [process]. + /// + /// The [description], [encoding], and [forwardStdio] are the same as those to + /// [start]. + /// + /// This is protected, which means it should only be called by subclasses. + @protected + TestProcess(Process process, this.description, {Encoding encoding, + bool forwardStdio: false}) + : _process = process, + _stdoutSplitter = new StreamSplitter(process.stdout + .transform(encoding.decoder).transform(const LineSplitter())), + _stderrSplitter = new StreamSplitter(process.stderr + .transform(encoding.decoder).transform(const LineSplitter())) { + addTearDown(_tearDown); + expect(_process.exitCode.then((_) => _logOutput()), completes, + reason: "Process `$description` never exited."); + + _stdout = new StreamQueue(stdoutStream()); + _stderr = new StreamQueue(stderrStream()); + + // Listen eagerly so that the lines are interleaved properly between the two + // streams. + stdoutStream().listen((line) { + if (forwardStdio) print(line); + _log.add(" $line"); + }); + + stderrStream().listen((line) { + if (forwardStdio) print(line); + _log.add("[e] $line"); + }); + } + + /// A callback that's run when the test completes. + Future _tearDown() async { + // If the process is already dead, do nothing. + if (await _exitCodeOrNull != null) return; + + _process.kill(ProcessSignal.SIGKILL); + + // Log output now rather than waiting for the exitCode callback so that + // it's visible even if we time out waiting for the process to die. + await _logOutput(); + } + + /// Formats the contents of [_log] and passes them to [printOnFailure]. + Future _logOutput() async { + if (_loggedOutput) return; + _loggedOutput = true; + + var exitCode = await _exitCodeOrNull; + + // Wait a timer tick to ensure that all available lines have been flushed to + // [_log]. + await new Future.delayed(Duration.ZERO); + + var buffer = new StringBuffer(); + buffer.write("Process `$description` "); + if ((await _exitCodeOrNull) == null) { + buffer.writeln("was killed with SIGKILL in a tear-down. Output:"); + } else { + buffer.writeln("exited with exitCode $exitCode. Output:"); + } + + buffer.writeln(_log.join("\n")); + printOnFailure(buffer.toString()); + } + + /// Returns a copy of [stdout] as a single-subscriber stream. + /// + /// Each time this is called, it will return a separate copy that will start + /// from the beginning of the process. + /// + /// This can be overridden by subclasses to return a derived standard output + /// stream. This stream will then be used for [stdout]. + Stream stdoutStream() => _stdoutSplitter.split(); + + /// Returns a copy of [stderr] as a single-subscriber stream. + /// + /// Each time this is called, it will return a separate copy that will start + /// from the beginning of the process. + /// + /// This can be overridden by subclasses to return a derived standard output + /// stream. This stream will then be used for [stderr]. + Stream stderrStream() => _stderrSplitter.split(); + + /// Sends [signal] to the process. + /// + /// This is meant for sending specific signals. If you just want to kill the + /// process, use [kill] instead. + /// + /// Throws an [UnsupportedError] on Windows. + void signal(ProcessSignal signal) { + if (Platform.isWindows) { + throw new UnsupportedError( + "TestProcess.signal() isn't supported on Windows."); + } + + _process.kill(signal); + } + + /// Kills the process (with SIGKILL on POSIX operating systems), and returns a + /// future that completes once it's dead. + /// + /// If this is called after the process is already dead, it does nothing. + Future kill() async { + _process.kill(ProcessSignal.SIGKILL); + await _process.exitCode; + } + + /// Waits for the process to exit, and verifies that the exit code matches + /// [expectedExitCode] (if given). + /// + /// If this is called after the process is already dead, it verifies its + /// existing exit code. + Future shouldExit([expectedExitCode]) async { + var exitCode = await _process.exitCode; + if (expectedExitCode == null) return; + expect(exitCode, expectedExitCode, + reason: "Process `$description` had an unexpected exit code."); + } +} diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 6ca6e3a1a..48f5b8464 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 1.0.0-dev +version: 1.0.0-rc.1 description: A library for testing subprocesses. author: Dart Team homepage: https://github.com/dart-lang/test_process @@ -8,4 +8,10 @@ environment: sdk: '>=1.8.0 <2.0.0' dependencies: + async: "^1.12.0" + meta: ">=0.9.0 <2.0.0" + path: "^1.0.0" test: "^0.12.19" + +dev_dependencies: + test_descriptor: "^1.0.0" diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart new file mode 100644 index 000000000..8acf2a6a6 --- /dev/null +++ b/pkgs/test_process/test/test_process_test.dart @@ -0,0 +1,131 @@ +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'dart:async'; +import 'dart:io'; + +import 'package:path/path.dart' as p; +import 'package:test/test.dart'; + +import 'package:test_descriptor/test_descriptor.dart' as d; +import 'package:test_process/test_process.dart'; + +final throwsTestFailure = throwsA(new isInstanceOf()); + +void main() { + group("shouldExit()", () { + test("succeeds when the process exits with the given exit code", () async { + var process = await startDartProcess('exitCode = 42;'); + await process.shouldExit(greaterThan(12)); + }); + + test("fails when the process exits with a different exit code", () async { + var process = await startDartProcess('exitCode = 1;'); + expect(process.shouldExit(greaterThan(12)), throwsTestFailure); + }); + + test("allows any exit code without an assertion", () async { + var process = await startDartProcess('exitCode = 1;'); + await process.shouldExit(); + }); + }); + + test("kill() stops the process", () async { + var process = await startDartProcess('while (true);'); + + // Should terminate. + await process.kill(); + }); + + group("stdout and stderr", () { + test("expose the process's standard io", () async { + var process = await startDartProcess(r''' + print("hello"); + stderr.writeln("hi"); + print("\nworld"); + '''); + + expect(process.stdout, + emitsInOrder(['hello', '', 'world', emitsDone])); + expect(process.stderr, emitsInOrder(['hi', emitsDone])); + await process.shouldExit(0); + }); + + test("close when the process exits", () async { + var process = await startDartProcess(''); + expect(expectLater(process.stdout, emits('hello')), + throwsTestFailure); + expect(expectLater(process.stderr, emits('world')), + throwsTestFailure); + await process.shouldExit(0); + }); + }); + + test("stdoutStream() and stderrStream() copy the process's standard io", + () async { + var process = await startDartProcess(r''' + print("hello"); + stderr.writeln("hi"); + print("\nworld"); + '''); + + expect(process.stdoutStream(), + emitsInOrder(['hello', '', 'world', emitsDone])); + expect(process.stdoutStream(), + emitsInOrder(['hello', '', 'world', emitsDone])); + + expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); + expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); + + await process.shouldExit(0); + + expect(process.stdoutStream(), + emitsInOrder(['hello', '', 'world', emitsDone])); + expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); + }); + + test("stdin writes to the process", () async { + var process = await startDartProcess(r''' + stdinLines.listen((line) => print("> $line")); + '''); + + process.stdin.writeln("hello"); + await expectLater(process.stdout, emits("> hello")); + process.stdin.writeln("world"); + await expectLater(process.stdout, emits("> world")); + await process.kill(); + }); + + test("signal sends a signal to the process", () async { + var process = await startDartProcess(r''' + ProcessSignal.SIGHUP.watch().listen((_) => print("HUP")); + print("ready"); + '''); + + await expectLater(process.stdout, emits('ready')); + process.signal(ProcessSignal.SIGHUP); + await expectLater(process.stdout, emits('HUP')); + process.kill(); + }, testOn: "!windows"); +} + +/// Starts a Dart process running [script] in a main method. +Future startDartProcess(String script) { + var dartPath = p.join(d.sandbox, 'test.dart'); + new File(dartPath).writeAsStringSync(''' + import 'dart:async'; + import 'dart:convert'; + import 'dart:io'; + + var stdinLines = stdin + .transform(UTF8.decoder) + .transform(new LineSplitter()); + + void main() { + $script + } + '''); + + return TestProcess.start(Platform.executable, ['--checked', dartPath]); +} From 8e4796d44e085f6cc82fa270366d9ef59834f7c2 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Thu, 1 Jun 2017 14:07:42 -0700 Subject: [PATCH 03/65] Print superclass rather than subclass logs. (dart-lang/test_process#2) --- pkgs/test_process/CHANGELOG.md | 10 ++++++++-- pkgs/test_process/lib/test_process.dart | 7 +++++-- pkgs/test_process/pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 5b26ad30f..96edea9c5 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,9 @@ -## 1.0.0 +## 1.0.0-rc.2 -* Initial version. +* Subclassed `TestProcess`es now emit log output based on the superclass's + standard IO streams rather than the subclass's. This matches the documented + behavior. + +## 1.0.0-rc.1 + +* Initial release candidate. diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index b4f01c38e..1ad3279c7 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -122,12 +122,15 @@ class TestProcess { // Listen eagerly so that the lines are interleaved properly between the two // streams. - stdoutStream().listen((line) { + // + // Call [split] explicitly because we don't want to log overridden + // [stdoutStream] or [stderrStream] output. + _stdoutSplitter.split().listen((line) { if (forwardStdio) print(line); _log.add(" $line"); }); - stderrStream().listen((line) { + _stderrSplitter.split().listen((line) { if (forwardStdio) print(line); _log.add("[e] $line"); }); diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 48f5b8464..9e402d932 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 1.0.0-rc.1 +version: 1.0.0-rc.2 description: A library for testing subprocesses. author: Dart Team homepage: https://github.com/dart-lang/test_process From 544bbb20f48562143ef3f777a8fe3a11b6c0300b Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Tue, 6 Jun 2017 15:55:38 -0700 Subject: [PATCH 04/65] Add pid and exitCode getters. This makes the API more similar to dart:io's Process. --- pkgs/test_process/lib/test_process.dart | 19 +++++++++++++------ pkgs/test_process/test/test_process_test.dart | 3 +++ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index 1ad3279c7..3584ab5c3 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -54,10 +54,17 @@ class TestProcess { /// Whether [_log] has been passed to [printOnFailure] yet. bool _loggedOutput = false; + /// Returns a [Future] which completes to the exit code of the process, once + /// it completes. + Future get exitCode => _process.exitCode; + + /// The process ID of the process. + int get pid => _process.pid; + /// Completes to [_process]'s exit code if it's exited, otherwise completes to /// `null` immediately. Future get _exitCodeOrNull async => - await _process.exitCode.timeout(Duration.ZERO, onTimeout: () => null); + await exitCode.timeout(Duration.ZERO, onTimeout: () => null); /// Starts a process. /// @@ -153,7 +160,7 @@ class TestProcess { if (_loggedOutput) return; _loggedOutput = true; - var exitCode = await _exitCodeOrNull; + var exitCodeOrNull = await _exitCodeOrNull; // Wait a timer tick to ensure that all available lines have been flushed to // [_log]. @@ -161,10 +168,10 @@ class TestProcess { var buffer = new StringBuffer(); buffer.write("Process `$description` "); - if ((await _exitCodeOrNull) == null) { + if (exitCodeOrNull == null) { buffer.writeln("was killed with SIGKILL in a tear-down. Output:"); } else { - buffer.writeln("exited with exitCode $exitCode. Output:"); + buffer.writeln("exited with exitCode $exitCodeOrNull. Output:"); } buffer.writeln(_log.join("\n")); @@ -210,7 +217,7 @@ class TestProcess { /// If this is called after the process is already dead, it does nothing. Future kill() async { _process.kill(ProcessSignal.SIGKILL); - await _process.exitCode; + await exitCode; } /// Waits for the process to exit, and verifies that the exit code matches @@ -219,7 +226,7 @@ class TestProcess { /// If this is called after the process is already dead, it verifies its /// existing exit code. Future shouldExit([expectedExitCode]) async { - var exitCode = await _process.exitCode; + var exitCode = await this.exitCode; if (expectedExitCode == null) return; expect(exitCode, expectedExitCode, reason: "Process `$description` had an unexpected exit code."); diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index 8acf2a6a6..81d27e1a5 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -17,16 +17,19 @@ void main() { group("shouldExit()", () { test("succeeds when the process exits with the given exit code", () async { var process = await startDartProcess('exitCode = 42;'); + expect(process.exitCode, completion(equals(42))); await process.shouldExit(greaterThan(12)); }); test("fails when the process exits with a different exit code", () async { var process = await startDartProcess('exitCode = 1;'); + expect(process.exitCode, completion(equals(1))); expect(process.shouldExit(greaterThan(12)), throwsTestFailure); }); test("allows any exit code without an assertion", () async { var process = await startDartProcess('exitCode = 1;'); + expect(process.exitCode, completion(equals(1))); await process.shouldExit(); }); }); From f29cd322a81c8c76352e6dbe12bc800ea6c8de64 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Tue, 6 Jun 2017 16:42:16 -0700 Subject: [PATCH 05/65] Flesh out the README. --- pkgs/test_process/README.md | 118 ++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/pkgs/test_process/README.md b/pkgs/test_process/README.md index 4e7484cee..0f59c6674 100644 --- a/pkgs/test_process/README.md +++ b/pkgs/test_process/README.md @@ -1 +1,119 @@ A library for testing subprocesses. + +This exposes a [`TestProcess`][TestProcess] class that wraps `dart:io`'s +[`Process`][Process] class and makes it easy to read standard output +line-by-line. `TestProcess` works the same as `Process` in many ways, but there +are a few major differences. + +[TestProcess]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess-class.html +[Process]: https://api.dartlang.org/stable/latest/dart-io/Process-class.html + +## Standard Output + +`Process.stdout` and `Process.stderr` are binary streams, which is the most +general API but isn't the most helpful when working with a program that produces +plain text. Instead, [`TestProcess.stdout`][stdout] and +[`TestProcess.stderr`][stderr] emit a string for each line of output the process +produces. What's more, they're [`StreamQueue`][StreamQueue]s, which means +they provide a *pull-based API*. For example: + +[stdout]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/stdout.html +[stderr]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/stderr.html +[StreamQueue]: https://www.dartdocs.org/documentation/async/latest/async/StreamQueue-class.html + +```dart +import 'package:test/test.dart'; +import 'package:test_process/test_process.dart'; + +void main() { + test("pub get gets dependencies", () async { + // TestProcess.start() works just like Process.start() from dart:io. + var process = await TestProcess.start("pub", ["get"]); + + // StreamQueue.next returns the next line emitted on standard out. + var firstLine = await process.stdout.next; + expect(firstLine, equals("Resolving dependencies...")); + + // Each call to StreamQueue.next moves one line further. + String next; + do { + next = await process.stdout.next; + } while (next != "Got dependencies!"); + + // Assert that the process exits with code 0. + await process.shouldExit(0); + }); +} +``` + +The `test` package's [stream matchers][] have built-in support for +`StreamQueues`, which makes them perfect for making assertions about a process's +output. We can use this to clean up the previous example: + +[stream matchers]: https://github.com/dart-lang/test#stream-matchers + +```dart +import 'package:test/test.dart'; +import 'package:test_process/test_process.dart'; + +void main() { + test("pub get gets dependencies", () async { + var process = await TestProcess.start("pub", ["get"]); + + // Each stream matcher will consume as many lines as it matches from a + // StreamQueue, and no more, so it's safe to use them in sequence. + await expectLater(process.stdout, emits("Resolving dependencies...")); + + // The emitsThrough matcher matches and consumes any number of lines, as + // long as they end with one matching the argument. + await expectLater(process.stdout, emitsThrough("Got dependencies!")); + + await process.shouldExit(0); + }); +} +``` + +If you want to access the standard output streams without consuming any values +from the queues, you can use the [`stdoutStream()`][stdoutStream] and +[`stderrStream()`][stderrStream] methods. Each time you call one of these, it +produces an entirely new stream that replays the corresponding output stream +from the beginning, regardless of what's already been produced by `stdout`, +`stderr`, or other calls to the stream method. + +[stdoutStream]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/stdoutStream.html +[stderrStream]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/stderrStream.html + +## Signals and Termination + +The way signaling works is different from `dart:io` as well. `TestProcess` still +has a [`kill()`][kill] method, but it defaults to `SIGKILL` on Mac OS and Linux +to ensure (as best as possible) that processes die without leaving behind +zombies. If you want to send a particular signal (which is unsupported on +Windows), you can do so by explicitly calling [`signal()`][signal]. + +[kill]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/kill.html +[signal]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/signal.html + +In addition to [`exitCode`][exitCode], which works the same as in `dart:io`, +`TestProcess` also adds a new method named [`shouldExit()`][shouldExit]. This is +lets tests wait for a process to exit, and (if desired) assert what particular +exit code it produced. + +[exitCode]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/exitCode.html +[shouldExit]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/shouldExit.html + +## Debugging Output + +When a test using `TestProcess` fails, it will print all the output produced by +that process. This makes it much easier to figure out what went wrong and why. +The debugging output uses a header based on the process's invocation by +default, but you can pass in custom `description` parameters to +[`TestProcess.start()`][start] to control the headers. + +[start]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/start.html + +`TestProcess` will also produce debugging output as the test runs if you pass +`forwardStdio: true` to `TestProcess.start()`. This can be particularly useful +when you're using an interactive debugger and you want to figure out what a +process is doing before the test finishes and the normal debugging output is +printed. From a30d1603e84010deda808682d4dc5b20f0291413 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Tue, 6 Jun 2017 16:43:02 -0700 Subject: [PATCH 06/65] Update the pubspec and CHANGELOG. --- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/README.md | 2 +- pkgs/test_process/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 96edea9c5..429bb5c34 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.0 + +* Added `pid` and `exitCode` getters to `TestProcess`. + ## 1.0.0-rc.2 * Subclassed `TestProcess`es now emit log output based on the superclass's diff --git a/pkgs/test_process/README.md b/pkgs/test_process/README.md index 0f59c6674..0862e9045 100644 --- a/pkgs/test_process/README.md +++ b/pkgs/test_process/README.md @@ -95,7 +95,7 @@ Windows), you can do so by explicitly calling [`signal()`][signal]. [signal]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/signal.html In addition to [`exitCode`][exitCode], which works the same as in `dart:io`, -`TestProcess` also adds a new method named [`shouldExit()`][shouldExit]. This is +`TestProcess` also adds a new method named [`shouldExit()`][shouldExit]. This lets tests wait for a process to exit, and (if desired) assert what particular exit code it produced. diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 9e402d932..9e8aa0a8a 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 1.0.0-rc.2 +version: 1.0.0 description: A library for testing subprocesses. author: Dart Team homepage: https://github.com/dart-lang/test_process From 67d64c7ed039c258c22ef47c1b6b7bbe6f9b020d Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Wed, 7 Jun 2017 12:43:41 -0700 Subject: [PATCH 07/65] Describe this as "a package" and not "a library". (dart-lang/test_process#5) Closes dart-lang/test_process#4 --- pkgs/test_process/README.md | 2 +- pkgs/test_process/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/README.md b/pkgs/test_process/README.md index 0862e9045..0d1db9cf8 100644 --- a/pkgs/test_process/README.md +++ b/pkgs/test_process/README.md @@ -1,4 +1,4 @@ -A library for testing subprocesses. +A package for testing subprocesses. This exposes a [`TestProcess`][TestProcess] class that wraps `dart:io`'s [`Process`][Process] class and makes it easy to read standard output diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 9e8aa0a8a..88d6678f3 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,6 +1,6 @@ name: test_process version: 1.0.0 -description: A library for testing subprocesses. +description: A package for testing subprocesses. author: Dart Team homepage: https://github.com/dart-lang/test_process From 47d5b438abb80a1371b6ae95610f850410cbd2c3 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Fri, 22 Sep 2017 13:45:35 -0700 Subject: [PATCH 08/65] Declare support for async 2.0.0 (dart-lang/test_process#6) --- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 429bb5c34..353993317 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.1 + +* Declare support for `async` 2.0.0. + ## 1.0.0 * Added `pid` and `exitCode` getters to `TestProcess`. diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 88d6678f3..8f96bbc4f 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 1.0.0 +version: 1.0.1 description: A package for testing subprocesses. author: Dart Team homepage: https://github.com/dart-lang/test_process @@ -8,7 +8,7 @@ environment: sdk: '>=1.8.0 <2.0.0' dependencies: - async: "^1.12.0" + async: ">=1.12.0 <3.0.0" meta: ">=0.9.0 <2.0.0" path: "^1.0.0" test: "^0.12.19" From ef12b6fca206b6b53d45c82de31bb804481d40ca Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 13 Oct 2017 13:19:18 -0700 Subject: [PATCH 09/65] Enable travis-ci (dart-lang/test_process#7) * Add analysis_options and .travis.yml * dartfmt --- pkgs/test_process/.travis.yml | 25 ++++++++++++++++ pkgs/test_process/analysis_options.yaml | 2 ++ pkgs/test_process/lib/test_process.dart | 17 ++++++----- pkgs/test_process/test/test_process_test.dart | 29 +++++++++---------- 4 files changed, 49 insertions(+), 24 deletions(-) create mode 100644 pkgs/test_process/.travis.yml create mode 100644 pkgs/test_process/analysis_options.yaml diff --git a/pkgs/test_process/.travis.yml b/pkgs/test_process/.travis.yml new file mode 100644 index 000000000..a0653e381 --- /dev/null +++ b/pkgs/test_process/.travis.yml @@ -0,0 +1,25 @@ +language: dart + +dart: + - dev + - stable + +dart_task: + - test + +# Only run one instance of the formatter and the analyzer, rather than running +# them against each Dart version. +matrix: + include: + - dart: dev + dart_task: dartfmt + - dart: dev + dart_task: dartanalyzer + +# Only building master means that we don't run two builds for each pull request. +branches: + only: [master] + +cache: + directories: + - $HOME/.pub-cache diff --git a/pkgs/test_process/analysis_options.yaml b/pkgs/test_process/analysis_options.yaml new file mode 100644 index 000000000..a10d4c5a0 --- /dev/null +++ b/pkgs/test_process/analysis_options.yaml @@ -0,0 +1,2 @@ +analyzer: + strong-mode: true diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index 3584ab5c3..dcb1d855e 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -79,8 +79,7 @@ class TestProcess { /// printed to the console as they appear. This is only intended to be set /// temporarily to help when debugging test failures. static Future start( - String executable, - Iterable arguments, + String executable, Iterable arguments, {String workingDirectory, Map environment, bool includeParentEnvironment: true, @@ -102,8 +101,8 @@ class TestProcess { } encoding ??= UTF8; - return new TestProcess( - process, description, encoding: encoding, forwardStdio: forwardStdio); + return new TestProcess(process, description, + encoding: encoding, forwardStdio: forwardStdio); } /// Creates a [TestProcess] for [process]. @@ -113,13 +112,15 @@ class TestProcess { /// /// This is protected, which means it should only be called by subclasses. @protected - TestProcess(Process process, this.description, {Encoding encoding, - bool forwardStdio: false}) + TestProcess(Process process, this.description, + {Encoding encoding, bool forwardStdio: false}) : _process = process, _stdoutSplitter = new StreamSplitter(process.stdout - .transform(encoding.decoder).transform(const LineSplitter())), + .transform(encoding.decoder) + .transform(const LineSplitter())), _stderrSplitter = new StreamSplitter(process.stderr - .transform(encoding.decoder).transform(const LineSplitter())) { + .transform(encoding.decoder) + .transform(const LineSplitter())) { addTearDown(_tearDown); expect(_process.exitCode.then((_) => _logOutput()), completes, reason: "Process `$description` never exited."); diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index 81d27e1a5..dd97a6b6f 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -49,18 +49,15 @@ void main() { print("\nworld"); '''); - expect(process.stdout, - emitsInOrder(['hello', '', 'world', emitsDone])); + expect(process.stdout, emitsInOrder(['hello', '', 'world', emitsDone])); expect(process.stderr, emitsInOrder(['hi', emitsDone])); await process.shouldExit(0); }); test("close when the process exits", () async { var process = await startDartProcess(''); - expect(expectLater(process.stdout, emits('hello')), - throwsTestFailure); - expect(expectLater(process.stderr, emits('world')), - throwsTestFailure); + expect(expectLater(process.stdout, emits('hello')), throwsTestFailure); + expect(expectLater(process.stderr, emits('world')), throwsTestFailure); await process.shouldExit(0); }); }); @@ -73,19 +70,19 @@ void main() { print("\nworld"); '''); - expect(process.stdoutStream(), - emitsInOrder(['hello', '', 'world', emitsDone])); - expect(process.stdoutStream(), - emitsInOrder(['hello', '', 'world', emitsDone])); + expect(process.stdoutStream(), + emitsInOrder(['hello', '', 'world', emitsDone])); + expect(process.stdoutStream(), + emitsInOrder(['hello', '', 'world', emitsDone])); - expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); - expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); + expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); + expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); - await process.shouldExit(0); + await process.shouldExit(0); - expect(process.stdoutStream(), - emitsInOrder(['hello', '', 'world', emitsDone])); - expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); + expect(process.stdoutStream(), + emitsInOrder(['hello', '', 'world', emitsDone])); + expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); }); test("stdin writes to the process", () async { From 0a054b0fab5b1ce117cdfef959f61dfcb0455fc8 Mon Sep 17 00:00:00 2001 From: "Lasse R.H. Nielsen" Date: Tue, 15 May 2018 22:35:47 +0200 Subject: [PATCH 10/65] Remove upper case constants (dart-lang/test_process#8) --- pkgs/test_process/.travis.yml | 2 -- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/lib/test_process.dart | 8 ++++---- pkgs/test_process/pubspec.yaml | 4 ++-- pkgs/test_process/test/test_process_test.dart | 2 +- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/pkgs/test_process/.travis.yml b/pkgs/test_process/.travis.yml index a0653e381..aaab84ca3 100644 --- a/pkgs/test_process/.travis.yml +++ b/pkgs/test_process/.travis.yml @@ -2,8 +2,6 @@ language: dart dart: - dev - - stable - dart_task: - test diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 353993317..91185642d 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.2 + +* Update SDK version to 2.0.0-dev.17.0 + ## 1.0.1 * Declare support for `async` 2.0.0. diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index dcb1d855e..3ee5244f0 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -64,7 +64,7 @@ class TestProcess { /// Completes to [_process]'s exit code if it's exited, otherwise completes to /// `null` immediately. Future get _exitCodeOrNull async => - await exitCode.timeout(Duration.ZERO, onTimeout: () => null); + await exitCode.timeout(Duration.zero, onTimeout: () => null); /// Starts a process. /// @@ -73,7 +73,7 @@ class TestProcess { /// /// [description] is a string description of this process; it defaults to the /// command-line invocation. [encoding] is the [Encoding] that will be used - /// for the process's input and output; it defaults to [UTF8]. + /// for the process's input and output; it defaults to [utf8]. /// /// If [forwardStdio] is `true`, the process's stdout and stderr will be /// printed to the console as they appear. This is only intended to be set @@ -100,7 +100,7 @@ class TestProcess { description = "$humanExecutable ${arguments.join(" ")}"; } - encoding ??= UTF8; + encoding ??= utf8; return new TestProcess(process, description, encoding: encoding, forwardStdio: forwardStdio); } @@ -165,7 +165,7 @@ class TestProcess { // Wait a timer tick to ensure that all available lines have been flushed to // [_log]. - await new Future.delayed(Duration.ZERO); + await new Future.delayed(Duration.zero); var buffer = new StringBuffer(); buffer.write("Process `$description` "); diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 8f96bbc4f..c98deb8c3 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,11 +1,11 @@ name: test_process -version: 1.0.1 +version: 1.0.2 description: A package for testing subprocesses. author: Dart Team homepage: https://github.com/dart-lang/test_process environment: - sdk: '>=1.8.0 <2.0.0' + sdk: '>=2.0.0-dev.17.0 <2.0.0' dependencies: async: ">=1.12.0 <3.0.0" diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index dd97a6b6f..03edd26d2 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -119,7 +119,7 @@ Future startDartProcess(String script) { import 'dart:io'; var stdinLines = stdin - .transform(UTF8.decoder) + .transform(utf8.decoder) .transform(new LineSplitter()); void main() { From 22f385013821eb7371e3e72be907e1947376316d Mon Sep 17 00:00:00 2001 From: "Lasse R.H. Nielsen" Date: Fri, 1 Jun 2018 14:52:42 +0200 Subject: [PATCH 11/65] Remove usage of deprecated dart:io constants. (dart-lang/test_process#11) --- pkgs/test_process/lib/test_process.dart | 4 ++-- pkgs/test_process/pubspec.yaml | 2 +- pkgs/test_process/test/test_process_test.dart | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index 3ee5244f0..cf99b09a4 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -149,7 +149,7 @@ class TestProcess { // If the process is already dead, do nothing. if (await _exitCodeOrNull != null) return; - _process.kill(ProcessSignal.SIGKILL); + _process.kill(ProcessSignal.sigkill); // Log output now rather than waiting for the exitCode callback so that // it's visible even if we time out waiting for the process to die. @@ -217,7 +217,7 @@ class TestProcess { /// /// If this is called after the process is already dead, it does nothing. Future kill() async { - _process.kill(ProcessSignal.SIGKILL); + _process.kill(ProcessSignal.sigkill); await exitCode; } diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index c98deb8c3..212a47829 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -5,7 +5,7 @@ author: Dart Team homepage: https://github.com/dart-lang/test_process environment: - sdk: '>=2.0.0-dev.17.0 <2.0.0' + sdk: '>=2.0.0-dev.55.0 <2.0.0' dependencies: async: ">=1.12.0 <3.0.0" diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index 03edd26d2..ad728e8bc 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -99,12 +99,12 @@ void main() { test("signal sends a signal to the process", () async { var process = await startDartProcess(r''' - ProcessSignal.SIGHUP.watch().listen((_) => print("HUP")); + ProcessSignal.sighup.watch().listen((_) => print("HUP")); print("ready"); '''); await expectLater(process.stdout, emits('ready')); - process.signal(ProcessSignal.SIGHUP); + process.signal(ProcessSignal.sighup); await expectLater(process.stdout, emits('HUP')); process.kill(); }, testOn: "!windows"); From f2fd8303ce9fe0fb3d324b92d75b9a883af63796 Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Jun 2018 12:44:59 -0700 Subject: [PATCH 12/65] Support test 1.x.x --- pkgs/test_process/.gitignore | 2 +- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.gitignore b/pkgs/test_process/.gitignore index 25a1df332..0659a3398 100644 --- a/pkgs/test_process/.gitignore +++ b/pkgs/test_process/.gitignore @@ -1,9 +1,9 @@ .buildlog .DS_Store .idea -.pub/ .settings/ build/ packages .packages pubspec.lock +.dart_tool/ diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 91185642d..7788e3cd7 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.3 + +* Support test `1.x.x`. + ## 1.0.2 * Update SDK version to 2.0.0-dev.17.0 diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 212a47829..648a91a8d 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -11,7 +11,7 @@ dependencies: async: ">=1.12.0 <3.0.0" meta: ">=0.9.0 <2.0.0" path: "^1.0.0" - test: "^0.12.19" + test: ">=0.12.19 <2.0.0" dev_dependencies: test_descriptor: "^1.0.0" From e6b1227c21329a14c9330c3353f98532190f110e Mon Sep 17 00:00:00 2001 From: Gary Roumanis Date: Fri, 15 Jun 2018 13:04:38 -0700 Subject: [PATCH 13/65] prepare for release --- pkgs/test_process/pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 648a91a8d..605797f9f 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 1.0.2 +version: 1.0.3 description: A package for testing subprocesses. author: Dart Team homepage: https://github.com/dart-lang/test_process From 495da7ac8fc3b2ec78af8bde68fd2ecf6211725f Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Tue, 17 Jul 2018 17:48:57 -0400 Subject: [PATCH 14/65] chore: set max SDK version to <3.0.0 (dart-lang/test_process#14) --- pkgs/test_process/.travis.yml | 11 +++++++---- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/analysis_options.yaml | 2 -- pkgs/test_process/pubspec.yaml | 15 ++++++++------- pkgs/test_process/test/test_process_test.dart | 2 +- 5 files changed, 20 insertions(+), 14 deletions(-) delete mode 100644 pkgs/test_process/analysis_options.yaml diff --git a/pkgs/test_process/.travis.yml b/pkgs/test_process/.travis.yml index aaab84ca3..697317e17 100644 --- a/pkgs/test_process/.travis.yml +++ b/pkgs/test_process/.travis.yml @@ -2,16 +2,19 @@ language: dart dart: - dev + dart_task: + - dartfmt + - dartanalyzer - test -# Only run one instance of the formatter and the analyzer, rather than running + # Only run one instance of the formatter and the analyzer, rather than running # them against each Dart version. matrix: - include: - - dart: dev + exclude: + - dart: stable dart_task: dartfmt - - dart: dev + - dart: stable dart_task: dartanalyzer # Only building master means that we don't run two builds for each pull request. diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 7788e3cd7..28a19e3da 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.4 + +* Set max SDK version to `<3.0.0`, and adjust other dependencies. + ## 1.0.3 * Support test `1.x.x`. diff --git a/pkgs/test_process/analysis_options.yaml b/pkgs/test_process/analysis_options.yaml deleted file mode 100644 index a10d4c5a0..000000000 --- a/pkgs/test_process/analysis_options.yaml +++ /dev/null @@ -1,2 +0,0 @@ -analyzer: - strong-mode: true diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 605797f9f..80f4d31cd 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,17 +1,18 @@ name: test_process -version: 1.0.3 +version: 1.0.4 + description: A package for testing subprocesses. author: Dart Team homepage: https://github.com/dart-lang/test_process environment: - sdk: '>=2.0.0-dev.55.0 <2.0.0' + sdk: '>=2.0.0-dev.55.0 <3.0.0' dependencies: - async: ">=1.12.0 <3.0.0" - meta: ">=0.9.0 <2.0.0" - path: "^1.0.0" - test: ">=0.12.19 <2.0.0" + async: '>=1.12.0 <3.0.0' + meta: '>=0.9.0 <2.0.0' + path: ^1.0.0 + test: '>=0.12.42 <2.0.0' dev_dependencies: - test_descriptor: "^1.0.0" + test_descriptor: ^1.0.0 diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index ad728e8bc..08d869321 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -11,7 +11,7 @@ import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; import 'package:test_process/test_process.dart'; -final throwsTestFailure = throwsA(new isInstanceOf()); +final throwsTestFailure = throwsA(new TypeMatcher()); void main() { group("shouldExit()", () { From 3fab9a80ab79bada709d91100b0601a0a1ca5eba Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 8 Apr 2019 15:05:38 -0700 Subject: [PATCH 15/65] Fix travis for latest dev SDK (dart-lang/test_process#15) enable and fix a number of lints --- pkgs/test_process/.travis.yml | 12 +++--- pkgs/test_process/analysis_options.yaml | 43 +++++++++++++++++++ pkgs/test_process/lib/test_process.dart | 24 +++++------ pkgs/test_process/pubspec.yaml | 5 ++- pkgs/test_process/test/test_process_test.dart | 8 ++-- 5 files changed, 67 insertions(+), 25 deletions(-) create mode 100644 pkgs/test_process/analysis_options.yaml diff --git a/pkgs/test_process/.travis.yml b/pkgs/test_process/.travis.yml index 697317e17..9b68785c0 100644 --- a/pkgs/test_process/.travis.yml +++ b/pkgs/test_process/.travis.yml @@ -1,21 +1,19 @@ language: dart dart: + - 2.0.0 - dev dart_task: - - dartfmt - - dartanalyzer - test + - dartanalyzer - # Only run one instance of the formatter and the analyzer, rather than running +# Only run one instance of the formatter and the analyzer, rather than running # them against each Dart version. matrix: - exclude: - - dart: stable + include: + - dart: dev dart_task: dartfmt - - dart: stable - dart_task: dartanalyzer # Only building master means that we don't run two builds for each pull request. branches: diff --git a/pkgs/test_process/analysis_options.yaml b/pkgs/test_process/analysis_options.yaml new file mode 100644 index 000000000..0711acad5 --- /dev/null +++ b/pkgs/test_process/analysis_options.yaml @@ -0,0 +1,43 @@ +include: package:pedantic/analysis_options.yaml +analyzer: + strong-mode: + implicit-casts: false +linter: + rules: + - avoid_empty_else + - avoid_init_to_null + - avoid_null_checks_in_equality_operators + - avoid_unused_constructor_parameters + - await_only_futures + - camel_case_types + - cancel_subscriptions + - constant_identifier_names + - control_flow_in_finally + - directives_ordering + - empty_catches + - empty_constructor_bodies + - empty_statements + - hash_and_equals + - implementation_imports + - iterable_contains_unrelated_type + - library_names + - library_prefixes + - list_remove_unrelated_type + - non_constant_identifier_names + - overridden_fields + - package_api_docs + - package_names + - package_prefixed_library_names + - prefer_equal_for_default_values + - prefer_final_fields + - prefer_generic_function_type_aliases + - prefer_is_not_empty + - slash_for_doc_comments + - test_types_in_equals + - throw_in_finally + - type_init_formals + - unnecessary_brace_in_string_interps + - unnecessary_const + - unnecessary_new + - unrelated_type_equality_checks + - valid_regexps diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index cf99b09a4..733648c75 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -82,11 +82,11 @@ class TestProcess { String executable, Iterable arguments, {String workingDirectory, Map environment, - bool includeParentEnvironment: true, - bool runInShell: false, + bool includeParentEnvironment = true, + bool runInShell = false, String description, Encoding encoding, - bool forwardStdio: false}) async { + bool forwardStdio = false}) async { var process = await Process.start(executable, arguments.toList(), workingDirectory: workingDirectory, environment: environment, @@ -101,7 +101,7 @@ class TestProcess { } encoding ??= utf8; - return new TestProcess(process, description, + return TestProcess(process, description, encoding: encoding, forwardStdio: forwardStdio); } @@ -113,20 +113,20 @@ class TestProcess { /// This is protected, which means it should only be called by subclasses. @protected TestProcess(Process process, this.description, - {Encoding encoding, bool forwardStdio: false}) + {Encoding encoding, bool forwardStdio = false}) : _process = process, - _stdoutSplitter = new StreamSplitter(process.stdout + _stdoutSplitter = StreamSplitter(process.stdout .transform(encoding.decoder) .transform(const LineSplitter())), - _stderrSplitter = new StreamSplitter(process.stderr + _stderrSplitter = StreamSplitter(process.stderr .transform(encoding.decoder) .transform(const LineSplitter())) { addTearDown(_tearDown); expect(_process.exitCode.then((_) => _logOutput()), completes, reason: "Process `$description` never exited."); - _stdout = new StreamQueue(stdoutStream()); - _stderr = new StreamQueue(stderrStream()); + _stdout = StreamQueue(stdoutStream()); + _stderr = StreamQueue(stderrStream()); // Listen eagerly so that the lines are interleaved properly between the two // streams. @@ -165,9 +165,9 @@ class TestProcess { // Wait a timer tick to ensure that all available lines have been flushed to // [_log]. - await new Future.delayed(Duration.zero); + await Future.delayed(Duration.zero); - var buffer = new StringBuffer(); + var buffer = StringBuffer(); buffer.write("Process `$description` "); if (exitCodeOrNull == null) { buffer.writeln("was killed with SIGKILL in a tear-down. Output:"); @@ -205,7 +205,7 @@ class TestProcess { /// Throws an [UnsupportedError] on Windows. void signal(ProcessSignal signal) { if (Platform.isWindows) { - throw new UnsupportedError( + throw UnsupportedError( "TestProcess.signal() isn't supported on Windows."); } diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 80f4d31cd..3b8296e51 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,12 +1,12 @@ name: test_process -version: 1.0.4 +version: 1.0.5-dev description: A package for testing subprocesses. author: Dart Team homepage: https://github.com/dart-lang/test_process environment: - sdk: '>=2.0.0-dev.55.0 <3.0.0' + sdk: '>=2.0.0 <3.0.0' dependencies: async: '>=1.12.0 <3.0.0' @@ -15,4 +15,5 @@ dependencies: test: '>=0.12.42 <2.0.0' dev_dependencies: + pedantic: ^1.0.0 test_descriptor: ^1.0.0 diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index 08d869321..85b3424bb 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -11,7 +11,7 @@ import 'package:test/test.dart'; import 'package:test_descriptor/test_descriptor.dart' as d; import 'package:test_process/test_process.dart'; -final throwsTestFailure = throwsA(new TypeMatcher()); +final throwsTestFailure = throwsA(TypeMatcher()); void main() { group("shouldExit()", () { @@ -106,14 +106,14 @@ void main() { await expectLater(process.stdout, emits('ready')); process.signal(ProcessSignal.sighup); await expectLater(process.stdout, emits('HUP')); - process.kill(); + await process.kill(); }, testOn: "!windows"); } /// Starts a Dart process running [script] in a main method. Future startDartProcess(String script) { var dartPath = p.join(d.sandbox, 'test.dart'); - new File(dartPath).writeAsStringSync(''' + File(dartPath).writeAsStringSync(''' import 'dart:async'; import 'dart:convert'; import 'dart:io'; @@ -127,5 +127,5 @@ Future startDartProcess(String script) { } '''); - return TestProcess.start(Platform.executable, ['--checked', dartPath]); + return TestProcess.start(Platform.executable, ['--enable-asserts', dartPath]); } From 2abab6f59f209412383974a2ce7f0bf6c2ad58fc Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Fri, 10 Jan 2020 12:51:31 -0800 Subject: [PATCH 16/65] Fix newly enforce lints and clean pubspec (dart-lang/test_process#16) - Fix `prefer_single_quotes` which is now enforced by `package:pedantic` - Add a blank CHANGELOG section so it matches pubspec. - Remove unused author section from pubspec. - Simplify constraints on packages that had an unnecessarily low lower bound. Each of these packages doesn't support the Dart 2 stable SDK before their latest major version number. - Fail travis for warnings and lints. --- pkgs/test_process/.travis.yml | 2 +- pkgs/test_process/CHANGELOG.md | 2 ++ pkgs/test_process/lib/test_process.dart | 16 +++++------ pkgs/test_process/pubspec.yaml | 7 ++--- pkgs/test_process/test/test_process_test.dart | 28 +++++++++---------- 5 files changed, 28 insertions(+), 27 deletions(-) diff --git a/pkgs/test_process/.travis.yml b/pkgs/test_process/.travis.yml index 9b68785c0..46ea204e2 100644 --- a/pkgs/test_process/.travis.yml +++ b/pkgs/test_process/.travis.yml @@ -6,7 +6,7 @@ dart: dart_task: - test - - dartanalyzer + - dartanalyzer: --fatal-infos --fatal-warnings . # Only run one instance of the formatter and the analyzer, rather than running # them against each Dart version. diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 28a19e3da..e2b55a60d 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,5 @@ +## 1.0.5-dev + ## 1.0.4 * Set max SDK version to `<3.0.0`, and adjust other dependencies. diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index 733648c75..d0f15a1c2 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -123,7 +123,7 @@ class TestProcess { .transform(const LineSplitter())) { addTearDown(_tearDown); expect(_process.exitCode.then((_) => _logOutput()), completes, - reason: "Process `$description` never exited."); + reason: 'Process `$description` never exited.'); _stdout = StreamQueue(stdoutStream()); _stderr = StreamQueue(stderrStream()); @@ -135,12 +135,12 @@ class TestProcess { // [stdoutStream] or [stderrStream] output. _stdoutSplitter.split().listen((line) { if (forwardStdio) print(line); - _log.add(" $line"); + _log.add(' $line'); }); _stderrSplitter.split().listen((line) { if (forwardStdio) print(line); - _log.add("[e] $line"); + _log.add('[e] $line'); }); } @@ -168,14 +168,14 @@ class TestProcess { await Future.delayed(Duration.zero); var buffer = StringBuffer(); - buffer.write("Process `$description` "); + buffer.write('Process `$description` '); if (exitCodeOrNull == null) { - buffer.writeln("was killed with SIGKILL in a tear-down. Output:"); + buffer.writeln('was killed with SIGKILL in a tear-down. Output:'); } else { - buffer.writeln("exited with exitCode $exitCodeOrNull. Output:"); + buffer.writeln('exited with exitCode $exitCodeOrNull. Output:'); } - buffer.writeln(_log.join("\n")); + buffer.writeln(_log.join('\n')); printOnFailure(buffer.toString()); } @@ -230,6 +230,6 @@ class TestProcess { var exitCode = await this.exitCode; if (expectedExitCode == null) return; expect(exitCode, expectedExitCode, - reason: "Process `$description` had an unexpected exit code."); + reason: 'Process `$description` had an unexpected exit code.'); } } diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 3b8296e51..efaeef390 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -2,17 +2,16 @@ name: test_process version: 1.0.5-dev description: A package for testing subprocesses. -author: Dart Team homepage: https://github.com/dart-lang/test_process environment: sdk: '>=2.0.0 <3.0.0' dependencies: - async: '>=1.12.0 <3.0.0' - meta: '>=0.9.0 <2.0.0' + async: ^2.0.0 + meta: ^1.0.0 path: ^1.0.0 - test: '>=0.12.42 <2.0.0' + test: ^1.0.0 dev_dependencies: pedantic: ^1.0.0 diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index 85b3424bb..1b586cc0c 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -14,34 +14,34 @@ import 'package:test_process/test_process.dart'; final throwsTestFailure = throwsA(TypeMatcher()); void main() { - group("shouldExit()", () { - test("succeeds when the process exits with the given exit code", () async { + group('shouldExit()', () { + test('succeeds when the process exits with the given exit code', () async { var process = await startDartProcess('exitCode = 42;'); expect(process.exitCode, completion(equals(42))); await process.shouldExit(greaterThan(12)); }); - test("fails when the process exits with a different exit code", () async { + test('fails when the process exits with a different exit code', () async { var process = await startDartProcess('exitCode = 1;'); expect(process.exitCode, completion(equals(1))); expect(process.shouldExit(greaterThan(12)), throwsTestFailure); }); - test("allows any exit code without an assertion", () async { + test('allows any exit code without an assertion', () async { var process = await startDartProcess('exitCode = 1;'); expect(process.exitCode, completion(equals(1))); await process.shouldExit(); }); }); - test("kill() stops the process", () async { + test('kill() stops the process', () async { var process = await startDartProcess('while (true);'); // Should terminate. await process.kill(); }); - group("stdout and stderr", () { + group('stdout and stderr', () { test("expose the process's standard io", () async { var process = await startDartProcess(r''' print("hello"); @@ -54,7 +54,7 @@ void main() { await process.shouldExit(0); }); - test("close when the process exits", () async { + test('close when the process exits', () async { var process = await startDartProcess(''); expect(expectLater(process.stdout, emits('hello')), throwsTestFailure); expect(expectLater(process.stderr, emits('world')), throwsTestFailure); @@ -85,19 +85,19 @@ void main() { expect(process.stderrStream(), emitsInOrder(['hi', emitsDone])); }); - test("stdin writes to the process", () async { + test('stdin writes to the process', () async { var process = await startDartProcess(r''' stdinLines.listen((line) => print("> $line")); '''); - process.stdin.writeln("hello"); - await expectLater(process.stdout, emits("> hello")); - process.stdin.writeln("world"); - await expectLater(process.stdout, emits("> world")); + process.stdin.writeln('hello'); + await expectLater(process.stdout, emits('> hello')); + process.stdin.writeln('world'); + await expectLater(process.stdout, emits('> world')); await process.kill(); }); - test("signal sends a signal to the process", () async { + test('signal sends a signal to the process', () async { var process = await startDartProcess(r''' ProcessSignal.sighup.watch().listen((_) => print("HUP")); print("ready"); @@ -107,7 +107,7 @@ void main() { process.signal(ProcessSignal.sighup); await expectLater(process.stdout, emits('HUP')); await process.kill(); - }, testOn: "!windows"); + }, testOn: '!windows'); } /// Starts a Dart process running [script] in a main method. From e23529cbd95c08deede953019054c84a457e9f53 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Tue, 14 Jan 2020 10:47:08 -0800 Subject: [PATCH 17/65] Run the test's heartbeat whenever the process emits output (dart-lang/test_process#17) --- pkgs/test_process/CHANGELOG.md | 4 +++- pkgs/test_process/lib/test_process.dart | 10 ++++++++++ pkgs/test_process/pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index e2b55a60d..6afc2e221 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,4 +1,6 @@ -## 1.0.5-dev +## 1.0.5 + +* Don't allow the test to time out as long as the process is emitting output. ## 1.0.4 diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index d0f15a1c2..d9dff5dbc 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -134,11 +134,13 @@ class TestProcess { // Call [split] explicitly because we don't want to log overridden // [stdoutStream] or [stderrStream] output. _stdoutSplitter.split().listen((line) { + _heartbeat(); if (forwardStdio) print(line); _log.add(' $line'); }); _stderrSplitter.split().listen((line) { + _heartbeat(); if (forwardStdio) print(line); _log.add('[e] $line'); }); @@ -232,4 +234,12 @@ class TestProcess { expect(exitCode, expectedExitCode, reason: 'Process `$description` had an unexpected exit code.'); } + + /// Signal to the test runner that the test is still making progress and + /// shouldn't time out. + void _heartbeat() { + // Interacting with the test runner's asynchronous expectation logic will + // notify it that the test is alive. + expectAsync0(() {})(); + } } diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index efaeef390..cec2673b8 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 1.0.5-dev +version: 1.0.5 description: A package for testing subprocesses. homepage: https://github.com/dart-lang/test_process From c7ac71ec8e52ccfed253550bccd4775ebdb6f931 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 13 Mar 2020 12:12:37 -0700 Subject: [PATCH 18/65] Update links to eliminate redirects --- pkgs/test_process/README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/pkgs/test_process/README.md b/pkgs/test_process/README.md index 0d1db9cf8..f0ff486ea 100644 --- a/pkgs/test_process/README.md +++ b/pkgs/test_process/README.md @@ -5,8 +5,8 @@ This exposes a [`TestProcess`][TestProcess] class that wraps `dart:io`'s line-by-line. `TestProcess` works the same as `Process` in many ways, but there are a few major differences. -[TestProcess]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess-class.html -[Process]: https://api.dartlang.org/stable/latest/dart-io/Process-class.html +[TestProcess]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess-class.html +[Process]: https://api.dart.dev/stable/dart-io/Process-class.html ## Standard Output @@ -17,9 +17,9 @@ plain text. Instead, [`TestProcess.stdout`][stdout] and produces. What's more, they're [`StreamQueue`][StreamQueue]s, which means they provide a *pull-based API*. For example: -[stdout]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/stdout.html -[stderr]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/stderr.html -[StreamQueue]: https://www.dartdocs.org/documentation/async/latest/async/StreamQueue-class.html +[stdout]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess/stdout.html +[stderr]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess/stderr.html +[StreamQueue]: https://pub.dev/documentation/async/latest/async/StreamQueue-class.html ```dart import 'package:test/test.dart'; @@ -80,8 +80,8 @@ produces an entirely new stream that replays the corresponding output stream from the beginning, regardless of what's already been produced by `stdout`, `stderr`, or other calls to the stream method. -[stdoutStream]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/stdoutStream.html -[stderrStream]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/stderrStream.html +[stdoutStream]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess/stdoutStream.html +[stderrStream]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess/stderrStream.html ## Signals and Termination @@ -91,16 +91,16 @@ to ensure (as best as possible) that processes die without leaving behind zombies. If you want to send a particular signal (which is unsupported on Windows), you can do so by explicitly calling [`signal()`][signal]. -[kill]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/kill.html -[signal]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/signal.html +[kill]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess/kill.html +[signal]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess/signal.html In addition to [`exitCode`][exitCode], which works the same as in `dart:io`, `TestProcess` also adds a new method named [`shouldExit()`][shouldExit]. This lets tests wait for a process to exit, and (if desired) assert what particular exit code it produced. -[exitCode]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/exitCode.html -[shouldExit]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/shouldExit.html +[exitCode]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess/exitCode.html +[shouldExit]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess/shouldExit.html ## Debugging Output @@ -110,7 +110,7 @@ The debugging output uses a header based on the process's invocation by default, but you can pass in custom `description` parameters to [`TestProcess.start()`][start] to control the headers. -[start]: https://www.dartdocs.org/documentation/test_process/latest/test_process/TestProcess/start.html +[start]: https://pub.dev/documentation/test_process/latest/test_process/TestProcess/start.html `TestProcess` will also produce debugging output as the test runs if you pass `forwardStdio: true` to `TestProcess.start()`. This can be particularly useful From 759934c81649387c7c34e6350a4e364a0369fc06 Mon Sep 17 00:00:00 2001 From: Mike Fairhurst Date: Fri, 25 Sep 2020 14:02:34 -0700 Subject: [PATCH 19/65] Remove unused dart:async import Since Dart 2.1, Future and Stream have been exported from dart:core --- pkgs/test_process/.travis.yml | 2 +- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/pubspec.yaml | 4 ++-- pkgs/test_process/test/test_process_test.dart | 1 - 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pkgs/test_process/.travis.yml b/pkgs/test_process/.travis.yml index 46ea204e2..d164a30bd 100644 --- a/pkgs/test_process/.travis.yml +++ b/pkgs/test_process/.travis.yml @@ -1,7 +1,7 @@ language: dart dart: - - 2.0.0 + - 2.1.0 - dev dart_task: diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 6afc2e221..766efa6f6 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.0.6 + +* Require Dart >=2.1 + ## 1.0.5 * Don't allow the test to time out as long as the process is emitting output. diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index cec2673b8..19e80f7d3 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,11 +1,11 @@ name: test_process -version: 1.0.5 +version: 1.0.6-dev description: A package for testing subprocesses. homepage: https://github.com/dart-lang/test_process environment: - sdk: '>=2.0.0 <3.0.0' + sdk: '>=2.1.0 <3.0.0' dependencies: async: ^2.0.0 diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index 1b586cc0c..20dcc87ee 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:io'; import 'package:path/path.dart' as p; From 1b8f59693e5120dec027258500b63c30b0511199 Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Sat, 21 Nov 2020 14:46:20 -0800 Subject: [PATCH 20/65] Remove unused dart:async imports As of Dart 2.1, Future/Stream have been exported from dart:core. --- pkgs/test_process/lib/test_process.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index d9dff5dbc..301ce9d28 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -2,7 +2,6 @@ // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. -import 'dart:async'; import 'dart:convert'; import 'dart:io'; From 240590e451532511f3bce6c484cf9cb23e919a17 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Wed, 20 Jan 2021 18:19:04 +0100 Subject: [PATCH 21/65] Migrate to GitHub Actions (dart-lang/test_process#22) * Delete .travis.yml --- .../.github/workflows/test-package.yml | 85 +++++++++++++++++++ pkgs/test_process/.travis.yml | 24 ------ 2 files changed, 85 insertions(+), 24 deletions(-) create mode 100644 pkgs/test_process/.github/workflows/test-package.yml delete mode 100644 pkgs/test_process/.travis.yml diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml new file mode 100644 index 000000000..07e2dbf0d --- /dev/null +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -0,0 +1,85 @@ +name: Dart CI + +on: + # Run on PRs and pushes to the default branch. + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + # Check code formatting and static analysis on a single OS (linux) + # against Dart dev. + analyze: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sdk: [dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: ${{ matrix.sdk }} + - id: install + name: Install dependencies + run: dart pub get + - name: Check formatting + run: dart format --output=none --set-exit-if-changed . + if: always() && steps.install.outcome == 'success' + - name: Analyze code + run: dart analyze --fatal-infos + if: always() && steps.install.outcome == 'success' + + # Run tests on a matrix consisting of two dimensions: + # 1. OS: ubuntu-latest, (macos-latest, windows-latest) + # 2. release: dev + test: + needs: analyze + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # Add macos-latest and/or windows-latest if relevant for this package. + os: [ubuntu-latest] + sdk: [dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: ${{ matrix.sdk }} + - id: install + name: Install dependencies + run: dart pub get + - name: Run VM tests + run: dart test --platform vm + if: always() && steps.install.outcome == 'success' + + # Run tests on a legacy SDK on a matrix consisting of two dimensions: + # 1. OS: ubuntu-latest, (macos-latest, windows-latest) + # 2. release: 2.1.0 + test_legacy_sdk: + needs: analyze + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + # Add macos-latest and/or windows-latest if relevant for this package. + os: [ubuntu-latest] + sdk: [2.1.0] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.3 + with: + sdk: ${{ matrix.sdk }} + - id: install + name: Install dependencies + run: pub get + - name: Run VM tests + run: pub run test --platform vm + if: always() && steps.install.outcome == 'success' diff --git a/pkgs/test_process/.travis.yml b/pkgs/test_process/.travis.yml deleted file mode 100644 index d164a30bd..000000000 --- a/pkgs/test_process/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -language: dart - -dart: - - 2.1.0 - - dev - -dart_task: - - test - - dartanalyzer: --fatal-infos --fatal-warnings . - -# Only run one instance of the formatter and the analyzer, rather than running -# them against each Dart version. -matrix: - include: - - dart: dev - dart_task: dartfmt - -# Only building master means that we don't run two builds for each pull request. -branches: - only: [master] - -cache: - directories: - - $HOME/.pub-cache From 217142201e1dd23f114ec50ea9e07abf998c5698 Mon Sep 17 00:00:00 2001 From: Gaspard Merten <38387384+GaspardMerten@users.noreply.github.com> Date: Fri, 12 Feb 2021 00:41:58 +0100 Subject: [PATCH 22/65] Migrate to null safety (dart-lang/test_process#23) --- .../.github/workflows/test-package.yml | 24 -------------- pkgs/test_process/CHANGELOG.md | 5 +++ pkgs/test_process/lib/test_process.dart | 31 ++++++++----------- pkgs/test_process/pubspec.yaml | 16 +++++----- 4 files changed, 26 insertions(+), 50 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 07e2dbf0d..f647b2a21 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -59,27 +59,3 @@ jobs: - name: Run VM tests run: dart test --platform vm if: always() && steps.install.outcome == 'success' - - # Run tests on a legacy SDK on a matrix consisting of two dimensions: - # 1. OS: ubuntu-latest, (macos-latest, windows-latest) - # 2. release: 2.1.0 - test_legacy_sdk: - needs: analyze - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - # Add macos-latest and/or windows-latest if relevant for this package. - os: [ubuntu-latest] - sdk: [2.1.0] - steps: - - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 - with: - sdk: ${{ matrix.sdk }} - - id: install - name: Install dependencies - run: pub get - - name: Run VM tests - run: pub run test --platform vm - if: always() && steps.install.outcome == 'success' diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 766efa6f6..97bf11070 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,8 @@ +## 2.0.0-nullsafety.0 + +* Migrate to null safety. +* Require Dart >=2.12. + ## 1.0.6 * Require Dart >=2.1 diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index 301ce9d28..a42be3b9d 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -28,15 +28,13 @@ class TestProcess { /// A [StreamQueue] that emits each line of stdout from the process. /// - /// A copy of the underlying stream can be retreived using [stdoutStream]. - StreamQueue get stdout => _stdout; - StreamQueue _stdout; + /// A copy of the underlying stream can be retrieved using [stdoutStream]. + late final StreamQueue stdout = StreamQueue(stdoutStream()); /// A [StreamQueue] that emits each line of stderr from the process. /// - /// A copy of the underlying stream can be retreived using [stderrStream]. - StreamQueue get stderr => _stderr; - StreamQueue _stderr; + /// A copy of the underlying stream can be retrieved using [stderrStream]. + late final StreamQueue stderr = StreamQueue(stderrStream()); /// A splitter that can emit new copies of [stdout]. final StreamSplitter _stdoutSplitter; @@ -48,7 +46,7 @@ class TestProcess { IOSink get stdin => _process.stdin; /// A buffer of mixed stdout and stderr lines. - final _log = []; + final List _log = []; /// Whether [_log] has been passed to [printOnFailure] yet. bool _loggedOutput = false; @@ -62,8 +60,9 @@ class TestProcess { /// Completes to [_process]'s exit code if it's exited, otherwise completes to /// `null` immediately. - Future get _exitCodeOrNull async => - await exitCode.timeout(Duration.zero, onTimeout: () => null); + Future get _exitCodeOrNull async => await exitCode + .then((value) => value) + .timeout(Duration.zero, onTimeout: () => null); /// Starts a process. /// @@ -79,12 +78,12 @@ class TestProcess { /// temporarily to help when debugging test failures. static Future start( String executable, Iterable arguments, - {String workingDirectory, - Map environment, + {String? workingDirectory, + Map? environment, bool includeParentEnvironment = true, bool runInShell = false, - String description, - Encoding encoding, + String? description, + Encoding encoding = utf8, bool forwardStdio = false}) async { var process = await Process.start(executable, arguments.toList(), workingDirectory: workingDirectory, @@ -99,7 +98,6 @@ class TestProcess { description = "$humanExecutable ${arguments.join(" ")}"; } - encoding ??= utf8; return TestProcess(process, description, encoding: encoding, forwardStdio: forwardStdio); } @@ -112,7 +110,7 @@ class TestProcess { /// This is protected, which means it should only be called by subclasses. @protected TestProcess(Process process, this.description, - {Encoding encoding, bool forwardStdio = false}) + {Encoding encoding= utf8, bool forwardStdio = false}) : _process = process, _stdoutSplitter = StreamSplitter(process.stdout .transform(encoding.decoder) @@ -124,9 +122,6 @@ class TestProcess { expect(_process.exitCode.then((_) => _logOutput()), completes, reason: 'Process `$description` never exited.'); - _stdout = StreamQueue(stdoutStream()); - _stderr = StreamQueue(stderrStream()); - // Listen eagerly so that the lines are interleaved properly between the two // streams. // diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 19e80f7d3..772b97de5 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,18 +1,18 @@ name: test_process -version: 1.0.6-dev +version: 2.0.0 description: A package for testing subprocesses. homepage: https://github.com/dart-lang/test_process environment: - sdk: '>=2.1.0 <3.0.0' + sdk: ">=2.12.0-0 <3.0.0" dependencies: - async: ^2.0.0 - meta: ^1.0.0 - path: ^1.0.0 - test: ^1.0.0 + async: ^2.5.0 + meta: ^1.3.0 + path: ^1.8.0 + test: ^1.16.0 dev_dependencies: - pedantic: ^1.0.0 - test_descriptor: ^1.0.0 + pedantic: ^1.10.0 + test_descriptor: ^2.0.0 From 85e2d473f255b6604eede7f6c3cd15c782507b96 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Wed, 17 Feb 2021 15:35:39 -0800 Subject: [PATCH 23/65] Prepare to publish (dart-lang/test_process#24) Fix the version in the changelog and remove redundant entry. Migrating to null safety implies changing the SDK constraint. --- pkgs/test_process/CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 97bf11070..3fcbbe9aa 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,7 +1,6 @@ -## 2.0.0-nullsafety.0 +## 2.0.0 * Migrate to null safety. -* Require Dart >=2.12. ## 1.0.6 From 0009318dac249182852f7963d6d93c301c4383ea Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sun, 21 Mar 2021 11:32:03 -0700 Subject: [PATCH 24/65] Fix formatting (dart-lang/test_process#25) --- pkgs/test_process/lib/test_process.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index a42be3b9d..be8efc729 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -110,7 +110,7 @@ class TestProcess { /// This is protected, which means it should only be called by subclasses. @protected TestProcess(Process process, this.description, - {Encoding encoding= utf8, bool forwardStdio = false}) + {Encoding encoding = utf8, bool forwardStdio = false}) : _process = process, _stdoutSplitter = StreamSplitter(process.stdout .transform(encoding.decoder) From db948facdbabecb79feb7112d7e62a0501f01ebf Mon Sep 17 00:00:00 2001 From: Franklin Yow <58489007+franklinyow@users.noreply.github.com> Date: Thu, 1 Apr 2021 14:51:31 -0700 Subject: [PATCH 25/65] Update LICENSE Changes to comply with internal review --- pkgs/test_process/LICENSE | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/LICENSE b/pkgs/test_process/LICENSE index 389ce9856..aa86769bc 100644 --- a/pkgs/test_process/LICENSE +++ b/pkgs/test_process/LICENSE @@ -1,4 +1,5 @@ -Copyright 2017, the Dart project authors. All rights reserved. +Copyright 2017, the Dart project authors. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -9,7 +10,7 @@ met: copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. From a9c8cc93a196ba92c095c82d2fccf07486317813 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 5 Jun 2021 12:53:36 -0700 Subject: [PATCH 26/65] Add dependabot --- pkgs/test_process/.github/dependabot.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 pkgs/test_process/.github/dependabot.yml diff --git a/pkgs/test_process/.github/dependabot.yml b/pkgs/test_process/.github/dependabot.yml new file mode 100644 index 000000000..430a85e7d --- /dev/null +++ b/pkgs/test_process/.github/dependabot.yml @@ -0,0 +1,11 @@ +# Set update schedule for GitHub Actions +# See https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot + +version: 2 +updates: + +- package-ecosystem: "github-actions" + directory: "/" + schedule: + # Check for updates to GitHub Actions every weekday + interval: "daily" From 1be472ced702130f1aca146d2a2e914a00512f44 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 5 Jun 2021 12:58:09 -0700 Subject: [PATCH 27/65] Bump dart-lang/setup-dart from 0.3 to 1 (dart-lang/test_process#27) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 0.3 to 1. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/v0.3...v1) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index f647b2a21..cc35e56ee 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 + - uses: dart-lang/setup-dart@v1 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@v2 - - uses: dart-lang/setup-dart@v0.3 + - uses: dart-lang/setup-dart@v1 with: sdk: ${{ matrix.sdk }} - id: install From 970bd6b048e7dee4be86ed3ec694a8f68a9d4196 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Sat, 5 Jun 2021 13:06:01 -0700 Subject: [PATCH 28/65] Update test-package.yml (dart-lang/test_process#28) --- pkgs/test_process/.github/workflows/test-package.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index cc35e56ee..f5204810e 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [dev] + sdk: [2.12.0, dev] steps: - uses: actions/checkout@v2 - uses: dart-lang/setup-dart@v1 From f093373ab22dd8711813e53f99989114dbf89b48 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Sun, 4 Jul 2021 14:56:53 -0700 Subject: [PATCH 29/65] Update 'meta' constraint to '>=1.3.0 <3.0.0'. --- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 3fcbbe9aa..bb9e68462 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.1 + +* Update `meta` constraint to `>=1.3.0 <3.0.0`. + ## 2.0.0 * Migrate to null safety. diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 772b97de5..e9f384a86 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 2.0.0 +version: 2.0.1 description: A package for testing subprocesses. homepage: https://github.com/dart-lang/test_process @@ -9,7 +9,7 @@ environment: dependencies: async: ^2.5.0 - meta: ^1.3.0 + meta: '>=1.3.0 <3.0.0' path: ^1.8.0 test: ^1.16.0 From c18144e70c0096c0f33104520c12c3f7fe41e6e3 Mon Sep 17 00:00:00 2001 From: Konstantin Shcheglov Date: Wed, 7 Jul 2021 10:36:05 -0700 Subject: [PATCH 30/65] Revert to 'meta: ^1.3.0'. --- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/pubspec.yaml | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index bb9e68462..adf96057f 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.2 + +* Reverted `meta` constraint to `^1.3.0`. + ## 2.0.1 * Update `meta` constraint to `>=1.3.0 <3.0.0`. diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index e9f384a86..7901d001a 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 2.0.1 +version: 2.0.2 description: A package for testing subprocesses. homepage: https://github.com/dart-lang/test_process @@ -9,7 +9,7 @@ environment: dependencies: async: ^2.5.0 - meta: '>=1.3.0 <3.0.0' + meta: ^1.3.0 path: ^1.8.0 test: ^1.16.0 From 46edede2d5dd54b3c09c23cc290f71635e3a47f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 2 Mar 2022 06:44:04 -0800 Subject: [PATCH 31/65] Bump actions/checkout from 2 to 3 (dart-lang/test_process#32) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index f5204810e..771cf1af5 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.12.0, dev] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dart-lang/setup-dart@v1 with: sdk: ${{ matrix.sdk }} From a0f1aaa3eef3b658c3502de11cd64b897a8c0a33 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Tue, 3 May 2022 11:08:58 -0700 Subject: [PATCH 32/65] populate the repository field --- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/README.md | 4 ++++ pkgs/test_process/pubspec.yaml | 5 ++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index adf96057f..2ee2a662b 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.0.3-dev + +* Populate the pubspec `repository` field. + ## 2.0.2 * Reverted `meta` constraint to `^1.3.0`. diff --git a/pkgs/test_process/README.md b/pkgs/test_process/README.md index f0ff486ea..4ff6c906d 100644 --- a/pkgs/test_process/README.md +++ b/pkgs/test_process/README.md @@ -1,3 +1,7 @@ +[![Dart CI](https://github.com/dart-lang/test_process/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/test_process/actions/workflows/test-package.yml) +[![pub package](https://img.shields.io/pub/v/test_process.svg)](https://pub.dev/packages/test_process) +[![package publisher](https://img.shields.io/pub/publisher/test_process.svg)](https://pub.dev/packages/test_process/publisher) + A package for testing subprocesses. This exposes a [`TestProcess`][TestProcess] class that wraps `dart:io`'s diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 7901d001a..b9519fd99 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,8 +1,7 @@ name: test_process -version: 2.0.2 - +version: 2.0.3-dev description: A package for testing subprocesses. -homepage: https://github.com/dart-lang/test_process +repository: https://github.com/dart-lang/test_process environment: sdk: ">=2.12.0-0 <3.0.0" From 0f25fbff5d295b39ecc25d7109e2d3b108601fed Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Mon, 3 Oct 2022 14:49:59 -0700 Subject: [PATCH 33/65] Update lints, require latest Dart SDK, prepare to release v2.0.3 (dart-lang/test_process#34) Also add an example and fix the format and behavior of examples in readme.md --- pkgs/test_process/.github/dependabot.yml | 2 +- .../.github/workflows/test-package.yml | 10 ++-- pkgs/test_process/CHANGELOG.md | 31 ++++++----- pkgs/test_process/README.md | 16 +++--- pkgs/test_process/analysis_options.yaml | 55 +++++++------------ pkgs/test_process/example/example.dart | 26 +++++++++ pkgs/test_process/lib/test_process.dart | 12 ++-- pkgs/test_process/pubspec.yaml | 9 +-- 8 files changed, 89 insertions(+), 72 deletions(-) create mode 100644 pkgs/test_process/example/example.dart diff --git a/pkgs/test_process/.github/dependabot.yml b/pkgs/test_process/.github/dependabot.yml index 430a85e7d..d5262beb1 100644 --- a/pkgs/test_process/.github/dependabot.yml +++ b/pkgs/test_process/.github/dependabot.yml @@ -8,4 +8,4 @@ updates: directory: "/" schedule: # Check for updates to GitHub Actions every weekday - interval: "daily" + interval: "monthly" diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 771cf1af5..717fd92fa 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,8 +22,8 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1 + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - id: install @@ -47,10 +47,10 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.12.0, dev] + sdk: [2.17.0, dev] steps: - - uses: actions/checkout@v3 - - uses: dart-lang/setup-dart@v1 + - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} - id: install diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 2ee2a662b..68b88b1d7 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,53 +1,56 @@ -## 2.0.3-dev +## 2.0.3 -* Populate the pubspec `repository` field. +- Populate the pubspec `repository` field. +- Fixed examples in `readme.md`. +- Added `example/example.dart` +- Require Dart >=2.17 ## 2.0.2 -* Reverted `meta` constraint to `^1.3.0`. +- Reverted `meta` constraint to `^1.3.0`. ## 2.0.1 -* Update `meta` constraint to `>=1.3.0 <3.0.0`. +- Update `meta` constraint to `>=1.3.0 <3.0.0`. ## 2.0.0 -* Migrate to null safety. +- Migrate to null safety. ## 1.0.6 -* Require Dart >=2.1 +- Require Dart >=2.1 ## 1.0.5 -* Don't allow the test to time out as long as the process is emitting output. +- Don't allow the test to time out as long as the process is emitting output. ## 1.0.4 -* Set max SDK version to `<3.0.0`, and adjust other dependencies. +- Set max SDK version to `<3.0.0`, and adjust other dependencies. ## 1.0.3 -* Support test `1.x.x`. +- Support test `1.x.x`. ## 1.0.2 -* Update SDK version to 2.0.0-dev.17.0 +- Update SDK version to 2.0.0-dev.17.0 ## 1.0.1 -* Declare support for `async` 2.0.0. +- Declare support for `async` 2.0.0. ## 1.0.0 -* Added `pid` and `exitCode` getters to `TestProcess`. +- Added `pid` and `exitCode` getters to `TestProcess`. ## 1.0.0-rc.2 -* Subclassed `TestProcess`es now emit log output based on the superclass's +- Subclassed `TestProcess`es now emit log output based on the superclass's standard IO streams rather than the subclass's. This matches the documented behavior. ## 1.0.0-rc.1 -* Initial release candidate. +- Initial release candidate. diff --git a/pkgs/test_process/README.md b/pkgs/test_process/README.md index 4ff6c906d..6fa42d2c8 100644 --- a/pkgs/test_process/README.md +++ b/pkgs/test_process/README.md @@ -30,19 +30,19 @@ import 'package:test/test.dart'; import 'package:test_process/test_process.dart'; void main() { - test("pub get gets dependencies", () async { + test('pub get gets dependencies', () async { // TestProcess.start() works just like Process.start() from dart:io. - var process = await TestProcess.start("pub", ["get"]); + var process = await TestProcess.start('dart', ['pub', 'get']); // StreamQueue.next returns the next line emitted on standard out. var firstLine = await process.stdout.next; - expect(firstLine, equals("Resolving dependencies...")); + expect(firstLine, equals('Resolving dependencies...')); // Each call to StreamQueue.next moves one line further. String next; do { next = await process.stdout.next; - } while (next != "Got dependencies!"); + } while (next != 'Got dependencies!'); // Assert that the process exits with code 0. await process.shouldExit(0); @@ -61,16 +61,16 @@ import 'package:test/test.dart'; import 'package:test_process/test_process.dart'; void main() { - test("pub get gets dependencies", () async { - var process = await TestProcess.start("pub", ["get"]); + test('pub get gets dependencies', () async { + var process = await TestProcess.start('dart', ['pub', 'get']); // Each stream matcher will consume as many lines as it matches from a // StreamQueue, and no more, so it's safe to use them in sequence. - await expectLater(process.stdout, emits("Resolving dependencies...")); + await expectLater(process.stdout, emits('Resolving dependencies...')); // The emitsThrough matcher matches and consumes any number of lines, as // long as they end with one matching the argument. - await expectLater(process.stdout, emitsThrough("Got dependencies!")); + await expectLater(process.stdout, emitsThrough('Got dependencies!')); await process.shouldExit(0); }); diff --git a/pkgs/test_process/analysis_options.yaml b/pkgs/test_process/analysis_options.yaml index 0711acad5..8f13782ec 100644 --- a/pkgs/test_process/analysis_options.yaml +++ b/pkgs/test_process/analysis_options.yaml @@ -1,43 +1,30 @@ -include: package:pedantic/analysis_options.yaml +include: package:lints/recommended.yaml + analyzer: - strong-mode: - implicit-casts: false + language: + strict-casts: true + strict-inference: true + strict-raw-types: true + linter: rules: - - avoid_empty_else - - avoid_init_to_null - - avoid_null_checks_in_equality_operators + - always_declare_return_types - avoid_unused_constructor_parameters - - await_only_futures - - camel_case_types - cancel_subscriptions - - constant_identifier_names - - control_flow_in_finally - directives_ordering - - empty_catches - - empty_constructor_bodies - - empty_statements - - hash_and_equals - - implementation_imports - - iterable_contains_unrelated_type - - library_names - - library_prefixes - - list_remove_unrelated_type - - non_constant_identifier_names - - overridden_fields + - lines_longer_than_80_chars + - literal_only_boolean_expressions + - missing_whitespace_between_adjacent_strings + - no_adjacent_strings_in_list + - no_runtimeType_toString + - omit_local_variable_types - package_api_docs - - package_names - - package_prefixed_library_names - - prefer_equal_for_default_values - - prefer_final_fields - - prefer_generic_function_type_aliases - - prefer_is_not_empty - - slash_for_doc_comments + - prefer_relative_imports + - prefer_single_quotes - test_types_in_equals - throw_in_finally - - type_init_formals - - unnecessary_brace_in_string_interps - - unnecessary_const - - unnecessary_new - - unrelated_type_equality_checks - - valid_regexps + - type_annotate_public_apis + - unawaited_futures + - unnecessary_await_in_return + - unnecessary_lambdas + - use_super_parameters diff --git a/pkgs/test_process/example/example.dart b/pkgs/test_process/example/example.dart new file mode 100644 index 000000000..22175f470 --- /dev/null +++ b/pkgs/test_process/example/example.dart @@ -0,0 +1,26 @@ +// Copyright (c) 2022, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +import 'package:test/test.dart'; +import 'package:test_process/test_process.dart'; + +void main() { + test('pub get gets dependencies', () async { + // TestProcess.start() works just like Process.start() from dart:io. + var process = await TestProcess.start('dart', ['pub', 'get']); + + // StreamQueue.next returns the next line emitted on standard out. + var firstLine = await process.stdout.next; + expect(firstLine, equals('Resolving dependencies...')); + + // Each call to StreamQueue.next moves one line further. + String next; + do { + next = await process.stdout.next; + } while (next != 'Got dependencies!'); + + // Assert that the process exits with code 0. + await process.shouldExit(0); + }); +} diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index be8efc729..0d4e1934a 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -60,7 +60,7 @@ class TestProcess { /// Completes to [_process]'s exit code if it's exited, otherwise completes to /// `null` immediately. - Future get _exitCodeOrNull async => await exitCode + Future get _exitCodeOrNull => exitCode .then((value) => value) .timeout(Duration.zero, onTimeout: () => null); @@ -141,7 +141,7 @@ class TestProcess { } /// A callback that's run when the test completes. - Future _tearDown() async { + Future _tearDown() async { // If the process is already dead, do nothing. if (await _exitCodeOrNull != null) return; @@ -153,7 +153,7 @@ class TestProcess { } /// Formats the contents of [_log] and passes them to [printOnFailure]. - Future _logOutput() async { + Future _logOutput() async { if (_loggedOutput) return; _loggedOutput = true; @@ -161,7 +161,7 @@ class TestProcess { // Wait a timer tick to ensure that all available lines have been flushed to // [_log]. - await Future.delayed(Duration.zero); + await Future.delayed(Duration.zero); var buffer = StringBuffer(); buffer.write('Process `$description` '); @@ -212,7 +212,7 @@ class TestProcess { /// future that completes once it's dead. /// /// If this is called after the process is already dead, it does nothing. - Future kill() async { + Future kill() async { _process.kill(ProcessSignal.sigkill); await exitCode; } @@ -222,7 +222,7 @@ class TestProcess { /// /// If this is called after the process is already dead, it verifies its /// existing exit code. - Future shouldExit([expectedExitCode]) async { + Future shouldExit([Object? expectedExitCode]) async { var exitCode = await this.exitCode; if (expectedExitCode == null) return; expect(exitCode, expectedExitCode, diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index b9519fd99..e4ace9869 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,10 +1,11 @@ name: test_process -version: 2.0.3-dev -description: A package for testing subprocesses. +version: 2.0.3 +description: + "Test processes: starting; validating stdout and stderr; checking exit code" repository: https://github.com/dart-lang/test_process environment: - sdk: ">=2.12.0-0 <3.0.0" + sdk: ">=2.17.0 <3.0.0" dependencies: async: ^2.5.0 @@ -13,5 +14,5 @@ dependencies: test: ^1.16.0 dev_dependencies: - pedantic: ^1.10.0 + lints: ^2.0.0 test_descriptor: ^2.0.0 From 56019d8c7b561788107d622f173dbcf03adca23b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Nov 2022 08:02:40 -0700 Subject: [PATCH 34/65] Bump actions/checkout from 3.0.2 to 3.1.0 (dart-lang/test_process#36) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.1.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/2541b1294d2704b0964813337f33b291d3f8596b...93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 717fd92fa..23f477b86 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} From 8008c373b9de4acdc49492cdcc11f983bdef3f3c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Jan 2023 11:04:21 -0800 Subject: [PATCH 35/65] Bump actions/checkout from 3.1.0 to 3.2.0 (dart-lang/test_process#37) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 3.2.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8...755da8c3cf115ac066823e79a1e1788f8940201b) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 23f477b86..51b356995 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d with: sdk: ${{ matrix.sdk }} From 574f8fd0650fd07af2418da07bfaf8f542e4a2d8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 07:18:53 -0800 Subject: [PATCH 36/65] Bump dart-lang/setup-dart from 1.3 to 1.4 (dart-lang/test_process#39) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.3 to 1.4. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/6a218f2413a3e78e9087f638a238f6b40893203d...a57a6c04cf7d4840e88432aad6281d1e125f0d46) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 51b356995..a799a8c6d 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.17.0, dev] steps: - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b - - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} - id: install From 2c8734c569f9402e85300e92be8460ab9ddafc69 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Feb 2023 07:22:13 -0800 Subject: [PATCH 37/65] Bump actions/checkout from 3.2.0 to 3.3.0 (dart-lang/test_process#38) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.2.0 to 3.3.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/755da8c3cf115ac066823e79a1e1788f8940201b...ac593985615ec2ede58e132d2e21d2b1cbd6127c) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index a799a8c6d..2f683bc3c 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b + - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} From 1043384a387eb09ca5d94caa42bb6b07f0dfcaf5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 13:17:34 -0700 Subject: [PATCH 38/65] Bump actions/checkout from 3.3.0 to 3.5.0 (dart-lang/test_process#41) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.3.0 to 3.5.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/ac593985615ec2ede58e132d2e21d2b1cbd6127c...8f4b7f84864484a7bf31766abe9204da3cbe65b3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 2f683bc3c..e148dc40c 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c + - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 with: sdk: ${{ matrix.sdk }} From 7ee454f2d0624c9241fb1f97677959958810cb43 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Apr 2023 13:23:17 -0700 Subject: [PATCH 39/65] Bump dart-lang/setup-dart from 1.4.0 to 1.5.0 (dart-lang/test_process#40) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/a57a6c04cf7d4840e88432aad6281d1e125f0d46...d6a63dab3335f427404425de0fbfed4686d93c4f) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index e148dc40c..183721f54 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.17.0, dev] steps: - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 - - uses: dart-lang/setup-dart@a57a6c04cf7d4840e88432aad6281d1e125f0d46 + - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} - id: install From 1bc8f84d9571b30070ff3c1e6b20c011341cc100 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 May 2023 08:46:43 -0700 Subject: [PATCH 40/65] Bump actions/checkout from 3.5.0 to 3.5.2 (dart-lang/test_process#42) Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.0 to 3.5.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/8f4b7f84864484a7bf31766abe9204da3cbe65b3...8e5e7e5ab8b370d6c329ec480221332ada57f0ab) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 183721f54..3611e3ed0 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 504c31e57d3bb2ed9eac884b4636a07e17934e11 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Mon, 15 May 2023 13:38:01 -0700 Subject: [PATCH 41/65] Remove expectation of process exit in test body (dart-lang/test_process#43) Closes dart-lang/test_process#31 This check does not seem to serve a useful purpose - most tests which care about the process existing will already be using `shouldExit`. Since we have a `kill` in the teardown, we may as well not force the test to timeout before hitting it. --- pkgs/test_process/CHANGELOG.md | 6 ++++++ pkgs/test_process/lib/test_process.dart | 4 ++-- pkgs/test_process/pubspec.yaml | 2 +- pkgs/test_process/test/test_process_test.dart | 7 +++++++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 68b88b1d7..107854767 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,9 @@ +## 2.1.0-wip + +- Remove the expectation that the process exits during the normal test body. + The process will still be killed during teardown if it has not exited. The + check can be manually restored with `shouldExit()`. + ## 2.0.3 - Populate the pubspec `repository` field. diff --git a/pkgs/test_process/lib/test_process.dart b/pkgs/test_process/lib/test_process.dart index 0d4e1934a..0441fb114 100644 --- a/pkgs/test_process/lib/test_process.dart +++ b/pkgs/test_process/lib/test_process.dart @@ -119,8 +119,8 @@ class TestProcess { .transform(encoding.decoder) .transform(const LineSplitter())) { addTearDown(_tearDown); - expect(_process.exitCode.then((_) => _logOutput()), completes, - reason: 'Process `$description` never exited.'); + + _process.exitCode.whenComplete(_logOutput); // Listen eagerly so that the lines are interleaved properly between the two // streams. diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index e4ace9869..149e16527 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 2.0.3 +version: 2.1.0-wip description: "Test processes: starting; validating stdout and stderr; checking exit code" repository: https://github.com/dart-lang/test_process diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index 20dcc87ee..a1a352a50 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -107,6 +107,13 @@ void main() { await expectLater(process.stdout, emits('HUP')); await process.kill(); }, testOn: '!windows'); + + test('allows a long-running process', () async { + await startDartProcess(r''' + await Future.delayed(Duration(minutes: 10)); + '''); + // Test should not time out. + }); } /// Starts a Dart process running [script] in a main method. From 253895bab6336b79bfcc93cb4421acab898d6039 Mon Sep 17 00:00:00 2001 From: Nate Bosch Date: Tue, 16 May 2023 15:33:57 -0700 Subject: [PATCH 42/65] Prepare to publish (dart-lang/test_process#44) --- pkgs/test_process/CHANGELOG.md | 2 +- pkgs/test_process/pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 107854767..01ab61cb6 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,4 +1,4 @@ -## 2.1.0-wip +## 2.1.0 - Remove the expectation that the process exits during the normal test body. The process will still be killed during teardown if it has not exited. The diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 149e16527..492d17ec3 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,5 +1,5 @@ name: test_process -version: 2.1.0-wip +version: 2.1.0 description: "Test processes: starting; validating stdout and stderr; checking exit code" repository: https://github.com/dart-lang/test_process From 3be0859c62a389c138393bd59e8f7ac6933fbcec Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Mon, 22 May 2023 16:23:27 -0700 Subject: [PATCH 43/65] blast_repo fixes (dart-lang/test_process#45) dependabot --- pkgs/test_process/.github/dependabot.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/test_process/.github/dependabot.yml b/pkgs/test_process/.github/dependabot.yml index d5262beb1..c84404dc9 100644 --- a/pkgs/test_process/.github/dependabot.yml +++ b/pkgs/test_process/.github/dependabot.yml @@ -4,8 +4,9 @@ version: 2 updates: -- package-ecosystem: "github-actions" - directory: "/" +- package-ecosystem: github-actions + directory: / schedule: - # Check for updates to GitHub Actions every weekday - interval: "monthly" + interval: monthly + labels: + - autosubmit From c587b2620edda1b3d63cfe37b79a7f5dc1f02f61 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jul 2023 13:00:27 +0000 Subject: [PATCH 44/65] Bump actions/checkout from 3.5.2 to 3.5.3 (dart-lang/test_process#46) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
Release notes

Sourced from actions/checkout's releases.

v3.5.3

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v3.5.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

v2.3.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.2&new-version=3.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 3611e3ed0..dbb66c88b 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab + - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 90885fd6c72428581a4a466e0f39af1f3037fe41 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Sep 2023 12:57:12 +0000 Subject: [PATCH 45/65] Bump actions/checkout from 3.5.3 to 3.6.0 (dart-lang/test_process#47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.3 to 3.6.0.
Release notes

Sourced from actions/checkout's releases.

v3.6.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3.5.3...v3.6.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

v3.0.1

v3.0.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.5.3&new-version=3.6.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index dbb66c88b..7a50c8b19 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From 910e11ff80f55e767c4f0138ec3d1216d6d6e6c4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 12:59:35 +0000 Subject: [PATCH 46/65] Bump actions/checkout from 3.6.0 to 4.1.0 (dart-lang/test_process#49) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 3.6.0 to 4.1.0.
Release notes

Sourced from actions/checkout's releases.

v4.1.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.0.0...v4.1.0

v4.0.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v3...v4.0.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

v3.1.0

v3.0.2

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3.6.0&new-version=4.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 7a50c8b19..30072f6be 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 + - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: sdk: ${{ matrix.sdk }} From ab7c369304116b0d59fc2e52d52e5eeaacd0a090 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 2 Oct 2023 20:58:27 -0700 Subject: [PATCH 47/65] Bump dart-lang/setup-dart from 1.5.0 to 1.5.1 (dart-lang/test_process#48) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.0 to 1.5.1. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/d6a63dab3335f427404425de0fbfed4686d93c4f...8a4b97ea2017cc079571daec46542f76189836b1) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 30072f6be..6b0bfa5ad 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.17.0, dev] steps: - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 - - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f + - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} - id: install From f4aba7074b1699576aeac5fd826e7d98cc97e2c1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 12:17:08 +0000 Subject: [PATCH 48/65] Bump actions/checkout from 4.1.0 to 4.1.1 (dart-lang/test_process#50) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.0 to 4.1.1.
Release notes

Sourced from actions/checkout's releases.

v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.0...v4.1.1

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.0&new-version=4.1.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 6b0bfa5ad..872aa0b74 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [2.17.0, dev] steps: - - uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 + - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 with: sdk: ${{ matrix.sdk }} From a23c763e8c21eb909ab7d3e74692458060bedaaa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Nov 2023 07:17:59 -0700 Subject: [PATCH 49/65] Bump dart-lang/setup-dart from 1.5.1 to 1.6.0 (dart-lang/test_process#51) Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.5.1 to 1.6.0. - [Release notes](https://github.com/dart-lang/setup-dart/releases) - [Changelog](https://github.com/dart-lang/setup-dart/blob/main/CHANGELOG.md) - [Commits](https://github.com/dart-lang/setup-dart/compare/8a4b97ea2017cc079571daec46542f76189836b1...b64355ae6ca0b5d484f0106a033dd1388965d06d) --- updated-dependencies: - dependency-name: dart-lang/setup-dart dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 872aa0b74..bfc487546 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [2.17.0, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@8a4b97ea2017cc079571daec46542f76189836b1 + - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d with: sdk: ${{ matrix.sdk }} - id: install From 09d29ba2721b73176614d9f4cd1fcc402b85e5dc Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Wed, 29 Nov 2023 10:23:33 -0800 Subject: [PATCH 50/65] Update lints, require Dart ^3.1 (dart-lang/test_process#52) --- .../.github/workflows/test-package.yml | 2 +- pkgs/test_process/CHANGELOG.md | 4 ++++ pkgs/test_process/analysis_options.yaml | 15 ++------------- pkgs/test_process/pubspec.yaml | 6 +++--- pkgs/test_process/test/test_process_test.dart | 3 +-- 5 files changed, 11 insertions(+), 19 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index bfc487546..487885e42 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -47,7 +47,7 @@ jobs: matrix: # Add macos-latest and/or windows-latest if relevant for this package. os: [ubuntu-latest] - sdk: [2.17.0, dev] + sdk: [3.1, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 01ab61cb6..72f17970c 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.1.1-wip + +* Require Dart 3.1. + ## 2.1.0 - Remove the expectation that the process exits during the normal test body. diff --git a/pkgs/test_process/analysis_options.yaml b/pkgs/test_process/analysis_options.yaml index 8f13782ec..0e3ff07df 100644 --- a/pkgs/test_process/analysis_options.yaml +++ b/pkgs/test_process/analysis_options.yaml @@ -1,4 +1,5 @@ -include: package:lints/recommended.yaml +# https://dart.dev/tools/analysis#the-analysis-options-file +include: package:dart_flutter_team_lints/analysis_options.yaml analyzer: language: @@ -8,23 +9,11 @@ analyzer: linter: rules: - - always_declare_return_types - avoid_unused_constructor_parameters - cancel_subscriptions - - directives_ordering - - lines_longer_than_80_chars - literal_only_boolean_expressions - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - omit_local_variable_types - package_api_docs - - prefer_relative_imports - - prefer_single_quotes - - test_types_in_equals - - throw_in_finally - - type_annotate_public_apis - - unawaited_futures - unnecessary_await_in_return - - unnecessary_lambdas - - use_super_parameters diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 492d17ec3..eac1a76ef 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,11 +1,11 @@ name: test_process -version: 2.1.0 +version: 2.1.1-wip description: "Test processes: starting; validating stdout and stderr; checking exit code" repository: https://github.com/dart-lang/test_process environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ^3.1.0 dependencies: async: ^2.5.0 @@ -14,5 +14,5 @@ dependencies: test: ^1.16.0 dev_dependencies: - lints: ^2.0.0 + dart_flutter_team_lints: ^2.0.0 test_descriptor: ^2.0.0 diff --git a/pkgs/test_process/test/test_process_test.dart b/pkgs/test_process/test/test_process_test.dart index a1a352a50..9cfb779a9 100644 --- a/pkgs/test_process/test/test_process_test.dart +++ b/pkgs/test_process/test/test_process_test.dart @@ -6,11 +6,10 @@ import 'dart:io'; import 'package:path/path.dart' as p; import 'package:test/test.dart'; - import 'package:test_descriptor/test_descriptor.dart' as d; import 'package:test_process/test_process.dart'; -final throwsTestFailure = throwsA(TypeMatcher()); +final throwsTestFailure = throwsA(isA()); void main() { group('shouldExit()', () { From 0ad978bc1a2d3ed73e24c95994577ea65f3af6ac Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:48:03 +0000 Subject: [PATCH 51/65] Bump dart-lang/setup-dart from 1.6.0 to 1.6.2 (dart-lang/test_process#53) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.0 to 1.6.2.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

v1.2.0

  • Fixed a path issue impacting git dependencies on Windows.

v1.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.0&new-version=1.6.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 487885e42..3eea68840 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.1, dev] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} - id: install From a631d7020d705585abfcc5aa567a46808eecd987 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 12:41:18 +0000 Subject: [PATCH 52/65] Bump actions/checkout from 4.1.1 to 4.1.2 (dart-lang/test_process#54) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
Release notes

Sourced from actions/checkout's releases.

v4.1.2

We are investigating the following issue with this release and have rolled-back the v4 tag to point to v4.1.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.1...v4.1.2

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

v3.3.0

v3.2.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.1&new-version=4.1.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 3eea68840..17517dc2c 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} From 1de697b22771814f1b2299ec7a94bc4a283728e6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:57:07 +0000 Subject: [PATCH 53/65] Bump actions/checkout from 4.1.2 to 4.1.4 (dart-lang/test_process#56) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.2 to 4.1.4.
Release notes

Sourced from actions/checkout's releases.

v4.1.4

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.3...v4.1.4

v4.1.3

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.2...v4.1.3

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

v3.5.0

v3.4.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.2&new-version=4.1.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 17517dc2c..0c7fd7a98 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 + - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: ${{ matrix.sdk }} From 731dff0fdf8ba59bb6f09b070872d263188065cc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 12:58:48 +0000 Subject: [PATCH 54/65] Bump dart-lang/setup-dart from 1.6.2 to 1.6.4 (dart-lang/test_process#55) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ⚠️ **Dependabot is rebasing this PR** ⚠️ Rebasing might not happen immediately, so don't worry if this takes some time. Note: if you make any changes to this PR yourself, they will take precedence over the rebase. --- Bumps [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart) from 1.6.2 to 1.6.4.
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.4

  • Rebuild JS code to include changes from v1.6.3

v1.6.3

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

  • Automatically create OIDC token for pub.dev.
  • Add a reusable workflow for publishing.

v1.3.0

  • The install location of the Dart SDK is now available

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.2&new-version=1.6.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 0c7fd7a98..c52d35e5e 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.1, dev] steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b - - uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} - id: install From 868150a6c8e4501779bc9369817966f32ee02739 Mon Sep 17 00:00:00 2001 From: Devon Carew Date: Fri, 10 May 2024 13:11:12 -0700 Subject: [PATCH 55/65] blast_repo fixes (dart-lang/test_process#57) dependabot --- pkgs/test_process/.github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/test_process/.github/dependabot.yml b/pkgs/test_process/.github/dependabot.yml index c84404dc9..a19a66adf 100644 --- a/pkgs/test_process/.github/dependabot.yml +++ b/pkgs/test_process/.github/dependabot.yml @@ -10,3 +10,7 @@ updates: interval: monthly labels: - autosubmit + groups: + github-actions: + patterns: + - "*" From f2eb7c3dd0301ae148410912e62dc13386647232 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 20:21:33 +0000 Subject: [PATCH 56/65] Bump actions/checkout from 4.1.4 to 4.1.5 in the github-actions group (dart-lang/test_process#58) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.4 to 4.1.5
Release notes

Sourced from actions/checkout's releases.

v4.1.5

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.4...v4.1.5

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.4&new-version=4.1.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index c52d35e5e..5c7f334cd 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b + - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From 571b067f6f864180dfedb41621122427d3a18bcc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 1 Jun 2024 12:38:25 +0000 Subject: [PATCH 57/65] Bump actions/checkout from 4.1.5 to 4.1.6 in the github-actions group (dart-lang/test_process#59) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.5 to 4.1.6
Release notes

Sourced from actions/checkout's releases.

v4.1.6

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.1.5...v4.1.6

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

v3.5.2

v3.5.1

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.5&new-version=4.1.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 5c7f334cd..c9ebe45e3 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b + - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 with: sdk: ${{ matrix.sdk }} From e2395fbbf3978f081748eeeb220d75985e0731a9 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Fri, 21 Jun 2024 16:21:34 -0700 Subject: [PATCH 58/65] update lints (dart-lang/test_process#60) --- pkgs/test_process/pubspec.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index eac1a76ef..c2445601d 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -11,8 +11,8 @@ dependencies: async: ^2.5.0 meta: ^1.3.0 path: ^1.8.0 - test: ^1.16.0 + test: ^1.16.6 dev_dependencies: - dart_flutter_team_lints: ^2.0.0 + dart_flutter_team_lints: ^3.0.0 test_descriptor: ^2.0.0 From 922e52c3920e589f3010b5ef8bfbd1d6c9722c17 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 12:13:11 +0000 Subject: [PATCH 59/65] Bump the github-actions group with 2 updates (dart-lang/test_process#61) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 2 updates: [actions/checkout](https://github.com/actions/checkout) and [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `actions/checkout` from 4.1.6 to 4.1.7
Release notes

Sourced from actions/checkout's releases.

v4.1.7

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.6...v4.1.7

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

v3.5.3

... (truncated)

Commits

Updates `dart-lang/setup-dart` from 1.6.4 to 1.6.5
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.6.5

dart-lang/test_process#118: dart-lang/setup-dartdart-lang/test_process#118

Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.6.5

dart-lang/test_process#118: dart-lang/setup-dartdart-lang/test_process#118

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

  • Re-wrote the implementation of the action into Dart.
  • Auto-detect the platform architecture (x64, ia32, arm, arm64).
  • Improved the caching and download resilience of the sdk.
  • Added a new action output: dart-version - the installed version of the sdk.

v1.4.0

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_process/.github/workflows/test-package.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index c9ebe45e3..8f264bf5d 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,8 +22,8 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} - id: install @@ -49,8 +49,8 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 - - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} - id: install From bbad41ca5121b27fe9a07b3032b989acf2bb624b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 1 Oct 2024 12:28:00 +0000 Subject: [PATCH 60/65] Bump actions/checkout from 4.1.7 to 4.2.0 in the github-actions group (dart-lang/test_process#62) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.7 to 4.2.0
Release notes

Sourced from actions/checkout's releases.

v4.2.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.1.7...v4.2.0

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

v4.0.0

v3.6.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.1.7&new-version=4.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 8f264bf5d..55100b4b1 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 3a8f6fc1f3c00f370f95a624b90be17fa5b10b85 Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 29 Oct 2024 07:14:26 -0700 Subject: [PATCH 61/65] blast_repo fixes (dart-lang/test_process#63) This PR contains changes created by the blast repo tool. - `drop-lint` --- pkgs/test_process/analysis_options.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/pkgs/test_process/analysis_options.yaml b/pkgs/test_process/analysis_options.yaml index 0e3ff07df..5607754d7 100644 --- a/pkgs/test_process/analysis_options.yaml +++ b/pkgs/test_process/analysis_options.yaml @@ -15,5 +15,4 @@ linter: - missing_whitespace_between_adjacent_strings - no_adjacent_strings_in_list - no_runtimeType_toString - - package_api_docs - unnecessary_await_in_return From b30f011504db4efb2a92aab7c137baac8e2d4a29 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Nov 2024 12:17:05 +0000 Subject: [PATCH 62/65] Bump actions/checkout from 4.2.0 to 4.2.2 in the github-actions group (dart-lang/test_process#64) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.2.0 to 4.2.2
Release notes

Sourced from actions/checkout's releases.

v4.2.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.2.1...v4.2.2

v4.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.2.0...v4.2.1

Changelog

Sourced from actions/checkout's changelog.

Changelog

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

v4.1.2

v4.1.1

v4.1.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4.2.0&new-version=4.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index 55100b4b1..bf629dc45 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -22,7 +22,7 @@ jobs: matrix: sdk: [dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} @@ -49,7 +49,7 @@ jobs: os: [ubuntu-latest] sdk: [3.1, dev] steps: - - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 with: sdk: ${{ matrix.sdk }} From 200097bdc1b8f6f49c3ce609521a16212cd269c2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Dec 2024 12:11:04 +0000 Subject: [PATCH 63/65] Bump dart-lang/setup-dart in the github-actions group (dart-lang/test_process#65) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps the github-actions group with 1 update: [dart-lang/setup-dart](https://github.com/dart-lang/setup-dart). Updates `dart-lang/setup-dart` from 1.6.5 to 1.7.0
Release notes

Sourced from dart-lang/setup-dart's releases.

v1.7.0

What's Changed

  • Install a Flutter SDK in the publish workflow allowing for publication of flutter packages.
Changelog

Sourced from dart-lang/setup-dart's changelog.

v1.7.0

v1.6.5

dart-lang/test_process#118: dart-lang/setup-dartdart-lang/test_process#118

v1.6.4

  • Rebuild JS code.

v1.6.3

v1.6.2

v1.6.1

  • Updated the google storage url for main channel releases.

v1.6.0

  • Enable provisioning of the latest Dart SDK patch release by specifying just the major and minor version (e.g. 3.2).

v1.5.1

  • No longer test the setup-dart action on pre-2.12 SDKs.
  • Upgrade JS interop code to use extension types (the new name for inline classes).
  • The upcoming rename of the be channel to main is now supported with forward compatibility that switches when the rename happens.

v1.5.0

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dart-lang/setup-dart&package-manager=github_actions&previous-version=1.6.5&new-version=1.7.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
--- pkgs/test_process/.github/workflows/test-package.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/pkgs/test_process/.github/workflows/test-package.yml index bf629dc45..0fc848784 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/pkgs/test_process/.github/workflows/test-package.yml @@ -23,7 +23,7 @@ jobs: sdk: [dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 with: sdk: ${{ matrix.sdk }} - id: install @@ -50,7 +50,7 @@ jobs: sdk: [3.1, dev] steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: dart-lang/setup-dart@0a8a0fc875eb934c15d08629302413c671d3f672 + - uses: dart-lang/setup-dart@e630b99d28a3b71860378cafdc2a067c71107f94 with: sdk: ${{ matrix.sdk }} - id: install From c62a875b912add685c69a49492f60b7aaa2288ec Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 12 Dec 2024 14:12:32 +0100 Subject: [PATCH 64/65] Add issue template and other fixes --- .github/ISSUE_TEMPLATE/test_process.md | 5 ++++ pkgs/test_process/CONTRIBUTING.md | 33 -------------------------- pkgs/test_process/pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 34 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/test_process.md delete mode 100644 pkgs/test_process/CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/test_process.md b/.github/ISSUE_TEMPLATE/test_process.md new file mode 100644 index 000000000..9f492b8cb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/test_process.md @@ -0,0 +1,5 @@ +--- +name: "package:test_process" +about: "Create a bug or file a feature request against package:test_process." +labels: "package:test_process" +--- \ No newline at end of file diff --git a/pkgs/test_process/CONTRIBUTING.md b/pkgs/test_process/CONTRIBUTING.md deleted file mode 100644 index 6f5e0ea67..000000000 --- a/pkgs/test_process/CONTRIBUTING.md +++ /dev/null @@ -1,33 +0,0 @@ -Want to contribute? Great! First, read this page (including the small print at -the end). - -### Before you contribute -Before we can use your code, you must sign the -[Google Individual Contributor License Agreement](https://cla.developers.google.com/about/google-individual) -(CLA), which you can do online. The CLA is necessary mainly because you own the -copyright to your changes, even after your contribution becomes part of our -codebase, so we need your permission to use and distribute your code. We also -need to be sure of various other things—for instance that you'll tell us if you -know that your code infringes on other people's patents. You don't have to sign -the CLA until after you've submitted your code for review and a member has -approved it, but you must do it before we can put your code into our codebase. - -Before you start working on a larger contribution, you should get in touch with -us first through the issue tracker with your idea so that we can help out and -possibly guide you. Coordinating up front makes it much easier to avoid -frustration later on. - -### Code reviews -All submissions, including submissions by project members, require review. - -### File headers -All files in the project must start with the following header. - - // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file - // for details. All rights reserved. Use of this source code is governed by a - // BSD-style license that can be found in the LICENSE file. - -### The small print -Contributions made by corporations are covered by a different agreement than the -one above, the -[Software Grant and Corporate Contributor License Agreement](https://developers.google.com/open-source/cla/corporate). diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index c2445601d..12741baa9 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -2,7 +2,7 @@ name: test_process version: 2.1.1-wip description: "Test processes: starting; validating stdout and stderr; checking exit code" -repository: https://github.com/dart-lang/test_process +repository: https://github.com/dart-lang/test/tree/master/pkgs/test_process environment: sdk: ^3.1.0 From 754d970f785259958a71e721dbb85170c65c812d Mon Sep 17 00:00:00 2001 From: Moritz Date: Thu, 12 Dec 2024 14:20:22 +0100 Subject: [PATCH 65/65] Moving fixes --- .../workflows/test_process.yaml | 13 ++++++++++++- README.md | 1 + pkgs/test_process/.github/dependabot.yml | 16 ---------------- pkgs/test_process/CHANGELOG.md | 3 ++- pkgs/test_process/README.md | 2 +- pkgs/test_process/pubspec.yaml | 6 +++--- 6 files changed, 19 insertions(+), 22 deletions(-) rename pkgs/test_process/.github/workflows/test-package.yml => .github/workflows/test_process.yaml (86%) delete mode 100644 pkgs/test_process/.github/dependabot.yml diff --git a/pkgs/test_process/.github/workflows/test-package.yml b/.github/workflows/test_process.yaml similarity index 86% rename from pkgs/test_process/.github/workflows/test-package.yml rename to .github/workflows/test_process.yaml index 0fc848784..2c0da6de0 100644 --- a/pkgs/test_process/.github/workflows/test-package.yml +++ b/.github/workflows/test_process.yaml @@ -1,17 +1,28 @@ -name: Dart CI +name: package:test_process on: # Run on PRs and pushes to the default branch. push: branches: [ master ] + paths: + - '.github/workflows/test_process.yaml' + - 'pkgs/test_process/**' pull_request: branches: [ master ] + paths: + - '.github/workflows/test_process.yaml' + - 'pkgs/test_process/**' schedule: - cron: "0 0 * * 0" env: PUB_ENVIRONMENT: bot.github + +defaults: + run: + working-directory: pkgs/test_process/ + jobs: # Check code formatting and static analysis on a single OS (linux) # against Dart dev. diff --git a/README.md b/README.md index 25b50aab7..5b80a2811 100644 --- a/README.md +++ b/README.md @@ -22,3 +22,4 @@ literate API. | [test](pkgs/test/) | A full featured library for writing and running Dart tests across platforms. | [![pub package](https://img.shields.io/pub/v/test.svg)](https://pub.dev/packages/test) | | [test_api](pkgs/test_api/) | | [![pub package](https://img.shields.io/pub/v/test_api.svg)](https://pub.dev/packages/test_api) | | [test_core](pkgs/test_core/) | | [![pub package](https://img.shields.io/pub/v/test_core.svg)](https://pub.dev/packages/test_core) | +| [test_process](pkgs/test_process/) | Test processes: starting; validating stdout and stderr; checking exit code | [![pub package](https://img.shields.io/pub/v/test_process.svg)](https://pub.dev/packages/test_process) | diff --git a/pkgs/test_process/.github/dependabot.yml b/pkgs/test_process/.github/dependabot.yml deleted file mode 100644 index a19a66adf..000000000 --- a/pkgs/test_process/.github/dependabot.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Set update schedule for GitHub Actions -# See https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-actions-up-to-date-with-dependabot - -version: 2 -updates: - -- package-ecosystem: github-actions - directory: / - schedule: - interval: monthly - labels: - - autosubmit - groups: - github-actions: - patterns: - - "*" diff --git a/pkgs/test_process/CHANGELOG.md b/pkgs/test_process/CHANGELOG.md index 72f17970c..b2672905b 100644 --- a/pkgs/test_process/CHANGELOG.md +++ b/pkgs/test_process/CHANGELOG.md @@ -1,6 +1,7 @@ -## 2.1.1-wip +## 2.1.1 * Require Dart 3.1. +* Move to `dart-lang/test` monorepo. ## 2.1.0 diff --git a/pkgs/test_process/README.md b/pkgs/test_process/README.md index 6fa42d2c8..0d4e5f510 100644 --- a/pkgs/test_process/README.md +++ b/pkgs/test_process/README.md @@ -1,4 +1,4 @@ -[![Dart CI](https://github.com/dart-lang/test_process/actions/workflows/test-package.yml/badge.svg)](https://github.com/dart-lang/test_process/actions/workflows/test-package.yml) +[![Build Status](https://github.com/dart-lang/test/actions/workflows/test_process.yaml/badge.svg)](https://github.com/dart-lang/test/actions/workflows/test_process.yaml) [![pub package](https://img.shields.io/pub/v/test_process.svg)](https://pub.dev/packages/test_process) [![package publisher](https://img.shields.io/pub/publisher/test_process.svg)](https://pub.dev/packages/test_process/publisher) diff --git a/pkgs/test_process/pubspec.yaml b/pkgs/test_process/pubspec.yaml index 12741baa9..60158d461 100644 --- a/pkgs/test_process/pubspec.yaml +++ b/pkgs/test_process/pubspec.yaml @@ -1,7 +1,7 @@ name: test_process -version: 2.1.1-wip -description: - "Test processes: starting; validating stdout and stderr; checking exit code" +version: 2.1.1 +description: | + Test processes: starting; validating stdout and stderr; checking exit code repository: https://github.com/dart-lang/test/tree/master/pkgs/test_process environment: