Commit graph

4 commits

Author SHA1 Message Date
Parker Lougheed cecb0cabd6 [bisect_dart] Enable further analysis for bisect_dart tool
I know this is just an unpublished tool, but enabling the expanded analysis at least makes the development experience consistent with other packages within `/pkg`.

Change-Id: Id4daf75cf37042662e3ab3c75dc4c4f856fd4099
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329864
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-10-24 16:21:14 +00:00
Daco Harkes 83d058e1ac [tool] bisect.dart fix prints
GitHub expects the "first" and "last" hash of a commit range the
other way around.
This fixes links when the output is pasted into GitHub issues.

Change-Id: I1c22490b69bc6bec9c0d65307ee80a6b15e96a6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322661
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-08-25 09:14:40 +00:00
Daco Harkes 8d0a93fd17 [tool] Add features to tools/bisect.dart
`-Dtest_command` is now a multi-argument, commands will be run in
sequence when multiple are passed.

The test commands now need to include the executable. Previous
invocations now need to be passed python3 in front of tools/test.py.

Both stdout and stderr from test commands are now taken into account
for matching on the error string.

The above changes enable bisecting failures other than tests failing
through test.py invocations such as:
https://github.com/dart-lang/sdk/issues/53267#issuecomment-1686528611

Change-Id: I4c3cb800b69e34a15c375f45a417bb2c28d9df8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322020
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2023-08-22 09:52:18 +00:00
Daco Harkes a08e829ff2 [tool] Bisection tool
A basic bisection script.

Currently only supports substring matching for detecting the error.
This was enough for three use cases today:

* https://github.com/dart-lang/sdk/issues/52910
* https://github.com/dart-lang/sdk/issues/52911
* https://github.com/dart-lang/sdk/issues/52912

Produces a concise output on standard out, and a very detailed log
with all process invocation results in `.dart_tool/bisect_dart`.

Usage: tools/bisect.dart -Dstart=23f41452 -Dend=2c97bd78 -Dtest_command="tools/test.py --build -n dartk-linux-debug-x64 lib_2/isolate/package_resolve_test" -Dfailure_string="Error: The argument type 'String' can't be assigned to the parameter type 'Uri'." -Dsdk_path=/usr/local/google/home/dacoharkes/dart-sdk/sdk/ -Dname=20230712_package_resolve_test

This script starts a bisection in the provided SDK path.

It will write logs to .dart_tool/bisect_dart/.

start          : The commit has at the start of the commit range.
end            : The commit has at the end of the commit range.
test_command   : The invocation of test.py.
                 This should include `--build`.
                 This should be within quotes when passed in terminal because of spaces.
failure_string : A string from the failing output.
                 Regexes are not yet supported.
                 This should be within quotes when passed in terminal when containing spaces.
sdk_path       : The SDK path is optional.
                 The SDK path defaults to the current working directory.
name           : The name is optional.
                 The name defaults to the current date and the recognized test name.
                 The name is used for distinguishing logs.

Change-Id: Ib071a5305d4992cf189e35eb3dcc50c83101503e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/313384
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2023-07-13 13:22:26 +00:00