blob: 02befe5a260aae034050ef203cf29708ce856789 [file] [log] [blame] [view]
erikchenb83e010a2018-10-08 21:34:011# Parsing Test Results
2
3Chromium runs over 500,000 tests for each CL. There are many layers of UI for
4parsing and interpreting these test results. This doc provides a brief guide
5for navigating these UI layers.
6
7## Polygerrit UI
8
9Tests are segmented by build and test configurations. The segments are usually
10referred to as *builds*. In the example below, each green and red rectangle
11refers to a *build*.
12
13![Example polygerrit build status](images/parsing_test_results_polygerrit.png)
14
15The name of each build usually contains enough information to get a rough idea
16of the configuration. Some examples:
17
18* *android_compile_dbg* is a compile-only [no tests] build of Chromium for
19 Android, using the *debug* configuration.
Haiyang Panb2c3d97a2020-04-24 20:43:4320* *android-lollipop-arm-rel* builds and runs tests for Chromium for Android,
21 using the *release* configuration on a lollipop device.
Stephen Martinis089f5f02019-02-12 02:42:2422* *win7-rel* builds and runs tests for Chromium on Windows, using
erikchenb83e010a2018-10-08 21:34:0123 the release configuration on a Windows 7 device. *ng* stands for next
24 generation, but this has no meaning as the previous generation was already
25 phased out.
26
27Green boxes refer to builds that passed. Red boxes refer to builds that failed.
28Some failed builds get automatically retried by the CQ. In this example,
Stephen Martinis089f5f02019-02-12 02:42:2429*linux-rel* and *mac-rel* were automatically retried [hence the two **X**s], but
30*win7-rel* was not. The **X** on the left is the first build, and the **X** on the right
31is the second build.
erikchenb83e010a2018-10-08 21:34:0132
33Each of these boxes is a link that provides more information about the build
34failure.
35
36## Build Results UI
37
38Selecting any of the build results from the previous section will navigate to
39the build results UI. Each build is implemented by a [recipe] --
40effectively a Python script. Each recipe is divided into *steps*. Each *step*
41represents a well-defined action, such as updating the repository to point to
42tip of tree, or compiling the necessary build artifacts.
43
John Palmer046f9872021-05-24 01:24:5644[recipe]: https://chromium.googlesource.com/external/github.com/luci/recipes-py/+/main/doc/user_guide.md
erikchenb83e010a2018-10-08 21:34:0145
46![Example 1 Build Results UI](images/parsing_test_results_build_results_1.png)
47
48Under the **Steps and Logfiles** heading is a list of numbered *steps*. Each
49*step* has a color (red, green or purple) which indicates whether the *step*
50failed, succeeded, or encountered an unexpected condition. Failing steps are
51also grouped into the **Results** section at the very top for convenience.
52
53## Build Results UI -- Overview
54
55Most builds follow a similar pattern. The key *steps* are listed here.
56
57* **bot_update** Update the repository to point to tip of tree. Apply the CL
58 as a patch.
59* **analyze** Analyze dependencies of test suites to determine which test
60 suites are affected by the patch.
61* **compile (with patch)** Builds test suites and associated artifacts.
62* **isolate tests** Archives test suite binaries and artifacts.
John Chenaab16fc02020-03-03 06:35:4563* **test_pre_run.[trigger] blink_web_tests (with patch)** Triggers a test
erikchenb83e010a2018-10-08 21:34:0164 suite on swarming [remote execution framework] -- in this case,
John Chenaab16fc02020-03-03 06:35:4565 blink_web_tests.
66* **blink_web_tests (with patch)** Collects the results from swarming for a
erikchenb83e010a2018-10-08 21:34:0167 test suite.
68
69If all test suites pass, then the *build* is marked as a success and no further
70steps are run. If at least one test suite has failures, then the failing tests
71are rerun with the patch deapplied. This allows the recipe to determine if the
72test failure is due to the CL or due to a problem with tip of tree.
73
74* **bot_update [without patch]** Deapplies the CL patch.
75* **compile [without patch]** Compiles test suites.
76* **isolate tests (2)** Archives test suite binaries and artifacts.
John Chenaab16fc02020-03-03 06:35:4577* **test_pre_run.[trigger] blink_web_tests (without patch)** Triggers test
erikchenb83e010a2018-10-08 21:34:0178 suite on swarming. Only failing tests are rerun.
John Chenaab16fc02020-03-03 06:35:4579* **blink_web_tests (without patch)** Collects results from swarming.
erikchenb83e010a2018-10-08 21:34:0180
81**Important safety notice**. When test suites are run with the patch applied,
82each test is run up to N times -- any success will mark the test as a success.
83When test suites are run without the patch, each failing test is run exactly N
84times. Any failure will mark the test as a failure.
85
86If there are tests that failed with the patch applied, but not with the patch
87deapplied, then that implies that it's likely that the CL broke a test. Just to
88confirm, the first suite of steps is run again, this time with the suffix
89**(retry with patch)**.