1899 Commits

Author SHA1 Message Date
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
Adam Vandenberg
f4f54b79b7 Skip test on Xcode only systems 2013-06-26 09:45:32 -07:00
Jack Nagel
783f29fccb Uniqify tags when merging dependencies 2013-06-25 10:12:14 -05:00
Jack Nagel
553b1a0dbb Requirement: callers are responsible for invoking #satisfied?
This hack was necessary since requirements were not checked again
in the forked build process, but now they are, and calling it again
after the build environment has been set up can produce incorrect
results. In fact, if it happens to return false the second time,
the env modification will be skipped altogether.
2013-06-24 10:42:43 -05:00
Jack Nagel
59e6249862 Actually make the assertion we care about 2013-06-24 08:52:41 -05:00
Jack Nagel
6b5e73a2c3 Copy env_proc when merging deps 2013-06-24 08:52:41 -05:00
Jack Nagel
d6929f96a5 Use OkJson directly 2013-06-22 21:34:03 -05:00
Jack Nagel
083b3c84d0 Add Utils::JSON to wrap the JSON implementation 2013-06-22 21:34:02 -05:00
Jack Nagel
c4272a25cc Homebrew has an actual license, remove stale comment 2013-06-22 15:01:59 -05:00
Mike McQuaid
c59800011a Don't use cats in bottle tag tests (thanks 10.9). 2013-06-22 11:13:59 +01:00
Mike McQuaid
01e5e428eb perforce: add version detection regex. 2013-06-20 13:07:59 +01:00
Jack Nagel
e9d245cf3a Avoid unnecessary float to string conversion 2013-06-15 10:13:20 -05:00
Jack Nagel
2e2d922190 Run tests under actual OS version 2013-06-14 19:19:26 -05:00
Jack Nagel
50db35e5d3 Use Hardware::CPU module 2013-06-14 10:34:17 -05:00
Jack Nagel
0f314f9808 Remove unused variable 2013-06-12 17:25:29 -05:00
Jack Nagel
fdaea3189d Check method existence rather than Ruby version 2013-06-11 17:05:44 -05:00
Jack Nagel
784c9670f1 Add failing test for a misdetected version 2013-06-10 14:55:23 -05:00
Misty De Meo
c9c5e56363 Add :ld64 dependency
This allows formulae which won't build with Tiger's ld to conditionally
request a dependency on the ld64 formula. This modifies the build
environment appropriately, and will only be active on Tiger.
2013-06-08 19:10:38 -05:00
Jack Nagel
8cb861c695 Merge repeated deps with differing options
When expanding dependencies, repeated deps are treated as equal and all
but the first are discarded when #uniq is called on the resulting array.
However, they may have different sets of options attached, so we cannot
assume they are the same.

After the initial expansion, we group them by name and then create a new
Dependency object for each name, merging the options from each group.

Fixes Homebrew/homebrew#20335.
2013-06-08 12:23:15 -05:00
Jack Nagel
80745a97e2 Add Enumerable#group_by 2013-06-08 12:23:14 -05:00
Jack Nagel
3d66808c0e test_dependency_expansion: dep names should always be strings 2013-06-07 21:54:27 -05:00