You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cargo-bisect-rustc prints "Yes" or "No" on whether or not a build
satisfies the condition that it is looking for (default: Yes =
reproduces regression, No = does not reproduce the regression). However,
this terminology is either confusing or backwards depending on what is
being tested.
For example, one can use one of `--regress` options (f.e. `--regress
success`) to find when a regression was fixed. In that sense, the "old"
is "regression found" and the "new" is "regression fixed", which is
backwards from the normal behavior.
Taking inspiration from git bisect, we are introducing custom terms for
Satisfies. This is implemented with 2 new cli options:
--term-old, will apply for Satisfy::Yes (condition requested is matched)
--term-new, will apply for Satisfy::No (condition requested is NOT matched)
This will allow the user to specify their own wording. Then, the
--regress option could set the defaults for those terms appropriate for
the regression type.
Fixes#316
You can add custom messages when bisecting a regression. Taking inspiration from git-bisect, with `term-new` and `term-old` you can set custom messages to indicate if a regression matches the condition set by the bisection.
144
+
145
+
Example:
146
+
```sh
147
+
cargo bisect-rustc \
148
+
--start=2018-08-14 \
149
+
--end=2018-10-11 \
150
+
--term-old "No, this build did not reproduce the regression, compile successful" \
151
+
--term-new "Yes, this build reproduces the regression, compile error"
152
+
```
153
+
154
+
Note that `--term-{old,new}` are aware of the `--regress` parameter. If the bisection is looking for a build to reproduce a regression (i.e. `--regress {error,ice}`), `--term-old` indicates a point in time where the regression does not reproduce and `--term-new` indicates that it does.
155
+
156
+
On the other hand, if `--regress {non-error,non-ice,success}` you are looking into bisecting when a condition of error stopped being reproducible (e.g. some faulty code does not produce an error anymore). In this case `cargo-bisect` flips the meaning of these two parameters.
157
+
158
+
Example:
159
+
```sh
160
+
cargo bisect-rustc \
161
+
--start=2018-08-14 \
162
+
--end=2018-10-11 \
163
+
--regress=success \
164
+
--term-old "This build does not compile" \
165
+
--term-new "This build compiles"
166
+
```
167
+
168
+
See [`--regress`](usage.html#regression-check) for more details.
If you change the command line parameters of cargo-bisect, tests will fail, the crate `trycmd` is used to keep track of these changes.
4
+
5
+
In order to update files under `tests/cmd/*.{stdout,stderr}`, run the test generating the new expected results:
6
+
7
+
`TRYCMD=dump cargo test`
8
+
9
+
it will create a `dump` directory in the project root. Then move `dump/*.{stdout,stderr}` into `./tests/cmd` and run tests again. They should be all green now.
10
+
11
+
Note: if the local tests generate output specific for your machine, please replace that output with `[..]`, else CI tests will fail. Example:
12
+
13
+
```diff
14
+
- --host <HOST> Host triple for the compiler [default: x86_64-unknown-linux-gnu]
15
+
+ --host <HOST> Host triple for the compiler [default: [..]]
16
+
```
17
+
18
+
See the trycmd [documentation](https://docs.rs/trycmd/latest/trycmd/) for more info.
0 commit comments