Skip to content

Commit c2ed1ea

Browse files
Merge pull request #76 from ErichDonGubler/rework-process-reports-docs
`process-reports`: rework workflow documentation and `preset` aliases for accessibility
2 parents 21c83b6 + ad26376 commit c2ed1ea

1 file changed

Lines changed: 20 additions & 34 deletions

File tree

moz-webgpu-cts/src/main.rs

Lines changed: 20 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -56,22 +56,22 @@ enum Subcommand {
5656
/// Adjust test expectations in metadata using `wptreport.json` reports from CI runs covering
5757
/// Firefox's implementation of WebGPU.
5858
///
59-
/// The general usage of this subcommand is to (1) reset expectations according to some
60-
/// heuristic, and then (2) extend expectations from more reports later to accommodate any
61-
/// intermittents that are found. More concretely:
59+
/// As Firefox's behavior changes, one generally expects CTS test outcomes to change. When you
60+
/// are testing your own changes in CI, you can use this subcommand to update expectations
61+
/// automatically with the following steps:
6262
///
63-
/// 1. Pick a `reset-*` preset (which we'll call `RESET_PRESET`). See docs for `preset` for
64-
/// more details on making this choice.
63+
/// 1. Run `moz-webgpu-cts process-reports --preset=new-fx …` against the first complete set of
64+
/// reports you gather from CI with your new Firefox build. This will adjust for new
65+
/// permanent outcomes, and may capture some (but not all) intermittent outcomes.
6566
///
66-
/// 2. Gather reports into path(s) of your choice.
67+
/// 2. There may still exist intermittent issues that you do not discover in CI run(s) from the
68+
/// previous step. As you discover them in further CI runs on the same build of Firefox,
69+
/// adjust expected outcomes to match by running `moz-webgpu-cts process-reports
70+
/// --preset=same-fx …` against the runs' new reports. Repeat as necessary.
6771
///
68-
/// 3. Run `moz-webgpu-cts process-reports --preset=$RESET_PRESET …` against the reports
69-
/// you've gathered to cover all new permanent outcomes. If you are confident you picked the
70-
/// right `RESET_PRESET`, you may delete the reports you provided to this run.
71-
///
72-
/// 4. As intermittent outcomes are discovered (maybe again), run `moz-webgpu-cts
73-
/// process-reports --preset=merge …` with reports. You may delete the reports after their
74-
/// outcomes have been merged in.
72+
/// With both steps, you may delete the local copies of these reports after being processed
73+
/// with `process-reports`. You should not need to re-process them unless you have made an
74+
/// error in following these steps.
7575
ProcessReports {
7676
/// Direct paths to report files to be processed.
7777
report_paths: Vec<PathBuf>,
@@ -81,26 +81,8 @@ enum Subcommand {
8181
/// forward slashes (`/`) are the only valid path separator for these globs.
8282
#[clap(long = "glob", value_name = "REPORT_GLOB")]
8383
report_globs: Vec<String>,
84-
/// A heuristic for resolving differences between current metadata and processed reports.
85-
///
86-
/// When you use this subcommand, you need to use both the `merge` preset and a choice of
87-
/// `reset-*` heuristic. The choice mostly depends on your taste for regressions in
88-
/// intermittent outcomes:
89-
///
90-
/// * Is your goal is to make changes to Firefox, and make CI pass again? If so, you
91-
/// probably want `reset-contradictory`.
92-
///
93-
/// * Are you trying to run the `triage` subcommand on a minimized set of expected
94-
/// outcomes? If so, you probably want `reset-all`.
95-
///
96-
/// `reset-contradictory` changes expectations to match the set of outcomes observed in the
97-
/// provided `reports_*` when they are not a strict subset of expected outcomes in
98-
/// metadata. This is guaranteed to cover new permanent outcomes in metadata, while
99-
/// minimizing changes to current intermittent outcomes in metadata. It may, however,
100-
/// result in some intermittent outcomes not being reset to new permanent outcomes.
101-
///
102-
/// `reset-all` changes expectations to match reported outcomes _exactly_. Metadata is not
103-
/// even considered.
84+
/// The heuristic for resolving differences between current metadata and processed reports
85+
/// for this report processing run.
10486
#[clap(long)]
10587
preset: ReportProcessingPreset,
10688
},
@@ -114,8 +96,12 @@ enum Subcommand {
11496

11597
#[derive(Clone, Copy, Debug, ValueEnum)]
11698
enum ReportProcessingPreset {
117-
Merge,
99+
/// alias: `new-fx`
100+
#[value(alias("new-fx"))]
118101
ResetContradictory,
102+
/// alias: `same-fx`
103+
#[value(alias("same-fx"))]
104+
Merge,
119105
ResetAll,
120106
}
121107

0 commit comments

Comments
 (0)