1709 Commits

Author SHA1 Message Date
Alyssa Ross
d86342a251 tests: reset ARGV in teardown 2017-01-21 15:08:20 +00:00
Alyssa Ross
2d550b5008 tests: clear tab cache in global teardown 2017-01-21 14:24:19 +00:00
Alyssa Ross
70a381a00f tests: enforce super in lifecycle hooks
This will allow us to have global setup and teardown for tests.

For example, we can automatically clear caches after each test, to avoid
annoying intermittent failures like #1879 and #1886.
2017-01-21 11:34:52 +00:00
Alyssa Ross
366ee0b267 tests: revert modification to ARGV at end of test
Similar to 6fc1747e0550545b4fe80f5a1854d16dd2b08afe. I hadn't seen any
test failures caused by this, but I noticed it in the process of
trackign that down and it's an accident waiting to happen.
2017-01-19 13:21:39 +00:00
Alyssa Ross
6fc1747e05 tests: add a missing Tab cache clear
This was responsible for the sporadic failures I encountered in #1878.
2017-01-19 13:16:08 +00:00
Mike McQuaid
4d2201b8be integration_command_test_case: improve fail output
Instead of `puts`ing when the failure occurs save it until the error
message and print a prose description of what the failure was and the
output from the command. This makes the output from failing tests
significantly easier to read.
2017-01-18 08:36:36 +00:00
Mike McQuaid
ffa5ebde53 Merge pull request #1863 from alyssais/uses_ignore_untapped
uses: properly handle untapped formulae in recursive dependency expansion (again!)
2017-01-17 19:58:52 +00:00
Mike McQuaid
3d37e3b67f Merge pull request #1849 from alyssais/requirement_tests
tests: test Formula#recursive_requirements
2017-01-17 09:12:47 +00:00
Alyssa Ross
0b216798bb Revert "Revert "uses: properly handle untapped fo…
…rmulae in recursive dependency expansion""

This reverts commit dc9819b86c60b5c6fd10373ff318d8ef60f97d52.
2017-01-16 23:28:26 +00:00
Alyssa Ross
33b955a3f2 tests: fix style of recursive_requirements tests 2017-01-16 21:58:59 +00:00
Mike McQuaid
133e59724a Merge pull request #1763 from minamijoyo/add-feature-github-release-download-strategy
New feature: Allow download from private GitHub repository
2017-01-16 18:52:47 +00:00
Alyssa Ross
0d9020838f tests: test Formula#recursive_requirements 2017-01-15 19:50:07 +00:00
Masayuki Morita
12b9cb7f4c Fix rubocop style warning of download_strategy 2017-01-08 18:29:20 +09:00
Masayuki Morita
560d5bdd71 Validate a token when initializing GitHubPrivateRepositoryDownloadStrategy 2017-01-08 18:06:57 +09:00
Masayuki Morita
335be35acf Generalize GitHubReleaseDownloadStrategy in order to support archive URL 2017-01-08 16:44:54 +09:00
Mike McQuaid
dc9819b86c Revert "uses: properly handle untapped formulae in recursive dependency expansion" 2017-01-07 13:15:18 +00:00
Alyssa Ross
4c061fc183 dependency: TapDependency#tap returns a Tap
Previously, this returned a String, but a Tap instance seems much more
sensible.

I couldn't find anywhere this method was actually used, so the change
shouldn't break anything.
2017-01-05 00:22:56 +00:00
Alyssa Ross
56d6695bf3 tab: set homebrew_version in Tab.empty 2017-01-04 00:56:06 +00:00
Alyssa Ross
b7e10ba239 tests: remove temp tab homebrew_version override
This had to be added in #1750 to work around special-casing for tabs
generated with Homebrew versions < 1.1.6. Now that 1.1.6 is the current
version, we can remove this hack.
2017-01-04 00:46:44 +00:00
Mike McQuaid
cd1579a51a Deprecate Homebrew/versions, Homebrew/devel-only.
Don't use Homebrew/versions in a test and remove them both from the
OFFICIAL_TAPS list (i.e. `brew search`).
2017-01-03 17:50:09 +00:00
Masayuki Morita
a4330f458a Use util/github insted of open-uri in GitHubReleaseDownloadStrategy 2017-01-03 15:12:53 +09:00
Masayuki Morita
b9cc52db45 New feature: GitHubReleaseDownloadStrategy
GitHubReleaseDownloadStrategy downloads tarballs from GitHub Release assets.
To use it, add ":using => GitHubReleaseDownloadStrategy" to the URL section
of your formula. This download strategy uses GitHub access tokens (in the
environment variables GITHUB_TOKEN) to sign the request.
This strategy is suitable for corporate use just like S3DownloadStrategy,
because it lets you use a private GttHub repository for internal distribution.
It works with public one, but in that case simply use CurlDownloadStrategy.
2017-01-02 15:56:55 +09:00
Alyssa Ross
e1d7d44e5a tests: optlink fake kegs in uninstall test 2017-01-01 14:27:24 +00:00
Alyssa Ross
e4856143a6 keg: check installed dependencies iff optlinked 2017-01-01 14:27:24 +00:00
Alyssa Ross
94ead55772 keg: keg_only kegs can have installed dependents 2017-01-01 14:26:28 +00:00
Alyssa Ross
05b85a7bef keg: update installed dependency resolution
Closes #1525. (See there for a motivation for this change.)
2017-01-01 14:26:28 +00:00
Alyssa Ross
524d9ce8f3 keg: test dep fallback with unknown formulae 2016-12-31 17:53:06 +00:00
Alyssa Ross
8b30abe060 keg: handle dependencies of moved/renamed formulae
In #1497 I switched from Keg#to_formula for comparing kegs to formulae
to comparing the name and tap in the keg's tab to the name and tap of
the formula.

However, this fails to match if the name and tap of the formula have
changed since the keg was installed, so it's clearly better to use
Keg#to_formula where possible, and fall back to the information in the
tab when #to_formula can't be used.
2016-12-31 17:53:06 +00:00
Mike McQuaid
33fbf3f32d Merge pull request #1750 from alyssais/fallback_dependencies
keg: fall back for dependencies of buggy tabs
2016-12-31 17:34:55 +00:00
Mike McQuaid
1c9651f04f Merge pull request #1756 from alyssais/nil_dependents
keg: don't return nil dependencies
2016-12-31 17:34:17 +00:00
Mike McQuaid
d85a83c9dc Merge pull request #1752 from alyssais/uninstalling_dependencies
keg: fix fallback dependencies with multiple kegs
2016-12-31 17:33:08 +00:00
Alyssa Ross
fb920668c8 keg: don't return nil dependencies
This is a proper fix to the problem addressed by #1510.

The problem arises when f_kegs is nil, which can happen if the name and
tap used to install a keg don't match the name and tap currently
associated with its formula (i.e. if it's been renamed or moved).
2016-12-31 14:16:38 +00:00
Mike McQuaid
b1e27d689d Merge pull request #1701 from MikeMcQuaid/deprecate-std-superenv-stuff
ENV: deprecate old methods.
2016-12-30 20:43:27 +00:00
Alyssa Ross
d998a3fcce tab: remove #reliable_runtime_dependencies?
See https://github.com/Homebrew/brew/pull/1750#discussion_r94243825 for
discussion.

Removes Tab#reliable_runtime_dependencies? in favour of returning nil
from Tab#runtime_dependencies if the list is unreliable.

Because Homebrew 1.1.6 hasn't been tagged yet, tabs created in tests
aren't created with a homebrew_version that marks the
runtime_dependencies in the Tab as reliable, so there are some tests
that fail. To work around this, I've had to add a line to some tests
that explicitly overrides the homebrew_version in the Tab. This is
really ugly though, so they should be removed as soon as possible after
1.1.6 is released.
2016-12-30 20:34:14 +00:00
Mike McQuaid
e50102d91e ENV: deprecate old methods.
These should have been deprecated long ago but we didn’t really have
the necessary framework to do so.
2016-12-30 20:20:13 +00:00
Alyssa Ross
01e1f7d49e keg: fix fallback dependencies with multiple kegs
Fixes #1524.
2016-12-30 18:41:14 +00:00
Alyssa Ross
4322c1c562 tests: explain Homebrew version checking in tabs 2016-12-30 18:19:26 +00:00
Alyssa Ross
c41d1d8148 tab: remove #homebrew_tag
This method isn't used any more
2016-12-30 18:16:49 +00:00
Alyssa Ross
ce454bd141 tab: parse full Homebrew version string
It didn't occur to me that this would work, but it does! Magic.
2016-12-30 18:15:35 +00:00
Alyssa Ross
e5db7927c9 keg: fall back for dependencies of buggy tabs
Fixes #1554.
2016-12-30 16:16:53 +00:00
Alyssa Ross
bdbc19c614 tab: implement #reliable_runtime_dependencies? 2016-12-30 16:16:28 +00:00
Alyssa Ross
a69997cab0 tests: include homebrew version in receipt fixture 2016-12-30 16:15:04 +00:00
Markus Reiter
0f8cb4ba27 Add option to disable methods on specific date. 2016-12-30 14:01:43 +01:00
Mike McQuaid
758de6b454 Merge pull request #1694 from rwhogg/add-kabylake
Add Kaby Lake to Linux hardware list
2016-12-29 14:32:12 +00:00
Mike McQuaid
7148370ad8 Merge pull request #1723 from alyssais/runtime_dependencies
formula: don't expand unused optional dependencies
2016-12-29 14:31:41 +00:00
Mike McQuaid
577bf628e8 Merge pull request #1737 from alyssais/tap_dependents
keg: installed dependencies of unknown formulae
2016-12-29 14:28:59 +00:00
Alyssa Ross
3a27d81219 keg: fix dependents with unavailable formulae
Because of an accidental use of `=` instead of `==`, the source formula
check would be skipped when determining if a keg depended on another one
(so only the versions would be compared).

Fixed that comparison, and updated the corresponding test.

Glad I caught that!
2016-12-27 22:58:44 +00:00
Alyssa Ross
e5d7e13c63 keg: installed dependencies of unknown formulae
Previously, trying to resolve the dependencies of a keg would raise an
exception if the formulae for any of the dependencies could not be found
(e.g. if it had been moved to another tap).

This commit updates the dependency finding logic to catch these
exceptions, and fall back to comparing names and taps of formulae, which
should give the correct behaviour.

Fixes #1586.
2016-12-27 18:03:05 +00:00
Alyssa Ross
0a20edf945 tests: don't run LinkTests twice
see #1526
2016-12-27 17:34:46 +00:00
Alyssa Ross
43f2e9e7bb formula: don't expand unused optional dependencies
This properly addresses Homebrew/homebrew-core#7826.
2016-12-23 21:31:10 +00:00