erikchen | b83e010a | 2018-10-08 21:34:01 | [diff] [blame] | 1 | # Parsing Test Results |
| 2 | |
| 3 | Chromium runs over 500,000 tests for each CL. There are many layers of UI for |
| 4 | parsing and interpreting these test results. This doc provides a brief guide |
| 5 | for navigating these UI layers. |
| 6 | |
| 7 | ## Polygerrit UI |
| 8 | |
| 9 | Tests are segmented by build and test configurations. The segments are usually |
| 10 | referred to as *builds*. In the example below, each green and red rectangle |
| 11 | refers to a *build*. |
| 12 | |
| 13 |  |
| 14 | |
| 15 | The name of each build usually contains enough information to get a rough idea |
| 16 | of 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 Pan | b2c3d97a | 2020-04-24 20:43:43 | [diff] [blame] | 20 | * *android-lollipop-arm-rel* builds and runs tests for Chromium for Android, |
| 21 | using the *release* configuration on a lollipop device. |
Stephen Martinis | 089f5f0 | 2019-02-12 02:42:24 | [diff] [blame] | 22 | * *win7-rel* builds and runs tests for Chromium on Windows, using |
erikchen | b83e010a | 2018-10-08 21:34:01 | [diff] [blame] | 23 | 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 | |
| 27 | Green boxes refer to builds that passed. Red boxes refer to builds that failed. |
| 28 | Some failed builds get automatically retried by the CQ. In this example, |
Stephen Martinis | 089f5f0 | 2019-02-12 02:42:24 | [diff] [blame] | 29 | *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 |
| 31 | is the second build. |
erikchen | b83e010a | 2018-10-08 21:34:01 | [diff] [blame] | 32 | |
| 33 | Each of these boxes is a link that provides more information about the build |
| 34 | failure. |
| 35 | |
| 36 | ## Build Results UI |
| 37 | |
| 38 | Selecting any of the build results from the previous section will navigate to |
| 39 | the build results UI. Each build is implemented by a [recipe] -- |
| 40 | effectively a Python script. Each recipe is divided into *steps*. Each *step* |
| 41 | represents a well-defined action, such as updating the repository to point to |
| 42 | tip of tree, or compiling the necessary build artifacts. |
| 43 | |
John Palmer | 046f987 | 2021-05-24 01:24:56 | [diff] [blame] | 44 | [recipe]: https://chromium.googlesource.com/external/github.com/luci/recipes-py/+/main/doc/user_guide.md |
erikchen | b83e010a | 2018-10-08 21:34:01 | [diff] [blame] | 45 | |
| 46 |  |
| 47 | |
| 48 | Under 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* |
| 50 | failed, succeeded, or encountered an unexpected condition. Failing steps are |
| 51 | also grouped into the **Results** section at the very top for convenience. |
| 52 | |
| 53 | ## Build Results UI -- Overview |
| 54 | |
| 55 | Most 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 Chen | aab16fc0 | 2020-03-03 06:35:45 | [diff] [blame] | 63 | * **test_pre_run.[trigger] blink_web_tests (with patch)** Triggers a test |
erikchen | b83e010a | 2018-10-08 21:34:01 | [diff] [blame] | 64 | suite on swarming [remote execution framework] -- in this case, |
John Chen | aab16fc0 | 2020-03-03 06:35:45 | [diff] [blame] | 65 | blink_web_tests. |
| 66 | * **blink_web_tests (with patch)** Collects the results from swarming for a |
erikchen | b83e010a | 2018-10-08 21:34:01 | [diff] [blame] | 67 | test suite. |
| 68 | |
| 69 | If all test suites pass, then the *build* is marked as a success and no further |
| 70 | steps are run. If at least one test suite has failures, then the failing tests |
| 71 | are rerun with the patch deapplied. This allows the recipe to determine if the |
| 72 | test 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 Chen | aab16fc0 | 2020-03-03 06:35:45 | [diff] [blame] | 77 | * **test_pre_run.[trigger] blink_web_tests (without patch)** Triggers test |
erikchen | b83e010a | 2018-10-08 21:34:01 | [diff] [blame] | 78 | suite on swarming. Only failing tests are rerun. |
John Chen | aab16fc0 | 2020-03-03 06:35:45 | [diff] [blame] | 79 | * **blink_web_tests (without patch)** Collects results from swarming. |
erikchen | b83e010a | 2018-10-08 21:34:01 | [diff] [blame] | 80 | |
| 81 | **Important safety notice**. When test suites are run with the patch applied, |
| 82 | each test is run up to N times -- any success will mark the test as a success. |
| 83 | When test suites are run without the patch, each failing test is run exactly N |
| 84 | times. Any failure will mark the test as a failure. |
| 85 | |
| 86 | If there are tests that failed with the patch applied, but not with the patch |
| 87 | deapplied, then that implies that it's likely that the CL broke a test. Just to |
| 88 | confirm, the first suite of steps is run again, this time with the suffix |
| 89 | **(retry with patch)**. |