31 Commits

Author SHA1 Message Date
Bo Anderson
fb21d59b5a
Improve coverage tracking 2023-11-11 05:36:40 +00:00
Douglas Eichelberger
cc5b013cb9 Remove compatibility layer 2023-03-14 14:49:34 -07:00
Mike McQuaid
80232af31d
More tweaks to testing output and speed
- Never bother to do `brew cleanup` after `brew install`
- Skip `brew test-bot --only-cleanup-before` in more places it's not
  needed
- Move `brew config`/`brew doctor` into the default formula run
  (through `brew test-bot --only-setup`)
- Install `buildpulse-test-reporter` rather than letting `brew tests`
  do it
- Improve the formatting of the `brew tests` step
- Further shorten the code coverage filenames
- Don't output BuildPulse results upload status unless failed
2023-02-17 16:17:45 +00:00
Mike McQuaid
a743e9277f
workflows/tests: faster, more reliable tests.
- Extract update tests into separate tests.
- Make `brew tests --online` run only once in its own job. This job
  could be made non-required to fight flakiness.
- Split up the various macOS runs into several steps now that we have
  more parallel macOS workers available.
- Cleanup some flaky tests.
2023-02-17 15:26:18 +00:00
Issy Long
7ba8c1cd9a
simplecov: Appease brew style 2023-02-17 14:05:04 +00:00
Issy Long
2986c7d736
simplecov: Even shorter command_names
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-02-17 13:36:19 +00:00
Issy Long
faf505e935
simplecov: Set command_name shorter than "all of the file paths ever"
- Having `ENV["HOMEBREW_INTEGRATION_TEST"]` as part of the
  `command_name` for SimpleCov made the "generated report" wording
  _really_ long and unintelligible, since `HOMEBREW_INTEGRATION_TEST`
  for some reason is a list of paths, which when we run all of the tests
  in parallel, is a lot.
- Because of the way the tests run, this is still _a bit_
  noisy, but I've assumed we still want the uniqueness (ish) of the
  process IDs. I'll iterate some more to trim this further, if desired.

```
Coverage report generated for Homebrew/brew (), Homebrew/brew (10), Homebrew/brew (11), Homebrew/brew (12), Homebrew/brew (13), Homebrew/brew (14), Homebrew/brew (15), Homebrew/brew (16), Homebrew/brew (2), Homebrew/brew (3), Homebrew/brew (4), Homebrew/brew (5), Homebrew/brew (6), Homebrew/brew (7), Homebrew/brew (8), Homebrew/brew (9), Homebrew/brew integration tests (), Homebrew/brew integration tests (10), Homebrew/brew integration tests (11), Homebrew/brew integration tests (12), Homebrew/brew integration tests (13), Homebrew/brew integration tests (14), Homebrew/brew integration tests (15), Homebrew/brew integration tests (16), Homebrew/brew integration tests (2), Homebrew/brew integration tests (3), Homebrew/brew integration tests (4), Homebrew/brew integration tests (5), Homebrew/brew integration tests (6), Homebrew/brew integration tests (7), Homebrew/brew integration tests (8), Homebrew/brew integration tests (9) to /usr/local/Homebrew/Library/Homebrew/test/coverage. 22236 / 32877 LOC (67.63%) covered.
```
2023-02-16 19:38:15 +00:00
Nanda H Krishna
d9d6a74257
brew style --fix 2023-02-06 13:48:18 -05:00
Mike McQuaid
fdd616b292
simplecov: enable branch coverage. 2022-02-22 15:27:43 +00:00
hyuraku
705995c1c3 repair variables 2021-04-13 22:23:32 +09:00
hyuraku
ee511e4c0c delete useless variable 2021-04-13 22:23:32 +09:00
hyuraku
d63a0ebd7b .simplecov: delete private method 2021-04-13 22:23:32 +09:00
Markus Reiter
da8d91bd05 Fix .simplecov exit status for integration tests. 2020-11-30 20:52:27 +01:00
Markus Reiter
df436e331d Fix .simplecov. 2020-11-30 20:52:27 +01:00
Mike McQuaid
fb4d08a49a Fix brew style 2020-09-11 10:29:22 +01:00
Markus Reiter
64a533bfdd Fix useless assignment. 2020-09-01 12:52:59 +02:00
Mike McQuaid
82fc9506ad
simplecov: enable for subprocesses.
Follow instructions in:
https://github.com/simplecov-ruby/simplecov#running-simplecov-against-subprocesses
2020-08-18 15:58:46 +01:00
Mike McQuaid
170b38892a
Use CodeCov for coverage reporting. 2020-07-02 10:22:54 +01:00
Mike McQuaid
afec4e2988 Tweak code coverage logic
- make OS detection looser to exclude more Linux files on macOS (and
  vice versa)
- Allow slight (0.5%) coverage drops to account for somewhat random
  fluctuations.
2018-07-26 10:09:02 +01:00
Markus Reiter
c7549f476a Refactor .simplecov. 2018-06-13 07:17:30 +02:00
Mike McQuaid
301bb1d5dd .simplecov: filter more filters/folders.
This is stuff that can never be exercised by our test suite but is
exercised by `brew test-bot` so remove it from the coverage checks.
2017-12-08 16:44:33 +00:00
Markus Reiter
69e2be832c Fix comment location. 2017-10-08 14:14:24 +02:00
Markus Reiter
bae08d5188 Don’t track files in test and vendor. 2017-10-08 01:47:12 +02:00
Markus Reiter
4944d43d58 Move coverage reporting into brew tests. 2017-03-05 23:08:14 +01:00
Markus Reiter
a536139e28 Remove dev-cmd/tests.rb from test coverage. 2017-03-05 18:56:32 +01:00
Bob W. Hogg
e622116f27 .simplecov: require English with capital E
On case-sensitive filesystems, require "english" will fail with "cannot load such file -- english"
2017-02-18 14:35:02 -08:00
Markus Reiter
c8492c2c44 RuboCop: Style/SpecialGlobalVars 2016-09-25 19:55:34 +02:00
Alyssa Ross
5f6a8d407a tests: speed up integration tests coverage
Previously, .simplecov called `SimpleCov.result` to store the coverage
result, and ignored the return value. `SimpleCov.result`'s return can be
slow to calculate, which wastes a lot of time when it's ignored.

This commit extracts the code needed to store the SimpleCov result from
`SimpleCov.result`, and calls it directly, without doing the busywork to
compute the return value every time.

In my testing, this more than halves the time taken to run all the
integration tests.
2016-09-23 10:40:08 +01:00
Markus Reiter
6b85593895 Fix coverage reporting. 2016-09-23 09:17:55 +02:00
Alyssa Ross
b3a85aaf34 test, cask-tests: update simplecov paths 2016-09-21 22:58:35 +01:00
Alyssa Ross
9033af6bda tests, cask-tests: (maybe) fix coverage 2016-09-20 17:02:35 +00:00