aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_build_options.rb
AgeCommit message (Collapse)Author
2016-11-16Reorder and rename test files.Markus Reiter
2016-10-03fix bad method name in testBruce Steedman
2016-10-03invalid build options - fixed conflicts; renameBruce Steedman
2015-12-15Add option_name tests.Mike McQuaid
2015-08-03Core files style updates.BrewTestBot
Closes Homebrew/homebrew#42354. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
2014-08-13Replace Options.coerce with an alternate constructorJack Nagel
2014-08-13Options is no longer used directly by BuildOptionsJack Nagel
2014-08-13Always pass an Options instance to the BuildOptions constructorJack Nagel
2014-08-13Revert "Always pass an Options instance to the BuildOptions constructor"Mike McQuaid
This reverts commit e143bcef259ca76b2124e6e73bd9bdf872418723. Closes Homebrew/homebrew#31557. Closes Homebrew/homebrew#31559. Closes Homebrew/homebrew#31561. Closes Homebrew/homebrew#31562.
2014-08-13Revert "Options is no longer used directly by BuildOptions"Mike McQuaid
This reverts commit 1c05bc0238aa1abf7d5542b8afa11ead2bee66a8.
2014-08-13Revert "Replace Options.coerce with an alternate constructor"Mike McQuaid
This reverts commit 8d2ef974a3a87bf4207f71ccb8a7b4776e16a016.
2014-08-12Replace Options.coerce with an alternate constructorJack Nagel
2014-08-12Options is no longer used directly by BuildOptionsJack Nagel
2014-08-12Always pass an Options instance to the BuildOptions constructorJack Nagel
2014-08-11Deep copies of the build object are no longer neededJack Nagel
2014-08-10Stop exposing defined options from the build objectJack Nagel
2014-08-09Stop duping options when duping the build objectJack Nagel
The options collection cannot be mutated from the build object, so it can be shared among copies safely.
2014-07-31Hide the options data structure betterJack Nagel
2014-07-31Make options available on the spec objectsJack Nagel
2014-07-30Remove confusing implicit options handlingJack Nagel
This code is supposed to allow depends_on "foo" => "with-bar" to work when foo has only a "without-bar" option. The options system was not designed to support this. Unfortunately, it was bolted on anyway. The implementation is extremely difficult to understand, and it only works for certain types of options, which is confusing from a user's point of view. Luckily, no formulae in core or the official taps rely on the behavior in order to function. It is hindering progress in improving this code, so I am removing it.
2014-07-30Simplify BuildOptions copy testsJack Nagel
2014-06-18Use assert_includesJack Nagel
2014-06-18Use a custom test class so we can avoid monkeypatchingJack Nagel
2014-06-11Fix up some assertionsJack Nagel
2013-09-14Copies of BuildOptions should not share underlying collectionsJack Nagel
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-06-03Python 2.x and 3.x supportSamuel John
New `depends_on :python` Dependency. New `depends_on :python3` Dependency. To avoid having multiple formulae with endings -py2 and -py3, we will handle support for different pythons (2.x vs. 3.x) in the same formula. Further brewed vs. external python will be transparently supported. The formula also gets a new object `python`, which is false if no Python is available or the user has disabled it. Otherwise it is defined and provides several support methods: python.site_packages # the site-packages in the formula's Cellar python.global_site_packages python.binary # the full path to the python binary python.prefix python.version python.version.major python.version.minor python.xy # => e.g. "python2.7" python.incdir # includes of python python.libdir # the python dylib library python.pkg_config_path # used internally by brew python.from_osx? python.framework? python.universal? python.pypy? python.standard_caveats # Text to set PYTHONPATH for python.from_osx? python.if3then3 # => "" for 2.x and to "3" for 3.x. Further, to avoid code duplication, `python` takes an optional block that is run twice if the formula defines depends_on :python AND :python3. python do system python, 'setup.py', "--prefix=#{prefix}" end Read more in the Homebrew wiki.
2013-01-26FormulaInstaller: construct new ARGV from an Options collectionJack Nagel
The array of options that is passed to the spawned build process is a combination of the current ARGV, options passed in by a dependent formula, and an existing install receipt. The objects that are interacting here each expect the resulting collection to have certain properties, and the expectations are not consistent. Clear up this confusing mess by only dealing with Options collections. This keeps our representation of options uniform across the codebase. We can remove BuildOptions dependency on HomebrewArgvExtension, which allows us to pass any Array-like collection to Tab.create. The only other site inside of FormulaInstaller that uses the array is the #exec call, and there it is splatted and thus we can substitute our Options collection there as well.
2013-01-26Add support for optional and recommended depsAdam Vandenberg
Optional deps are not installed by default but generate a corresponding "with-foo" option for the formula. Recommended deps _are_ installed by default, and generate a corresponding "without-foo" option.
2013-01-26Tests for BuildOptionsJack Nagel