aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
AgeCommit message (Collapse)Author
2013-04-13Improved formula attribute validationJack Nagel
The initializer for Formula does a number of validations, but it does them in a weird order, and some attributes aren't validated under certain circumstances. This became even more of a mess when most software package attributes were moved into the SoftwareSpec class. This commit removes the last vestiges of storing these attributes as instance variables. In particular, it eliminates #set_instance_variable and #validate_variable, replacing them with methods that operate on SoftwareSpec instances, and generate more useful errors. Doing these validations unconditionally in the initializer means we bail out much earlier if the formula has invalid attributes or is not fully specified, and no longer need to validate in #prefix. Technically we don't need to validate in #brew either, but we continue to do so anyway as a safety measure, and because we cannot enforce calls to super in subclasses.
2013-04-13Clean up checksum verification testsJack Nagel
2013-04-10Eliminate test_bucketJack Nagel
Most of the behavior tested here is now tested elsewhere. Move the remaining useful tests to better places.
2013-04-10More comprehensive tests for Pathname extensionJack Nagel
2013-04-10Make test formulae initializers more flexibleJack Nagel
2013-04-10Move formula equality tests out of test_bucketJack Nagel
2013-04-09Check existence rather than rescue exceptionsJack Nagel
2013-04-09Simplify these testsJack Nagel
2013-04-08Clean up mirror support testJack Nagel
2013-04-08Fix argument order in test_comparablesetJack Nagel
2013-04-08Fix specs in TestBallJack Nagel
2013-04-08Tests for SoftwareSpec and subclassesJack Nagel
2013-04-08Ensure ARGV is cleaned upJack Nagel
2013-04-07Clean up some things in test_bucketJack Nagel
2013-04-07Simplify testsJack Nagel
2013-04-07Define RUBY_PATH for testsJack Nagel
2013-04-07test_patching: inline test classesJack Nagel
2013-04-07Isolate ARGV extension testsJack Nagel
2013-04-07Delete pointless testJack Nagel
2013-04-07Tests for AbstractDownloadStrategyJack Nagel
2013-04-07Tests for Checksum classJack Nagel
2013-04-02Suppress warnings in test_pathname_installJack Nagel
2013-04-02Add test for differing module and import nameJack Nagel
2013-04-02Fix requires in test_x11_dependency.rbJack Nagel
2013-04-02Shrink requirements.rbJack Nagel
2013-04-02Don't use "assert_not_nil"Jack Nagel
2013-04-02Split out and fix LanguageModuleDependency testsJack Nagel
2013-04-02Add new tests for fails_with DSLJack Nagel
2013-04-02Isolate compiler selector testsJack Nagel
2013-04-02Bump useable clang version to 318Jack Nagel
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-01Test that X11 env is triggered correctlyJack Nagel
2013-04-01Requirement: env DSL is evaluated in context of self, not ENVJack Nagel
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-01Make testing_env somewhat readableJack Nagel
2013-04-01Silence stderr in test suiteJack Nagel
2013-03-28Suppress uninitialized instance variable warningsJack Nagel
2013-03-28Suppress ambiguous argument and grouped expression warningsJack Nagel
2013-03-23Hardware: separate out CPU values into CPU moduleMisty De Meo
* 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-18Simplify SoftwareSpec checksum methodsJack Nagel
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-16Decouple CompilerSelector from ENVJack Nagel
2013-03-16Use a priority queue to select compilersJack Nagel
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-12Switch compilers when no build is specifiedJack Nagel
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 #18175.
2013-03-11Relocate bottles using install_name_tool.Mike McQuaid
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 #18374.
2013-03-11Portability fixes to run Homebrew on Linux systemsShaun Jackman
Closes #16344. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-10Fix test failure on ivybridge cpus.Tobias Lidskog
Closes #18371. Signed-off-by: Adam Vandenberg <flangy@gmail.com>
2013-03-09tests: allow setting MACOS_VERSION from the environmentJack Nagel
This makes it easy to test things that vary depending on this constant without editing testing_env.rb.
2013-03-09Fix tests under 32-bit SLJack Nagel
2013-03-09bottles: remove unused 'version' from DSL.Mike McQuaid
2013-03-01Support 32-bit 10.6 bottles.Mike McQuaid
Closes #17735. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-01Add non-/usr/local bottles support.Mike McQuaid
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2013-03-01Cleanup bottle DSL.Mike McQuaid
* Remove legacy url syntax. * Use revision instead of version. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>