129 Commits

Author SHA1 Message Date
Bo Anderson
20d86c0185
Refactor some tag handling into a Utils::Bottles::Tag class 2021-04-08 17:23:57 +01:00
Issy Long
e143dfdad6
Merge pull request #10658 from issyl0/rubocop-enable-rspec-context-wording
rubocop: Enable RSpec/ContextWording cop & fix offenses
2021-02-23 00:14:02 +00:00
Issy Long
ead84825a6
test: Fix all RSpec/RepeatedExampleGroupDescription offenses 2021-02-21 14:06:24 +00:00
Issy Long
5793be5b86
test: Change more contexts to describes for better sentences
- We could have added "to" to the `RSpec/ContextWording` list of valid
  `context` prefixes, but switching these to `describe` is less special.
2021-02-21 13:31:26 +00:00
Issy Long
e1ad07190e
rubocop: Fix RSpec/ContextWording offenses
- For some of these I changed `context` to `describe` as it fit better
  rather than contriving a "when", "with" or "without", or massively
  restructuring the tests.
2021-02-19 23:30:41 +00:00
Bo Anderson
323ff660fa rubocop: use consistent array/hash indentation 2021-02-11 13:27:42 +00:00
Bo Anderson
87b6fe8f84 test/os/mac/sdk: add tests 2021-02-11 01:20:02 +00:00
Bo Anderson
fe52b3a402 os/mac/diagnostic: check SDK version matches the path 2021-02-11 01:19:59 +00:00
Rylan Polster
d5d7b6c3db
style: remove RSpec/MultipleDescribes violations
Co-authored-by: Nanda H Krishna <nanda.harishankar@gmail.com>
2021-02-01 20:30:51 -05:00
Rylan Polster
af40e072b0
style: remove RSpec/NamedSubject violations 2021-02-01 20:30:51 -05:00
Mike McQuaid
3dcb35d96f
os/mac/pkgconfig_spec: fix brew style. 2020-12-31 13:30:24 +00:00
Mike McQuaid
e74be0f53a
Merge pull request #10129 from carlocab/big-sur-pkg-config
os/mac/pkgconfig: merge pc files for 11.1 and 11.0
2020-12-28 13:19:31 +00:00
Seeker
1d710047a5 formula: add more tests for shared_library 2020-12-24 09:05:46 -08:00
carlocab
a701ef79d1
test/os/mac/pkgconfig_spec: fix test failures
This fixes the test failures induced by 845299d10e95e48e4b408ce5fef93036a9b4bf0a.
2020-12-24 14:45:25 +00:00
Mike McQuaid
2c77a540b5
Merge pull request #9481 from MikeMcQuaid/bottle_prefix_repository_handling
Fix bottle prefix and repository handling
2020-12-09 14:45:47 +00:00
Mike McQuaid
0f9bad0052
Fix bottle prefix and repository handling
We were previously only looking at the `cellar` value when pouring
bottles and ignoring the `prefix` and (implicit) `repository`.

Actually look at these values and set the defaults for each platform.

Also, when we're relocating to create or pour bottles when `prefix`
and `repository` are equal then skip relocating the `repository` and
always use references to the `prefix` instead.

Fixes #9453
2020-12-09 13:53:10 +00:00
Mike McQuaid
6467fbadee
MacOS::Version: add (and use) architecture. 2020-12-09 11:55:27 +00:00
Mike McQuaid
9bd312bab2
Merge pull request #9267 from reitermarkus/macos-version-11.1
Handle macOS versions >= 11.1 correctly.
2020-11-25 14:36:01 +00:00
Mike McQuaid
d496f5c121
Deprecations for Homebrew 2.6.0
Do the usual deprecate/disable dance for the Homebrew 2.6.0 release.

Not to be merged until the next release will definitely be 2.6.0.
2020-11-24 16:44:02 +00:00
Markus Reiter
8598b1186a Handle macOS versions >= 11.1 correctly. 2020-11-23 13:46:15 +01:00
EricFromCanada
ec17dfbfcd requirements: drop unused "cli/args" requirement 2020-11-07 11:01:21 -05:00
Mike McQuaid
6b27dcb11c
workflows/tests: use Big Sur.
Migrate GitHub Actions to Big Sur.
2020-11-06 15:11:33 +00:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
90d70ad932 Refactor OS::Mac::Version. 2020-10-05 15:58:17 +02:00
Mike McQuaid
2e5272d04c Deprecate/disable code for Homebrew 2.5.0.
Do the usual "disable deprecations" and "uncomment pending deprecations"
dance and delete/deprecate/disable relevant/related code.
2020-09-03 10:34:22 +01:00
rmnull
7863cc6f80
remove {rust,cpp,go}.elf fixutres. 2020-09-02 18:58:36 +05:30
rmnull
f5ca649e1d
new elf fixtures, and basic tests for Pathname#rpath(=), and Pathname#interpreter(=). 2020-09-02 18:58:36 +05:30
Mike McQuaid
5d05a059e3
Merge pull request #8400 from Bo98/pc-version-tests
test/os/mac: add tests to validate pkg-config library versions
2020-08-21 17:12:06 +01:00
Dawid Dziurla
ded2927751
Merge pull request #8383 from dawidd6/svn-catalina
extend/os/mac: install svn on catalina and newer
2020-08-20 18:42:34 +02:00
Bo Anderson
86eca5ab44 test/os/mac: add tests to validate library versions 2020-08-20 15:57:39 +01:00
Seeker
3379e3b5cf os: add kernel_version 2020-08-19 11:41:30 -07:00
Dawid Dziurla
dbbc14040d
extend/os/mac: install svn on catalina and newer 2020-08-18 12:50:34 +02:00
rmnull
043719383b
remove code using patchelf, remove HOMEBREW_PATCHELF_RB var 2020-08-08 06:48:31 +05:30
Markus Reiter
05365b5542 Pass args more explicitly in FormulaInstaller. 2020-07-30 03:21:12 +02:00
Markus Reiter
25b3632c4c Pass args to ENV instead of using global args. 2020-07-25 03:57:43 +02:00
rmnull
0bf981f010
skip tests when HOMEBREW_PATCHELF_RB is not set. 2020-07-25 01:41:20 +05:30
rmnull
06a4a78b99
simple rpath, interpreter tests for existing fixtures. 2020-07-25 01:25:08 +05:30
Markus Reiter
b2698d501b Change test for MacOS::languages. 2020-07-22 01:11:57 +02:00
Claudia
374c734d9b
Make Hardware.oldest_cpu depend on architecture
Starting with Xcode 12 Beta 2, builds that used to work on Apple Silicon
now break due to `Hardware#oldest_cpu` returning `:nehalem` [1].

This commit is the first in a series of improvements to
`Hardware#oldest_cpu`. It resolves the Xcode 12 Beta 2 issue for now.

[1]: https://github.com/Homebrew/brew/issues/7857#issuecomment-655536261
2020-07-08 20:59:10 +02:00
Michka Popoff
955bca6574 formule: add generic shared-lib methods
We have strings containing hardcoded ".dylib" extensions in homebrew-core.
To be able to bring linuxbrew-core and homebrew-core closer together,
I am introducing a new generic attribute that can be used in formulae.
2020-06-20 23:14:18 +02:00
Michka Popoff
3ad9009937 on_os block: test support for patches 2020-06-10 19:29:52 +02:00
Michka Popoff
2a50ef045f on_os blocks: remove url tests
This is not allowed by the style audit, and we do not want
to allow different source url's depending on the os.
2020-06-10 19:29:52 +02:00
Michka Popoff
1f8ebf5d20 resource: allow on_os blocks 2020-06-10 19:29:04 +02:00
Mike McQuaid
b58fa4ebb1
Drop Mavericks support.
Companion to https://github.com/Homebrew/brew/pull/7698.

Provide better, `odeprecated` messaging for
`depends_on :macos => :mavericks` and otherwise just fix up the code
that relied on `:mavericks`.
2020-06-10 10:06:46 +01:00
Bo Anderson
16141e7eff os/mac/software_spec: fix argument error in valid use case 2020-05-04 17:16:39 +01:00
Bo Anderson
eb303dd654 software_spec: add uses_from_macos since bound 2020-04-28 16:45:32 +01:00
Michka Popoff
c7927f5af5 formula: add linux and macos only function blocks 2020-04-12 23:51:41 +02:00
Jonathan Chang
57109a175a diagnostic: add doctor check for CPU arch on Linux
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2020-03-13 11:39:27 +11:00
Dawid Dziurla
59ce122e90
dependency_collector: make resource dep available at test-time too
There are formulae that use resource blocks for stuff that is needed in
test blocks. If a resource is a `.zip` archive, one needs `unzip`
utility in `PATH` to extract it, but its only available at build-time,
so one observes an error like that for example:

```
==> brew test psftools --verbose
Testing psftools
==> Downloading https://www.zone38.net/font/pc8x8.zip
Already downloaded: /github/home/.cache/Homebrew/downloads/ea5f6a485687368ff5bc99e4cc43a49b06e081baa51a97ee6ddcd8d1b82d7963--pc8x8.zip
==> Verifying ea5f6a485687368ff5bc99e4cc43a49b06e081baa51a97ee6ddcd8d1b82d7963--pc8x8.zip checksum
unzip -o /github/home/.cache/Homebrew/downloads/ea5f6a485687368ff5bc99e4cc43a49b06e081baa51a97ee6ddcd8d1b82d7963--pc8x8.zip -d /tmp/d20200304-21389-ui0wr0
Error: psftools: failed
undefined method `shelljoin' for nil:NilClass
```

Of course this issue affects Linux the most, because of higher
probability that the system lacks `unzip` for example.

With this commit, all resource guessed dependencies should be available
at build and test time.
2020-03-04 22:49:54 +01:00
Xiao Di Guan
a9b22165fd
doctor: remove DYLD checks 2020-01-26 14:38:32 +11:00