88 Commits

Author SHA1 Message Date
Mike McQuaid
04835db85e
Move some brew-test-bot logic to GitHub Actions.
This will improve the output and ease of parsing while allowing code to
be removed from brew-test-bot which relates only to a single repo (this
one).
2019-11-21 19:50:23 +00:00
Mike McQuaid
eb0be5f6fe
test: re-enable portable Ruby tests.
Let's try to get these working again.
2019-11-06 15:36:28 +00:00
Mike McQuaid
6a33959888
test/subversion: fix subversion paths/detection. 2019-11-06 14:58:33 +00:00
Mike McQuaid
22795d7e30
spec_helper: do cache clearing in single location. 2019-11-06 10:20:57 +00:00
Mike McQuaid
ddcbdbe0c0
formula: cache runtime_dependencies related stuff. 2019-11-06 10:04:13 +00:00
Mike McQuaid
eeb9ac36a2
keg: cache runtime_dependencies. 2019-11-06 10:04:13 +00:00
Steven Peters
1ad0addbc8 spec_helper: always remove Frameworks 2019-10-21 12:27:39 -07:00
Steven Peters
875bfbc8d3 spec_helper: workaround for removing Frameworks 2019-10-20 22:47:46 -07:00
Mike McQuaid
1b4fdc17f4
Raise deprecation exceptions in tests
Previously tests which hit `odeprecated` would print warnings but not
always raise exceptions or fail. Combine this with the ability to have
`odeprecated` to turn into `odisabled` on certain dates and you have
tests that may fail just on the clock changing (this is bad).

Instead, ensure that tests always raise deprecations as exceptions so
that new deprecations will have their tests handled immediately.
2019-10-15 08:52:42 +01:00
Issy Long
341ea60807
Auto-fix Style/RedundantBegin offenses
- This also required auto-fixes for Layout/EmptyLinesAroundBlockBody and
  Layout/InconsistentIndentation once the auto-fixer had got rid of the
  "redundant begin"s.
2019-10-13 16:04:27 +01:00
Mike McQuaid
2d51b8189b
test: disable some tests on Linux portable ruby. 2019-10-10 16:17:06 +01:00
Mike McQuaid
67f960ba67 GitHub Actions CI
Try to setup GitHub Actions CI.
2019-08-19 20:38:19 +01:00
Mike McQuaid
1d62067883
test/spec_helper: handle needs_linux.
Add similar logic to that for macOS.
2019-07-28 14:11:29 +01:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
aa44509be9
Test dev-cmd *_args methods
Also, add a few missing invocations.
2019-03-27 13:35:42 +00:00
Mike McQuaid
3bde17c9f9
Cleanup from dev-cmd test changes
- Remove added whitespace in `extend/os/linux/keg_relocate`
- Cleanup testball bottles
2019-03-27 10:31:26 +00:00
Mike McQuaid
59d680a626
dev-cmd: only one integration test per command.
Integration tests are useful in detecting breakages but much slower so
let's only use one per command and install formula outside the
integration test framework (which is also slow).
2019-03-27 09:45:48 +00:00
Mike McQuaid
17f3ee1957
Improve Bundler cleanup
Rather than trying to be smart and doing this ourselves in `brew cleanup` let’s just installed Bundler somewhere it doesn’t try to clean itself up and use `bundle install --cleanup` when we need cleanup done.

Also, use `ohai` and `odie` when possible as they look nicer.
2019-02-27 14:02:46 +00:00
Mike McQuaid
d64429a736
rubocop: enable Style/IfUnlessModifier. 2019-02-21 12:55:49 +00:00
Mike McQuaid
5c7fbaf259
Update RuboCop RSpec rules
Create a new, seperate RuboCop file that uses our RSpec rule
configuration if a specified tap has a `spec` directory.

Also, while we're here, fix up the various rules so that we don't have
any outdated TODOs, disable some rules for good and fix `brew style`
for Homebrew/bundle.
2019-01-21 13:39:11 +00:00
Mike McQuaid
3c270b3a9a
spec_helper: tweak parallel tests handling.
- only hide filtered runs in parallel (where they are super noisy)
- only send SimpleCov coverage once to Coveralls
2019-01-09 18:59:12 +00:00
Mike McQuaid
61fa59e95b
Remove Travis CI specific code
We’re no longer using this for our CI so this is no longer necessary.

Also, migrate `brew tap-new` to use Azure pipelines.
2018-12-30 21:13:24 +00:00
Mike McQuaid
0de21812a7
Use Coveralls for coverage reporting. 2018-12-30 20:06:13 +00:00
Shaun Jackman
e8b22690a0 Fix Language::Java::java_home_env for Linux
/usr/libexec/java_home is specific to macOS.
Language::Java::java_home_cmd is not implemented on Linux and raises
NotImplementedError.

Add private Language::Java::java_home_shell and use it instead of java_home_cmd.
Add public Language::Java::java_home for use by formulae.
2018-11-29 12:50:31 -08:00
Shaun Jackman
a7ad7eee78 test/spec_helper: Fix :needs_svn
which("svn") detects shims/scm/svn even when svn is not installed.
2018-10-25 08:54:23 -07:00
Mike McQuaid
0617dc1c1d
info: make verbose analytics use tabular output.
This copies (and slightly improves) the current `brew formula-analytics`
output so `brew formula-analytics` can be adjusted to just output JSON.
2018-10-20 12:06:25 +01:00
Mike McQuaid
100e85dda1
Generate Cobertura coverage data for Azure Pipelines
These can be used and displayed directly in the Azure Pipelines GUI.

It may not end up replacing CodeCov but it's easy enough so: why not.
2018-10-13 17:55:04 -07:00
Mike McQuaid
9a698d2130
keg: further tweak directory constants.
- ensure that `HOMEBREW_CELLAR` is always created on `install`.
- remove the need for a special `PRUNEABLE_DIRECTORIES` variable
- reuse values from existing variables and get `uniq`s.
2018-09-25 22:03:29 +01:00
Mike McQuaid
59c858a8e8
Cleanup Travis and CI configuration.
Use the environment variables set by `brew test-bot`. Eventually we'll
disable Travis CI running CodeCov so move `TRAVIS` references to
`HOMEBREW_TRAVIS_CI` so it doesn't need whitelisted.

Also, fix `azure-pipelines.yml` so it's testing the correct version of
Homebrew/brew (the one checked out in the `pwd`).
2018-09-19 15:01:33 +01:00
alexbostock
122738709a Add a_json_string matcher and improve tests 2018-09-17 20:49:43 +01:00
Markus Reiter
943e227ca1 Retry all specs with :needs_network. 2018-09-14 16:57:14 +02:00
Mike McQuaid
7615d3a812
Improve writable directory handling
Consolidate the handling of which directories need to exist and which
need to be writable. Additionally, add a fatal check for formula
installations to ensure that any directories that need to be writable
are so before attempting an installation.

Fixes #4626.
2018-09-06 18:38:43 +01:00
Shaun Jackman
879f514e28 test/unpack_strategy: Handle svn unzip unavailable
Skip those tests that require svn or unzip.
2018-08-13 14:41:00 -07:00
Markus Reiter
5841b992ac Refactor $LOAD_PATH. 2018-07-17 23:38:57 +02:00
Markus Reiter
1f56314365 Clear Tap cache before each example. 2018-07-16 10:55:22 +02:00
Markus Reiter
e07eddc391 Simplify Hbc::SystemCommand::Result#plist. 2018-07-05 10:54:35 +02:00
Markus Reiter
18e46b3ec2 Fix usage of HOMEBREW_LOAD_PATH. 2018-06-18 16:23:35 +02:00
Markus Reiter
42e34db562 Always add cask/lib to $LOAD_PATH. 2018-06-07 18:42:30 +02:00
Andrew Janke
fc2d4dd444 brew tests: silence filter announcements 2018-06-06 18:17:15 -04:00
Markus Reiter
579a30c7bf Fix rspec deprecations. 2018-05-25 23:19:13 +02:00
Markus Reiter
de246cc528 Update Homebrew-Cask references. 2018-05-25 18:20:02 +02:00
Markus Reiter
c4222141ac Revert "Update Homebrew-Cask references."
This reverts commit 4475651b548afdcf15c4cf7a7cb57baca1885186.
2018-05-25 17:57:32 +02:00
Markus Reiter
4475651b54 Update Homebrew-Cask references. 2018-05-25 17:56:16 +02:00
Markus Reiter
675d5fe61f Fix spec_helper cleanup. 2018-05-25 17:28:43 +02:00
Mike McQuaid
0408b78a23 tests: remove linkage cache env.
Otherwise this will mess with `brew tests`.
2018-05-24 15:09:41 +01:00
Mike McQuaid
4c365ea353 spec_helper: don't truncate output expectations.
It's really useful to be able to see the full output particularly when
a backtrace is in it.
2018-05-24 14:53:03 +01:00
Mike McQuaid
0c216bc5b8 spec_helper: don't truncate output expectations.
It's really useful to be able to see the full output particularly when
a backtrace is in it.
2018-05-24 14:28:20 +01:00
Markus Reiter
d0d7116dc8 Refactor Formulary spec. 2018-04-20 19:11:22 +02:00
Mike McQuaid
9fca172d03 Fix HOMEBREW_RUBY_WARNINGS="-w"
Fix various circular requirements, method redefinitions, etc.
2018-04-07 20:28:56 +01:00
Shaun Jackman
d70d91cf2a test/utils/svn: Requires svn to succeed 2018-02-15 13:50:09 -08:00