8167 Commits

Author SHA1 Message Date
Mike McQuaid
3469f177f0 audit: don't check formula linkage.
This partly reverts commit 0ed673abdb59e2f75f9b8539cce318607924e87f.
2016-07-28 16:53:41 -06:00
Martin Afanasjew
12413cb760 tests: fix duplicate test case class name
Rename test case class to avoid two definitions of `BlacklistTests`.
2016-07-28 22:09:07 +02:00
Mike McQuaid
97b6a3069e test: add default Linux x86_64 bottle. 2016-07-27 21:44:35 -06:00
Tim D. Smith
c4deed68bd Make method names inquisitive
Closes #592.

Signed-off-by: Tim D. Smith <git@tim-smith.us>
2016-07-27 17:49:49 -07:00
Tim D. Smith
9c0a2ac933 Don't fail on arbitrary absolute symlinks
Still forbid absolute symlinks including prefix
2016-07-27 17:49:49 -07:00
Tim D. Smith
a8cbcfa080 Factor out absolute symlink test 2016-07-27 17:49:49 -07:00
Andrea Kao
7836e0953c tests: add cmd/switch integration test 2016-07-27 17:24:17 -06:00
Mike McQuaid
3318967609 os: fix Rubocop warnings. 2016-07-27 15:05:42 -06:00
Mike McQuaid
932e145d9c test-bot: run all tests in generic mode. 2016-07-27 15:05:42 -06:00
Mike McQuaid
536c42f7e6 test_version_subclasses: make OS X specific. 2016-07-27 15:05:42 -06:00
Mike McQuaid
08f68fc4dd test_x11_requirement: make OS X specific. 2016-07-27 15:05:42 -06:00
Mike McQuaid
ec9751670c test_mach: make OS X specific. 2016-07-27 15:05:42 -06:00
Mike McQuaid
51dd73dba8 test_keg: port to generic layer. 2016-07-27 15:05:42 -06:00
Mike McQuaid
7f2f602e44 test_formula: port to generic layer. 2016-07-27 15:05:42 -06:00
Mike McQuaid
1f6f832c00 test_dependency_collector: port to generic layer. 2016-07-27 15:05:42 -06:00
Mike McQuaid
541e8f28df bottles: more porting to generic layer. 2016-07-27 15:05:42 -06:00
Mike McQuaid
892a3239bc hardware: more porting to generic layer. 2016-07-27 15:05:42 -06:00
Mike McQuaid
270b0ec783 exceptions: port to generic layer. 2016-07-27 15:05:42 -06:00
Mike McQuaid
9f74ca80af diagnostic: port to generic layer. 2016-07-27 15:05:42 -06:00
Mike McQuaid
0e25fc0143 xcode: add update instruction helpers. 2016-07-27 15:05:42 -06:00
Mike McQuaid
012fc4709a development_tools: add install instruction helpers. 2016-07-27 15:05:42 -06:00
Mike McQuaid
c86c600bfd blacklist: port to generic layer. 2016-07-27 15:05:42 -06:00
Mike McQuaid
c186d39289 Rakefile: skip OS X-only tests on non-OS X. 2016-07-27 15:05:42 -06:00
Martin Afanasjew
87540ada6a utils/github: fix reverted order of credentials
We always return the token/password first and, if applicable, the user
name is the second element in the returned array.

Closes #581.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-27 21:27:25 +02:00
Martin Afanasjew
bdc1991d77 utils/github: fix broken pipe error
Closes #573.
2016-07-27 21:27:25 +02:00
Martin Afanasjew
d4b5b2080d tap: more thoroughly validate tap names
`Tap.fetch` and commands building on top of it accepted tap names like
`homebrew/homebrew/bogus` causing some misbehavior. Ensure neither
`user` nor `repo` include slashes and print a more helpful error message
that additionally includes the problematic tap name.

Closes #585.

Closes #591.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-27 21:25:13 +02:00
Martin Afanasjew
54d1e99ffe tap: test fetch/validation of invalid tap names 2016-07-27 21:25:13 +02:00
Andrea Kao
39453691ba tests: extend cmd_fail to all non-zero exit codes (#595) 2016-07-27 21:10:46 +02:00
Tim D. Smith
134d0bb486 Test Language::Python::Virtualenv 2016-07-26 21:34:06 -07:00
Tim D. Smith
2783adec4a Add helper class for Python virtualenvs 2016-07-26 21:34:06 -07:00
Mike McQuaid
4174bf147c test-bot: don't checkout/reset on --no-pull 2016-07-26 21:00:16 -06:00
Andrea Kao
e9c079e762 tests: add cmd/analytics integration test (#558) 2016-07-27 03:52:24 +02:00
Andrea Kao
0be204aab5 tests: add cmd/pull integration test (#525) 2016-07-26 17:08:01 +02:00
Mike McQuaid
265c126349 analytics.sh: use full uuidgen path on OS X.
Fixes #575.
2016-07-24 16:35:57 -06:00
Baptiste Fontaine
43dafc9859 brew.rb: Use odie instead of onoe+exit
Closes #577.

Signed-off-by: Baptiste Fontaine <b@ptistefontaine.fr>
2016-07-24 22:05:37 +02:00
Xu Cheng
cd2288a561 audit: only check undeclared deps for standard installations. (#576)
In fact, we don't really care about undeclared dependencies for optional
installations. Because, this is mainly used to help us to detect breakage
for bottles so we can do a revision bump.
2016-07-24 20:18:59 +08:00
Xu Cheng
2b9a2833bc
add BuildOptions#build_bottle?
This makes BuildOptions more compatible with Tab object. Otherwise,
`brew reinstall foo` will just crash if foo is not installed.
2016-07-21 14:38:59 +08:00
Xu Cheng
8b9ce59ce4
FormulaInstaller#sanitized_ARGV_options: fix regex
This fixes a regression caused by 2e961dc9dee63f641f7f162fd7a2845c5fd092fe,
where a misplaced `+` cause the regex only catch one character.

Fixes https://github.com/Homebrew/homebrew-science/issues/3847.
2016-07-21 14:08:06 +08:00
Dominyk Tiller
11583d0f4a
pkg-config: update for macOS 10.12 beta 3 2016-07-20 07:33:24 +01:00
Dominyk Tiller
cbdc1b7652
xcode: update expected clang for macOS 10.12 2016-07-20 07:22:03 +01:00
Andrea Kao
4f95f7ff84 tests: add cmd/irb integration test (#501) 2016-07-19 17:33:36 +02:00
Andrea Kao
4b40a87ca4 tests: nest HOMEBREW_TEMP inside TEST_TMPDIR (#554) 2016-07-19 17:23:44 +02:00
Martin Afanasjew
5768e32ad2 test-bot: fix coverage on Travis CI
Make sure to call `brew tests` only once with `--coverage` to avoid
expensive multiple runs and to prevent later runs from overwriting
previously sent results to Coveralls. (The previous setup overwrote the
results from a regular run with results from the `--generic` run.)

The `--no-compat` variant without any other options specified seemed to
be the most appropriate for a coverage report.

Closes #546.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-19 02:04:41 +02:00
Martin Afanasjew
9cf508c6e0 tests: use SimpleCov 0.12.0 and Coveralls 0.8.14
SimpleCov 0.12.0 brings some moderate speed improvements and soon (sadly
not yet) can be switched back to a stable release. Update to matching
Coveralls release, fortunately with fewer dependencies than before.
2016-07-19 02:04:40 +02:00
Martin Afanasjew
c6983aade9 tests: strip Homebrew prefix from coverage report
Make `Library/Homebrew` the new root now that *all* implementation files
are in this directory. Update filters/groups accordingly.

Note that paths in filters/groups are not anchored at the root and are
always matched against the full path. Our rules are effectively anchored
because they always include the `/Homebrew/` path component.
2016-07-19 02:04:40 +02:00
ilovezfs
45bfd2b94a inreplace: support for audit arg in non-block form
Provides feature parity between the block and non-block forms of
inreplace by creating a four-argument version of the non-block form,
where the fourth argument is an optional Boolean value, defaulting to
true, which specifies whether a failed inreplace should cause an
InreplaceError error to be raised. The fourth argument is passed along
to StringInreplaceExtension#gsub!, which already supports an optional
audit_result argument.

This resolves the Catch-22 that single replacements aren't permissible
in the block form (in that they now cause `brew audit` to complain), but
the audit_result argument is not available in the non-block form.

Closes #552.

Signed-off-by: ilovezfs <ilovezfs@icloud.com>
2016-07-18 09:24:08 -07:00
Xu Cheng
d7ee541293
reinstall: handle new options
Since we are loading options as Formula#build from tab, we will have to explicitly read
options from ARGV as well.

Fixes #3066.

Closes #537.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-18 18:11:54 +08:00
Xu Cheng
820b6347b8
remove unnecessary Tab.for_formula
We already loaded tab in ARGV.resolved_formulae or Formulary.from_rack
2016-07-18 18:11:53 +08:00
Xu Cheng
e008f6e53c
remove unnecessary build options manipulation for test and postinstall
We already loaded build options in ARGV.resolved_formulae for test and
postinstall
2016-07-18 18:11:53 +08:00
Xu Cheng
91a47a9ed6 LinkageChecker: simplify logic (#538)
BuiltOptions#without? already handles the option_names for dependencies.

Also check disabled recommended deps.
2016-07-18 18:07:00 +08:00