1899 Commits

Author SHA1 Message Date
Jack Nagel
0497afbe57 Clean up some things in test_bucket 2013-04-07 20:59:52 -05:00
Jack Nagel
c816ad70b6 Simplify tests 2013-04-07 20:59:52 -05:00
Jack Nagel
9013b3a0c9 Define RUBY_PATH for tests 2013-04-07 20:59:52 -05:00
Jack Nagel
34bcb10b54 test_patching: inline test classes 2013-04-07 20:59:51 -05:00
Jack Nagel
bafbd07c9e Isolate ARGV extension tests 2013-04-07 20:59:51 -05:00
Jack Nagel
a79b7d6e0f Delete pointless test 2013-04-07 20:59:51 -05:00
Jack Nagel
2288f63197 Tests for AbstractDownloadStrategy 2013-04-07 20:59:50 -05:00
Jack Nagel
349cdab76f Tests for Checksum class 2013-04-07 20:59:49 -05:00
Jack Nagel
4ebafbf62f Suppress warnings in test_pathname_install 2013-04-02 15:47:25 -05:00
Jack Nagel
3bceaf8f5e Add test for differing module and import name 2013-04-02 15:41:51 -05:00
Jack Nagel
5b5361b92e Fix requires in test_x11_dependency.rb 2013-04-02 15:33:35 -05:00
Jack Nagel
b82ae7067d Shrink requirements.rb 2013-04-02 15:33:35 -05:00
Jack Nagel
c3d48b5d8a Don't use "assert_not_nil" 2013-04-02 15:33:34 -05:00
Jack Nagel
207f24be07 Split out and fix LanguageModuleDependency tests 2013-04-02 15:33:34 -05:00
Jack Nagel
9dd6d74b44 Add new tests for fails_with DSL 2013-04-02 13:19:04 -05:00
Jack Nagel
2f49fd07b1 Isolate compiler selector tests 2013-04-02 13:19:04 -05:00
Jack Nagel
c61c1fb813 Bump useable clang version to 318
Build 211 can build most things, but I've seen intermittent
miscompilation and slower code. Also it comes from Xcode 4.2, so most
people don't have it anyway. Let's use 218 as the minimum viable
version.
2013-04-02 13:19:04 -05:00
Jack Nagel
d2ae810b76 Test that X11 env is triggered correctly 2013-04-01 18:56:14 -05:00
Jack Nagel
1b0f0824fe Requirement: env DSL is evaluated in context of self, not ENV
This was meant to support:

  env do |req|
    append_path 'PATH', req.some_method
    ...
  end

i.e., the block was evaluated in the context of ENV. But it turned out
to be not so useful after all, so I'm ripping it out before something
actually depends on it.
2013-04-01 16:17:35 -05:00
Jack Nagel
6a58650611 Make testing_env somewhat readable 2013-04-01 15:53:42 -05:00
Jack Nagel
cfe922ffd4 Silence stderr in test suite 2013-04-01 12:15:29 -05:00
Jack Nagel
0d45c3c0f2 Suppress uninitialized instance variable warnings 2013-03-28 17:37:29 -05:00
Jack Nagel
d994c6cdda Suppress ambiguous argument and grouped expression warnings 2013-03-28 17:37:29 -05:00
Misty De Meo
2476801613 Hardware: separate out CPU values into CPU module
* CPU functions now exist in Hardware::CPU
* Added compatibility functions in compat/hardware_compat.rb
* Names are less specific to Mac hardware, e.g. CPU.family instead of
  Hardware.intel_family
* Hardware::CPU.family works for both Intel and PowerPC
* New helper methods on CPU, like .sse4? and .altivec?

Signed-off-by: Misty De Meo <mistydemeo@gmail.com>
2013-03-23 13:40:18 -05:00
Jack Nagel
c8168d8a4a Simplify SoftwareSpec checksum methods
Reader methods for specific checksum types have been absent from the
Formula class for some time, so there isn't any reason to expose them in
SoftwareSpec, either.

Thus, these methods now only act as setters, and #checksum should be
used to access the constructed Checksum object.
2013-03-18 15:10:36 -05:00
Jack Nagel
a55fa2c359 Decouple CompilerSelector from ENV 2013-03-16 13:05:02 -05:00
Jack Nagel
f8b4959742 Use a priority queue to select compilers
The existing case-statement with nested if-statements is gross and hard
to extend. Replacing it with a priority queue simplifies the logic and
makes it very easy to add new compilers to the fails_with system, which
we will likely want to do in the future.
2013-03-16 13:05:02 -05:00
Jack Nagel
cc08d08d74 Switch compilers when no build is specified
Given the current state of OS X compilers, the original fails_with
behavior is becoming less useful, mostly resulting in build failures
each time the compiler is updated. So make the following changes:

When a build is specified, we retain the old behavior: switch compilers
if the available compiler is <= the build, don't switch if it is > the
build.

When no build is specified, unconditionally switch compilers, and don't
output the advice message. This allows us to mark formulae as
perpetually failing, avoiding the need to update formulae each time a
new compiler build is made available.

As a bonus, this makes the logic much easier to reason about.

Closes Homebrew/homebrew#18175.
2013-03-12 13:55:15 -05:00
Mike McQuaid
0f9910d352 Relocate bottles using install_name_tool.
This has two parts:

1. Bottles are temporarily relocated on bottling and tested if that is
sufficient for them to contain no longer reference the prefix or
cellar. If so, they are marked as relocatable.
2. On installation if bottles are marked as relocatable they will be
relocated using install_name_tool to the current prefix and cellar.

Closes Homebrew/homebrew#18374.
2013-03-11 18:58:37 +00:00
Shaun Jackman
258d70028f Portability fixes to run Homebrew on Linux systems
Closes Homebrew/homebrew#16344.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-11 18:26:25 +00:00
Tobias Lidskog
a4a795c096 Fix test failure on ivybridge cpus.
Closes Homebrew/homebrew#18371.

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-03-10 10:37:56 -07:00
Jack Nagel
8e530d861b tests: allow setting MACOS_VERSION from the environment
This makes it easy to test things that vary depending on this constant
without editing testing_env.rb.
2013-03-09 17:38:49 -06:00
Jack Nagel
303feacdd9 Fix tests under 32-bit SL 2013-03-09 17:38:45 -06:00
Mike McQuaid
5a2874c652 bottles: remove unused 'version' from DSL. 2013-03-09 21:27:41 +00:00
Mike McQuaid
8f35793020 Support 32-bit 10.6 bottles.
Closes Homebrew/homebrew#17735.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-01 17:49:09 +00:00
Mike McQuaid
20c0ddc401 Add non-/usr/local bottles support.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-01 17:49:09 +00:00
Mike McQuaid
360af367a8 Cleanup bottle DSL.
* Remove legacy url syntax.
* Use revision instead of version.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-01 17:49:09 +00:00
Jack Nagel
aca48deda0 BuildEnvironment: use separate sets for procs and symbols 2013-02-25 14:01:02 -06:00
Jack Nagel
1a799f04e6 Remove unused variables 2013-02-18 12:13:35 -06:00
Jack Nagel
866b3cf6a8 Add test for String#get_make_var 2013-02-15 00:39:22 -06:00
Jack Nagel
71f85300b4 Establish a convention for Requirement names
The name attribute of requirements is used when generating options for
the :optional and :recommended dependency tags.

Unless otherwise specified, the name attribute of a Requirement will be
populated by stripping any module prefixes from the beginning and
"Dependency" or "Requirement" from end of the class name and downcasing
the result.

Closes Homebrew/homebrew#17759.
2013-02-12 16:26:10 -06:00
Jack Nagel
248891fde1 Avoid nil in URL specs 2013-02-11 20:52:07 -06:00
Jack Nagel
3e9241312d Add :libltdl dep for libtool's libltdl
The :libtool dep is implicitly a build-time dep; :libltdl can be used
for software that uses the ltdl library at runtime.
2013-02-10 19:28:14 -06:00
Jack Nagel
803649bf04 Shrink DependencyCollector#parse_symbol_spec and add tests 2013-02-10 19:27:33 -06:00
Jack Nagel
97d3ae1775 Extract formula locks into a class 2013-02-09 18:19:50 -06:00
Jack Nagel
b65398c549 LanguageModuleDependency: foward args to superclass initalizer 2013-02-08 00:12:49 -06:00
Jack Nagel
7fbeb0df3d MacOSVersion -> MacOS::Version 2013-02-07 12:39:54 -06:00
Jack Nagel
b41bb64c7a Flesh out MacOSVersion tests 2013-02-07 12:35:15 -06:00
Jack Nagel
4515803474 Add tests for raise monkey patch 2013-02-06 19:04:43 -06:00
Jack Nagel
1408610b81 Proper recursive expansion of requirements with filtering
Expand requirements recursively while applying the same optional? and
recommended? filters that dependencies are run through. Options
generated by requirements are now checked against the correct list of
requirements, eliminating the temporary "best guess" logic in the
installer.
2013-01-31 15:40:06 -06:00