The commit ranges reported are inclusive the oldest commit. This is
signified by the `~` in the range `xxx~...xxx`.
This CL fixes the script to take this oldest commit into account. It
used to be ignored by the `git log` call omitting the `~`.
Bug: bisection on https://github.com/dart-lang/sdk/issues/54029
This CL also fixes the range prints to be GitHub paste-able. GitHub
doesn't auto syntax highlight `xxx~...xxx`. So instead look up the
parent commit of the oldest commit and use `xxx...xxx` to print the
commit range.
Finally, this CL enables swapping the hashes in the range in the
command-line arguments.
Change-Id: Ic5c685fee2941e7b50c221770962edebe55e62f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335801
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
`-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>
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>