2459 Commits

Author SHA1 Message Date
Misty De Meo
aed54ce966 Hardware test: add :arrandale
For some reason :arrandale was missing from the list of hardware in the
Intel family in the hardware test.
2012-04-20 10:44:19 -05:00
Jack Nagel
af7bf47e31 tests: add utility method to quell output
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-18 15:16:00 -05:00
Jack Nagel
2e2a492045 tests: silence zip output in test_bucket
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16 23:53:35 -05:00
Jack Nagel
6e203a280c tests: silence test_detect_failed_configure
The standard `nostdout` method doesn't work here because Formula#system
does some redirection of its own; both stdout and stderr have to be of
the same type, so just do it manually here.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16 23:45:44 -05:00
Jack Nagel
c44cb2710b tests: replace tests script with rake-based runner
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16 23:08:32 -05:00
Jack Nagel
84a4935bb5 tests: setup and teardown cleanups
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-16 23:08:32 -05:00
Jack Nagel
1d0be89fa5 tests: reorganize compiler selection tests
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 15:27:45 -05:00
Jack Nagel
5d84df0210 tests: bring brew update tests up to date
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 00:00:04 -05:00
Jack Nagel
a64f417f36 tests: remove special-casing @path in TestBall
Tests that expect Formula#path to resolve to a real path should use
TestBallWithRealPath; TestBall gets its original behavior back, fixing a
failing test in test_formula_install.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-14 00:00:04 -05:00
Jack Nagel
f296683409 tests: fix no-op fails_with test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-09 17:45:35 -05:00
Jack Nagel
25a148d6a1 Clean up fails_with test classes
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-07 13:29:40 -05:00
Jack Nagel
d2c9b27e14 info: output correct URL for tapped dupes
Tapped formulae that dupe those in core now display the correct URL when
invoked like `brew info homebrew/dupes/openssl`.

This also fixes the broken `brew info` test.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 23:54:41 -05:00
Jack Nagel
504756745b tests: silence mirror test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 22:06:05 -05:00
Jack Nagel
9614301be4 Fix protection against overriding Formula#brew
The test for this previously passed, but only because the constructor
for SoftwareSpecification was raising an exception. method_added needs
to be a class method because methods are being defined on the class, not
the object, and to test it properly we have to eval the class in the
test itself.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 17:32:43 -05:00
Jack Nagel
d3ba9723b2 Add test for ghc version style
the ghc formula had an explicit version because we had trouble parsing
the version from the 64-bit URL. It is working now, so add a test to
ensure it isn't broken in the future.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-06 00:08:23 -05:00
Jack Nagel
bb8fcc8901 Reset compiler when testing fails_with
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01 14:56:04 -05:00
Jack Nagel
de444ead0b New fails_with infrastructure
- Formulae can now declare failures on any compiler.
 - FailsWithLLVM and associated formula elements have been moved to
   compat.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-04-01 12:39:59 -05:00
Jack Nagel
5dc15272d9 ENV: reset LD when switching compilers
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-21 12:22:22 -05:00
Adam Vandenberg
07736cb8fa Allow a different package and import name for language deps.
Some times the module to import is different than the module to install
when dealing with external dependencies. This change allows an optional
import name to be specififed when it is different from the module name.

Closes Homebrew/homebrew#11078.
2012-03-20 19:43:41 -07:00
Adam Vandenberg
975459a75c Add tests for patches.rb 2012-03-20 19:24:58 -07:00
Jack Nagel
6424cbf0de Update external deps tests
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-11 15:41:45 -05:00
Jack Nagel
8973d1dbcf Remove redundant versions and update version tests
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-11 15:18:56 -05:00
Mike McQuaid
4a306f32f4 Support bottles for non-Lion OSX versions. 2012-03-10 18:09:35 +13:00
Jack Nagel
fe25e4f7ec Fix typo in test_arch_for_command
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-09 11:50:27 -06:00
Mike McQuaid
a005834d7a Run tests from anywhere and provide an exit code. 2012-03-09 18:28:47 +13:00
Mike McQuaid
0e2258f0fa Fix test_ENV on 10.7/Xcode 4. 2012-03-09 16:49:19 +13:00
Mike McQuaid
31e2ec485b Fix test_arch_for_command on 10.7. 2012-03-09 16:49:19 +13:00
Max Howell
b63ec18564 Proper single character switch handling
Includes a test. So now you can do `brew cleanup -ns` and it will work.
2012-03-06 20:28:06 +00:00
Jack Nagel
19a0aa51a1 Adjust updater tests for git config calls
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-03-05 12:35:55 -06:00
Second Planet
8a4cb8c0ac Add more external dep options
* Chicken Scheme
* Node.js
* Rubinius

Closes Homebrew/homebrew#8466.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2012-02-25 10:19:59 -08:00
Adam Vandenberg
847a2732ee Update return values of install and install_symlink
These now return an Array of all the target destinations.
Previously, if a single argument was passed a single non-
Array was returned.

This behavior has been changed so that an Array is always returned
even for a single argument.

Updated the test.

Hopefully this won't break any custom code out there.
2012-02-17 23:07:16 -08:00
Jack Nagel
e251e5e4ec Adjust ARGV tests
ARGV.kegs and ARGV.formulae no longer raise exceptions.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-02-04 00:34:22 -06:00
Jack Nagel
b3092ea3f7 Fix failing ENV tests
We need the ARGV extension now that we call ARGV.build_bottle? in
set_cpu_cflags.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-25 21:20:13 -06:00
Max Howell
9a774ac0a6 Fix libinet version detection 2012-01-14 03:48:03 +00:00
Jack Nagel
ae4ea06e22 pathname: recognize ".cpio.*" double extensions
Just a cosmetic nicety.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-12 20:31:47 -06:00
Jack Nagel
826064880e tests: add missing require to test_ENV
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2012-01-01 23:58:15 -06:00
Jack Nagel
ffd5b7d7ab Add support for xz-compressed tarballs
Rationale: some software (e.g. GNU Coreutils, GnuTLS 3.x), have started
distributing _only_ xz-compressed tarballs. There is no system XZ
utility provided by OS X, but it is necessary so that we can continue to
provide formulae for this software.

If XZUtils isn't installed, we abort and prompt the user to `brew
install xz`.

The `xz` command itself doesn't do any untarring, so we write the
decompressed archive to stdout and pipe it to tar.
2011-12-09 16:16:46 -06:00
Jack Nagel
dec66e951a update: correct failing tests
Commit dec4b73aa0 ("Allow `brew update --rebase`") changed the format of
the `git pull` command slightly, introducing an extra space (to allow
for the --rebase option), so let's update the test expectations for this.

We still need to write tests for '--rebase', but in the meantime they
once again pass for the normal case.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 17:37:36 -05:00
Jack Nagel
27d2a95e8f Correctly parse ImageMagick bottle version
Commit 2695821e98 ("Only use the bottle if its version is up-to-date")
essentially broke the ImageMagick bottle, because the version parsing
logic returns "1" as the bottle version.

Fixing this requires only a slight modification to the bottle URL regex;
includes a test.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-21 17:29:14 -05:00
Charlie Sharpsteen
3ada407922 mirror support: Add test 2011-09-19 09:25:02 -07:00
Chris Ledet
f1cd284f12 Add :sandybridge to hardware_family test
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-08 21:29:51 -05:00
Jack Nagel
eb52b97a1e tests: actually use bzip for test tarball
I inadvertently gzipped it last night. That in itself doesn't cause any
tests to fail because the download strategy code is robust, but it's
fixed here anyway to be consistent. Basically, I'm dumb.

I also took the opportunity to remove the other resource fork file, so
the tarball is clean.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 11:45:56 -05:00
Jack Nagel
23dbe43fb7 tests: fix failing test_a_basic_install
The test_a_basic_install was failing because it expected
libexec.children.length to be 1, when in fact there were two files in
the untarred libexec: NOOP, and the Mac OS X resource fork file ._NOOP.

That file is now removed, and the test passes.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 01:20:56 -05:00
Jack Nagel
c8d4af5611 update: bring tests up-to-date
The tests for update have been neglected during the last few rounds of
changes, so fix them up.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2011-09-02 00:55:20 -05:00
Max Howell
19e387d92e brew upgrade
Consequence: you can no longer install when something is already installed, you must upgrade it. This doesn't apply if the formula in question was unlinked. You can still --force installs though.

Rationale: the old way of installing over the top would leave symlinks to multiple versions in /usr/local if the old version had a file the newer version didn't. The new upgrade command handles everything properly.
2011-08-24 22:30:43 +01:00
Max Howell
42cc28597c HOMEBREW_CURL_ARGS so that tests can be more silent 2011-08-24 22:30:43 +01:00
Mike McQuaid
23769d62ad Fix brew bottle versioning. 2011-06-21 19:04:17 +01:00
Mislav Marohnić
8c521ca3d0 refactor update command to use git diff instead of parsing pull output
This fixes reporting of which formulae changed in git versions where `pull`
output is not compatible.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-06-14 14:47:39 -07:00
Mislav Marohnić
5fdb145e76 enable updater tests to be run on their own
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-06-14 14:47:33 -07:00
Austin Ziegler
007b9e72d5 Adding version detection to sf.net /download urls
SourceForge links can end with /download which appears to be part of
what is used to drive mirror selection. Modifying the version detection
extension of pathname.rb to detect this case for both sourceforge.net
and sf.net download selections.

This is sufficient for version detection but may not be sufficient for
other uses of /download links. I have not found any problems with links
that use /download, though.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2011-03-25 22:30:10 -07:00