Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude unit tests from upstream that are known to fail in Brave #7901

Merged
merged 1 commit into from
Mar 22, 2021

Commits on Mar 10, 2021

  1. Exclude unit tests from upstream that are known to fail in Brave

    This patch disables entire *_unittests.cc files by making them empty
    via chromium_src overrides, so that we avoid running any test that
    we know are going to fail because of the many ways in which Brave is
    different than Chromium upstream.
    
    Note that it's possible that this way of excluding tests is a bit too
    agressive (i.e. it's likely that some unit tests inside the excluded
    files would pass), but for now it's a good enough initial approach as
    it enables us to considerably increase test coverage without having
    to maintain patches in a too intrusive way.
    
    As a reference, a this time of this patch's writing (on top of Brave
    1.23.30 / Chromium 89.0.4389.86), this are the stats when running
    upstream's unit tests on a Linux/Debug build, without this patch:
    
      * Total run: 13504 tests
      * Passed: 11585 tests
      * Not passed: 1919 tests
        - Failed: 182 tests
        - Crashed: 1737 tests
        - Timed out: 0 tests
    
    With this patch applied, the numbers look like this:
    
      * Total run: 10045 tests
      * Passed: 10045 tests
      * Not passed: 0 tests
    
    That is, what we have with this patch applied looks as follows:
    
      * 10045/13504 -> 74.39% of ALL the original tests being run
      * 10045/11585 -> 86.71% of the PASSING TESTS still being run
    
    In other words, we're increasing test coverage in 10045 unit tests
    in a relatively clean way (i.e. no complex patching) while "only"
    losing 13.29% of the unit tests that would run and pass if we were
    not excluding them in such an agressive way.
    
    Fix brave/brave-browser#8376
    mariospr committed Mar 10, 2021
    Configuration menu
    Copy the full SHA
    858f854 View commit details
    Browse the repository at this point in the history