102 Commits

Author SHA1 Message Date
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
Mike McQuaid
0c1b556196
uses_from_macos: remove before/after.
We're not actually using this anywhere and it makes the code
more complicated.

Relatedly, this PR fixes the issue where
`uses_from_macos "python@2" => :build` was valid on macOS but not
on Linux.
2019-12-19 14:36:33 +00:00
Mike McQuaid
22795d7e30
spec_helper: do cache clearing in single location. 2019-11-06 10:20:57 +00:00
EricFromCanada
f6ef26a127 Fix OS version logic for uses_from_macos 2019-09-23 13:00:58 -04:00
Gabriel
9fa8dc5d89 Remove old os/mac/formula spec 2019-06-03 15:52:53 -03:00
Gabriel
b2969e6063 Add needs_linux tag to specs that fails on MacOS 2019-06-03 15:52:53 -03:00
Gabriel
41f39939ca Extract linux spec cases & add hash support to default #uses_from_macos 2019-06-03 15:52:53 -03:00
Gabriel
332acbbfc3 Add more spec cases 2019-06-03 15:52:53 -03:00
Gabriel
7a9bfb4c9f Fix spec 2019-06-03 15:52:53 -03:00
Gabriel
aafe87524d Extends SoftwareSpec with #uses_from_macos 2019-06-03 15:52:53 -03:00
Gabriel
01c5bc48d2 Create extended os formula specs 2019-06-03 15:52:53 -03:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
75257886f2
Cleanup some RSpec tests
Fix some Rubocop RSpec checks, update some values and improve
documentation.
2019-03-28 19:16:56 +00:00
Mike McQuaid
28fa8a7c97
version: add CPU tests.
Add a new API inspired by discussion in
https://github.com/Homebrew/homebrew-core/pull/36435 to query if a given
CPU option is supported by a version of macOS.
2019-01-28 19:31:21 +00:00
Mike McQuaid
1aa8ad09e2
Deprecate macOS versions below Mavericks
And remove all dead/unneeded code.
2019-01-27 12:27:47 +00:00
Mike McQuaid
c3a46bc570
os/mac/diagnostic: remove some old/unneeded checks. 2019-01-21 12:40:12 +00:00
Mike McQuaid
170c5493a4
Update deprecations
- Add some `odeprecated`
- Make some `odeprecated` now `odisabled`
- Remove `odisabled` code.
- Remove old update migrations
- Remove GCC 4.0 compiler
- Remove Tiger-only code
- Remove 32-bit-only code
- Remove use of LD64
- Remove GCC 4.3 - 4.8 support.
2019-01-08 19:13:46 +00:00
Mike McQuaid
e10d61b81b
Merge pull request #5447 from jonchang/linux-doctor
doctor: check supported versions of glibc and kernel [Linux]
2019-01-02 19:11:05 +00:00
Jonathan Chang
9db92a0203
Revert "Revert "diagnostic: share prefix check"" 2019-01-01 18:11:59 -08:00
Jonathan Chang
76d7b586ce diagnostic: check kernel, glibc versions [Linux] 2019-01-01 16:10:43 -08:00
Jonathan Chang
0a5fed1938
Revert "diagnostic: share prefix check" 2018-12-29 14:31:39 -08:00
Jonathan Chang
0d0eac8078 diagnostic: share prefix check 2018-12-27 11:23:18 -08:00
Claudia
5be80a78f6
Use Homebrew-controlled domain for Cask dummy URLs
In a number of Cask specs, the value of the `homepage` stanza is currently set
to https://example.com. As of 2018-11-28, the TLS certificate served by
example.com seems to be expired, possibly due to an oversight on ICANN’s side.

While the certificate is certainly going to be renewed soon, it would be
desirable for Homebrew’s test result to be less dependent on ICANN’s actions.
This commit changes the homepages of all test Casks to http://brew.sh, whose
domain and TLS certificate are both controlled by Homebrew.
2018-11-28 20:51:55 +01:00
Mike McQuaid
78eba5b815
Autofix RuboCop RSpec failures 2018-09-20 13:36:42 +01:00
Misty De Meo
634e1ea0f5 Mac tests: use and_return 2018-08-08 15:40:16 -07:00
Misty De Meo
77ef773d1f Mac.sdk_path_if_needed tests: stub SDK check 2018-08-08 15:19:26 -07:00
Misty De Meo
a20198cb89
MacOS: add sdk_path_if_needed tests 2018-08-08 10:45:48 -07:00
Misty De Meo
0cd8427405
Diagnostic: remove need for headers on 10.14 2018-08-08 10:45:48 -07:00