aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
AgeCommit message (Collapse)Author
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 Homebrew/homebrew#22949.
2013-09-28Infer dependencies from download strategies and URLsJack Nagel
Closes Homebrew/homebrew#20849. Closes Homebrew/homebrew#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 Homebrew/homebrew#15751. Closes Homebrew/homebrew#17713.
2013-09-05Fix breakage in option recognitionJack Nagel
Fixes Homebrew/homebrew#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 Homebrew/homebrew#21921. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2013-08-19Initial tests for superenv sanityJack Nagel
2013-08-19No longer call ENV.userpaths! in requirementsJack Nagel
Instead we use which with a custom PATH.
2013-08-19More robust implementation of ENV.with_build_environmentJack Nagel
2013-08-19Rename HomebrewEnvExtension to StdenvJack Nagel
2013-08-15Mach: improve testsMisty De Meo
2013-08-13pathname: remove unused return valuesAdam Vandenberg
Return value was used only by one test, rewrote test to know expected value.
2013-08-09Always prune empty toplevel directories when unlinkingJack Nagel
Closes Homebrew/homebrew#21750.
2013-08-09Keep track of pruned parent directoriesJack Nagel
2013-08-09Add tests to demonstrate failure to prune empty directoriesJack Nagel
2013-08-09Remove hardcoded paths in keg testsJack Nagel
2013-08-09Remove keg test dependency on formulaJack Nagel
2013-08-03bottle_versions: add ssh_copy_id bottle detection.Mike McQuaid
2013-08-03bottle_versions: add perforce bottle detection.Mike McQuaid
2013-08-03bottles: use dedicated version class.Mike McQuaid
2013-08-03versions: remove perforce bottle detection.Mike McQuaid
2013-07-28RbConfig::CONFIG['bindir'] is already a stringJack Nagel
2013-07-24Adjust logic to properly sort erlang versionsJack Nagel
Fixes Homebrew/homebrew#21417.
2013-07-22Check deps of satisfied depsJack Nagel
2013-07-22Silence warningsJack Nagel
2013-07-09Remove duplication in updater testsJack Nagel