469 Commits

Author SHA1 Message Date
Jack Nagel
65fc34cd03 Add tests to ensure ENV.compiler is correct 2013-09-20 22:54:07 -05:00
Jack Nagel
5b7b8fb5da At some point this started working again 2013-09-20 15:52:08 -05:00
Jack Nagel
9c7a18bdcb Make spec-scoped resources override top-level resources 2013-09-17 21:29:53 -05:00
Jack Nagel
3793c05845 SoftwareSpec tests are now Resource tests 2013-09-17 21:29:50 -05:00
Jack Nagel
71b21c920f Copies of BuildOptions should not share underlying collections 2013-09-14 17:03:56 -05:00
Jack Nagel
cecf9a564f Tear down the cache after installation tests 2013-09-14 11:53:32 -05:00
Jack Nagel
a31fcb554c Move SoftwareSpec to a separate file 2013-09-14 10:16:52 -05:00
Jack Nagel
adceeb52f6 Stop exposing the download strategy from Formula 2013-09-13 22:33:46 -05:00
Jack Nagel
f2ebc0e325 Stop mutating dependency specifications 2013-09-13 09:57:53 -05:00
Misty De Meo
15a3ae3d28 Fix CompilerSelector test for llvm
Update test to reflect that llvm-gcc should take precedence over
non-Apple GCC.
2013-09-10 13:08:03 -07:00
Mike McQuaid
ab20ed0bc2 Optionally use git to keep brew etc versioned.
Still in alpha state.
Handles defaults and merging changes with new versions.
Enable by setting the HOMEBREW_GIT_ETC environment variable.

Closes Homebrew/homebrew#15751.
Closes Homebrew/homebrew#17713.
2013-09-07 13:39:43 +01:00
Jack Nagel
a871baadf5 Fix breakage in option recognition
Fixes Homebrew/homebrew#22347.
2013-09-05 18:51:27 -05:00
Samuel John
59a0c1e1b5 Improve python tests for brew bots
Allow `build.with?` and similar methods to be used during the test
phase. The BuildOptions (`build`) are initialized with the
`Tab.used_options` unless explicitly overwritten on the command line.

So basically `build.with?` works in `def install` and in `test do` as
one would naively expect. (For the test, gramatically it should be
`built.with?` but who cares)

If a formula was installed `--with-python`, now the tests are also
run `--with-python`. This enables us to use the `python do ... end` in
a meaningful manner.

Using `python do ... end` blocks for the tests, because the bot.brew.sh has
system python per default and we need to set the PYTHONPATH for the test.
Potentially to different values for Python 2.x and 3.x.
2013-09-05 15:26:57 +02:00
Misty De Meo
b71682bdc7 Tab: track C++ stdlib in use
There are subtle incompatibilities between Apple's libstdc++ and the
libstdc++ used by the various GNU GCC formulae. In addition, we'll
likely also be supporting libc++ in the future, and that's also
incompatible with the other stdlibs.

Tracking it in the tab lets us make sure that dependencies are all
built against the same stdlib to avoid subtle breakage.
2013-09-01 13:19:13 -07:00
Misty De Meo
ef1d9c0cd0 Implement fails_with for non-Apple compilers
This adds support for non-Apple GCC compilers in the fails_with code.
A fails_with block for a non-Apple compiler looks like:

fails_with :gcc => '4.8.1' do
  cause 'Foo'
end

Non-Apple compilers don't have build numbers, so compiler failures are
based on version strings instead.

Internally non-Apple compilers can be distinguished because they are
passed around as strings instead of symbols.

In addition, this alters the priority list for compilers, with the
following changes:

* Apple GCC 4.2 and LLVM-GCC swap positions, with GCC now taking
  priority. (Maybe LLVM-GCC should just go away.)
* Non-Apple GCC compilers are ranked below GCC 4.2 but above LLVM-GCC
  and Apple GCC 4.0.
2013-09-01 13:19:13 -07:00
Jack Nagel
dd94518a40 Add test for option description rules 2013-08-31 20:40:06 -05:00
Jack Nagel
6ed24d3877 Add test for dependency options 2013-08-31 16:09:49 -05:00
Jack Nagel
870e47e68c Add some tests for ENV.{append,prepend} behavior 2013-08-26 15:02:51 -05:00
Jack Nagel
9b2e04593f Options: ensure copies do not share the underlying collection 2013-08-22 11:49:24 -05:00
Jack Nagel
7654077752 Demonstrate the Set-like nature of Options collections
Options collections are backed by Sets, and thus trying to push a new
option with a name that duplicates an existing option cannot succeed.

Later, we can exploit this behavior and remove some conditionals.
2013-08-22 11:35:00 -05:00
Jack Nagel
865b68de10 Add tests for ENV.{append,prepend}_path 2013-08-19 17:21:14 -05:00
Jack Nagel
ea8f51256b Use ENV.append_path 2013-08-19 17:21:13 -05:00
Amos Wenger
52ace99f14 Use File::PATH_SEPARATOR globally instead of ':'
On Unix, the path separator is ':', whereas on Windows,
it is ';'. This is the first of a series of patch to bring
macbrew's and winbrew's codebases closer together.

The main places the magic constant ':' was being used were:
  - the $PATH environment variable
  - CMAKE-related environment variables
  - pkg-config related environment variables

Closes Homebrew/homebrew#21921.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19 13:35:44 -05:00
Jack Nagel
a6771cd327 Initial tests for superenv sanity 2013-08-19 12:33:00 -05:00
Jack Nagel
a03120868f No longer call ENV.userpaths! in requirements
Instead we use which with a custom PATH.
2013-08-19 12:33:00 -05:00
Jack Nagel
e0574b854e More robust implementation of ENV.with_build_environment 2013-08-19 12:32:59 -05:00
Jack Nagel
dd9c269c69 Rename HomebrewEnvExtension to Stdenv 2013-08-19 12:32:59 -05:00
Misty De Meo
0f580953b4 Mach: improve tests 2013-08-15 22:46:56 -07:00
Adam Vandenberg
7c1671667f pathname: remove unused return values
Return value was used only by one test, rewrote test to know expected value.
2013-08-13 20:41:08 -07:00
Jack Nagel
d5325eb4e4 Always prune empty toplevel directories when unlinking
Closes Homebrew/homebrew#21750.
2013-08-09 20:55:54 -05:00
Jack Nagel
e4b951520a Keep track of pruned parent directories 2013-08-09 20:50:43 -05:00
Jack Nagel
1d8a85c0ae Add tests to demonstrate failure to prune empty directories 2013-08-09 20:50:43 -05:00
Jack Nagel
bca37554b7 Remove hardcoded paths in keg tests 2013-08-09 20:50:42 -05:00
Jack Nagel
1074221a22 Remove keg test dependency on formula 2013-08-09 20:50:42 -05:00
Mike McQuaid
98c3d39e65 bottle_versions: add ssh_copy_id bottle detection. 2013-08-03 22:27:42 -07:00
Mike McQuaid
b507536f80 bottle_versions: add perforce bottle detection. 2013-08-03 22:27:42 -07:00
Mike McQuaid
cfdd23b3ef bottles: use dedicated version class. 2013-08-03 22:27:42 -07:00
Mike McQuaid
705a248719 versions: remove perforce bottle detection. 2013-08-03 22:27:42 -07:00
Jack Nagel
325db99a3c RbConfig::CONFIG['bindir'] is already a string 2013-07-28 16:43:22 -05:00
Jack Nagel
023aff10c7 Adjust logic to properly sort erlang versions
Fixes Homebrew/homebrew#21417.
2013-07-24 19:48:21 -05:00
Jack Nagel
fcfc53df33 Check deps of satisfied deps 2013-07-22 21:36:11 -05:00
Jack Nagel
6090b9b2bf Silence warnings 2013-07-22 11:41:47 -05:00
Jack Nagel
9b51f986c8 Remove duplication in updater tests 2013-07-09 22:12:08 -05:00
phinze
9a94a77fa3 Properly define tapped formulae in update
A tapped formula is a ruby file present:

  - in the root of the tap
  - in directory of the tap called Formula
  - in a directory of the tap called HomebrewFormula

And nowhere else. This corrects an overzealous definition of tapped
formula in the updater. (the correct definition has been in Pathname
since e613cbe5783cea2abb8100b56c22126a1ab6b9f2)

Refs Homebrew/homebrew#19743.
Closes Homebrew/homebrew#21087.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-07-09 20:52:51 -05:00
Misty De Meo
be9f2d7dea Add Haswell to CPU tests
These tests need a lot of work...
2013-07-01 01:06:44 -05:00
Victor Martinez
829675719b Fixed several broken sourceforge.net download locations
Closes Homebrew/homebrew#20645.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-06-30 12:17:57 -07:00
Jack Nagel
f6536e9c8b Reject versions that aren't strings 2013-06-28 21:18:04 -05:00
Jack Nagel
033ef09518 Detect versions in tag specs
Closes Homebrew/homebrew#18300.
Closes Homebrew/homebrew#20891.
2013-06-28 21:17:23 -05:00
Jack Nagel
10949ad75d Fix some #eql? correctness issues
The implementation of #eql? and #hash should ensure that if a.eql?(b),
then a.hash == b.hash, but #eql? itself should not *depend* on #hash.

For example, given

  class Thingy
    def eql?
      instance_of?(other.class) && hash == other.hash
    end

    def hash
      [name, *tags].hash
    end
  end

if #hash produces a collision for different values of [name, *tags], two
Thingy objects will appear to be eql?, even though this is not the case.
Instead, #eql? should depend on the equality of name and tags directly.
2013-06-27 01:18:45 -05:00
Jack Nagel
919aac0b89 Add syntax sugar for MPIDependency
Closes Homebrew/homebrew#20797.
2013-06-26 22:18:13 -05:00