aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
AgeCommit message (Collapse)Author
2013-10-25Disallow initializing Versions with non-stringsJack Nagel
Closes #23553.
2013-10-25Stop coercing MACOS_VERSION to a floatJack Nagel
2013-10-23test_utils: fix Mavericks arch test.Mike McQuaid
2013-10-23test_formula: add Mavericks bottles.Mike McQuaid
2013-10-23test_formula: use different/consistent SHA-1.Mike McQuaid
2013-10-22Bottle tag tests: fix Tiger Intel 64Misty De Meo
2013-10-22Eagerly initialize formula specsJack Nagel
Declarations of dependencies, options, and resources in the DSL only apply to specs that have already been initialized. For example, given this snippet: url ... sha1 ... depends_on 'foo' devel do url ... sha1 ... end The dependency 'foo' will be recorded for the stable spec, but not the devel spec, since it was not initialized prior to the call to depends_on. While it is considered best practice to declare all specs (stable, devel, head, and bottle) prior to other declarations, there is nothing that enforces this ordering, so when it happens it can be confusing and hard to debug. To prevent this, we can initialize all specs up front. This comes with a performance penalty for commands that load all formulae into memory, but that is probably outweighed by what we gain in correctness. Fixes #23425.
2013-10-21Fix bottle_tag testsMisty De Meo
2013-10-18Add OS.mac? and OS.linux?Jack Nagel
2013-10-14Remove pointless assertionJack Nagel
2013-10-14Assert on state, not something that didn't happenJack Nagel
2013-10-11Resource: do not mutate passed-in specs hashJack Nagel
2013-10-11CurlDownloadStrategy: dup mirror list before mutating itJack Nagel
2013-10-11icu4c: add bottle regex.Mike McQuaid
2013-10-11VCSDownloadStrategy: rename checkout_name to cache_filenameJack Nagel
2013-10-10git_etc: update based on bottle etc/var changes.Mike McQuaid
2013-10-09Extract a new superclass for VCS-based download strategiesJack Nagel
2013-10-07Fix test failure for C++ stdlib.Xiyue Deng
2013-10-06CxxStdlib: allow for nil stdlibsMisty De Meo
A nil stdlib value represents non-C++ code.
2013-10-04Check types in Formula#==Jack Nagel
Comparing two objects should not raise an exception, even if they have different types. The semantics of #== are now the same as #eql?, so make one an alias.
2013-09-30Handle invalid names in download strategiesJack Nagel
When subformulae are initialized without a name parameter, Homebrew assigns the name "__UNKNOWN__". This may cause collisions in the cache. Currently CurlDownloadStrategy and its descendants handles this by extracting the basename form the URL and using that as the cached filename. However, other strategies simply raise an exception. We can improve the other strategies by URL-encoding the URL string and using that as the cached directory name. Note that this happens very rarely, especially now that resources (which always have a name) are preferred to subformulae. The most common case is a subformula that specifies a head download. Closes #22949.
2013-09-28Infer dependencies from download strategies and URLsJack Nagel
Closes #20849. Closes #22871.
2013-09-26Raise when given an invalid download strategy specJack Nagel
When DownloadStrategyDetector.detect is given a second argument, and that argument is not a symbol or an AbstractDownloadStrategy subclass, it is silently ignored, and we fall back to guessing the strategy based on the URL. This means I can do url 'http://foo.com/bar.tar.gz', :using => Class.new and things will appear to work, even though I have clearly passed an invalid value for :using. A more useful behavior is to raise an exception for unknown strategy specifications.
2013-09-23Set owner of resources to SoftwareSpec objectJack Nagel
2013-09-21Move dependencies to SoftwareSpecJack Nagel
2013-09-21Move options to SoftwareSpecJack Nagel
2013-09-20Add tests to ensure ENV.compiler is correctJack Nagel
2013-09-20At some point this started working againJack Nagel
2013-09-17Make spec-scoped resources override top-level resourcesJack Nagel
2013-09-17SoftwareSpec tests are now Resource testsJack Nagel
2013-09-14Copies of BuildOptions should not share underlying collectionsJack Nagel
2013-09-14Tear down the cache after installation testsJack Nagel
2013-09-14Move SoftwareSpec to a separate fileJack Nagel
2013-09-13Stop exposing the download strategy from FormulaJack Nagel
2013-09-13Stop mutating dependency specificationsJack Nagel
2013-09-10Fix CompilerSelector test for llvmMisty De Meo
Update test to reflect that llvm-gcc should take precedence over non-Apple GCC.
2013-09-07Optionally use git to keep brew etc versioned.Mike McQuaid
Still in alpha state. Handles defaults and merging changes with new versions. Enable by setting the HOMEBREW_GIT_ETC environment variable. Closes #15751. Closes #17713.
2013-09-05Fix breakage in option recognitionJack Nagel
Fixes #22347.
2013-09-05Improve python tests for brew botsSamuel John
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-01Tab: track C++ stdlib in useMisty De Meo
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-01Implement fails_with for non-Apple compilersMisty De Meo
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-08-31Add test for option description rulesJack Nagel
2013-08-31Add test for dependency optionsJack Nagel
2013-08-26Add some tests for ENV.{append,prepend} behaviorJack Nagel
2013-08-22Options: ensure copies do not share the underlying collectionJack Nagel
2013-08-22Demonstrate the Set-like nature of Options collectionsJack Nagel
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-19Add tests for ENV.{append,prepend}_pathJack Nagel
2013-08-19Use ENV.append_pathJack Nagel
2013-08-19Use File::PATH_SEPARATOR globally instead of ':'Amos Wenger
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 #21921. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19Initial tests for superenv sanityJack Nagel