aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
AgeCommit message (Collapse)Author
2016-07-10tests: fuse broken/split --repository testsMartin Afanasjew
The latter was replacing the former due to an identical method name.
2016-07-10tests: remove bogus cleanup testMartin Afanasjew
Test was added in 61614d35294c8faffaeb5c7f0ec6dea78dbbc30f, but never had any effect because it was replaced by a method of the same name a few lines further down.
2016-07-09tap: run readall when tapping. (#396)Mike McQuaid
* readall: move readall logic to new class. * tap: run readall when tapping. This will prevent tapping an tap with syntax errors from causing issues for users. Fixes #58.
2016-07-08test_integration_cmds: use a single teardown. (#475)Mike McQuaid
Instead of writing a custom ensure for every test let's just nuke all the files every time. This may be something we might want to use for other unit tests too. It leans heavily on the fact that a `FileUtils.rm_rf` on files that don't exist is very quick and things like `brew cleanup` are super slow in comparison. Before: ``` $ brew tests --only=integration_cmds --official-cmd-taps Finished in 49.764724s, 1.0047 runs/s, 5.2648 assertions/s. ``` After: ``` $ brew tests --only=integration_cmds --official-cmd-taps Finished in 43.014769s, 1.1624 runs/s, 5.8352 assertions/s. ```
2016-07-06development_tools: add installed? method. (#455)Mike McQuaid
2016-07-06test_download_strategies: add git testsVlad Shablinsky
2016-07-06doctor: check for beta XQuartz releasesMisty De Meo
Beta versions of XQuartz have address sanitization enabled, which breaks some software at runtime, including wine. Closes Homebrew/homebrew-core#2481. Closes #459. Signed-off-by: Misty De Meo <mistydemeo@github.com>
2016-07-05test/lib/config: group paths by persistenceMartin Afanasjew
Rearrange path constants such that persistent paths (that point into the Homebrew code base) are in one spot and all other paths (that are being redirected to a temporary location for the duration of the test run) are grouped together. Closes #440. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-05gist-logs: truncate log files to be gist-friendly (#279)Andrew Janke
Truncates each log file to about 1 MB. This avoids upload and download errors with the gists, and respects GitHub's suggested size limits.
2016-07-05tests: fix leak in '[un]linkapps' integration test (#439)Martin Afanasjew
Prior to the fix, every run of the test suite would leave behind a pair of empty directories in `$TMPDIR`. (A temporary home directory was created but only its child `Applications` was wiped when done.)
2016-07-04Remove unnecessary official command tapping.Mike McQuaid
2016-07-04test_integration_cmds: loosen cask test.Mike McQuaid
2016-07-04Revert "Revert "Test officially supported cmd taps. (#390)""Mike McQuaid
This reverts commit dba1958bd79c1c9d18f215dfc2b806ea62edd1c8.
2016-07-04Revert "Test officially supported cmd taps. (#390)"Martin Afanasjew
This reverts commit 252c701c59227c385ef6178fe99523cca8c843bb. Taps installed prior to running the test suite are not visible to the test suite as most Homebrew paths are redefined as to not mess up the local installation.
2016-07-04Test officially supported cmd taps. (#390)Mike McQuaid
All of these taps use Homebrew internal APIs (or will shortly) and we autoinstall them all from `brew $CMD`. We should adjust our CI to ensure that we never accidentally break these taps when making changes to core code so that these taps can rely more on this core code rather than having to e.g. vendor equivalent code that never changes on our end.
2016-07-02test_formula: improve test_migration_neededVlad Shablinsky
Closes #432. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-29Tests for Step classTim D. Smith
Closes #419.
2016-06-29Move with_environment to testing_envTim D. Smith
2016-06-29Test resolve_test_tapTim D. Smith
2016-06-29test_formula: add migration_needed testVlad Shablinsky
2016-06-29test_formula: add outdated_versions testsVlad Shablinsky
2016-06-29test: Add tests for Keg#mach_o_files link behavior.William Woodruff
Move dylib_path and bundle_path from test_mach to testing_env to accommodate the new tests. Closes #400. Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-06-27Revert "test: Add test for Keg#mach_o_files hardlink behavior."Tim D. Smith
This reverts commit 62d7079684cdb568600e22531c62888622a71ff1.
2016-06-27test: Add test for Keg#mach_o_files hardlink behavior.William Woodruff
Move dylib_path and bundle_path from test_mach to testing_env to accommodate the new test. Closes #400. Signed-off-by: Tim D. Smith <git@tim-smith.us>
2016-06-22tests: refactor formula file creation (#370)Andrea Kao
2016-06-19tests: add cmd/search integration test (#356)Andrea Kao
2016-06-16ENV: mark gcc-6 as supporting C++11 (#349)msbit
Add SharedEnvExtension#gcc_with_cxx11_support? to centralise the logic for checking whether a compiler is known to support C++11. Update logic to accept GCC 4.8 and above (including 6). Thereby also address oversight in #163 where support for GCC 6 was added without updating the C++11 compiler whitelist. Add tests for Superenv#cxx11. Closes #346.
2016-06-14tests: fix problems in 'log with formula' test (#350)Martin Afanasjew
Problems fixed: - Broken and leaking test if run as part of `brew tests --coverage` due to the `cmd` call being nested in the `Pathname#cd` block. - Output during `git clone` operation because of a missing `shutup do`. - Still incomplete coverage for `cmd/log.rb` because `brew log` is invoked on the formula in the origin instead of the shallow clone. - Minor stylistic fixes: - Superfluous parentheses around `core_tap.path.dirname`. - Overly long lines.
2016-06-14tests: simplify SimpleCov configuration (#348)Martin Afanasjew
There is no good reason to configure the options specific to integration tests in a completely different location from all other options.
2016-06-14tests: avoid compat code in --no-compat mode (#347)Martin Afanasjew
Simply drop because the `require`s are not actually used by the tests and no file from `compat/` should be loaded unconditionally. (This can otherwise lead to incorrect results for `brew tests --no-compat`.)
2016-06-14tests: add test bottle for SierraDominyk Tiller
Fixes: ``` 1) Error: FormularyFactoryTest#test_factory_from_bottle: Errno::ENOENT: No such file or directory - /usr/local/Library/Homebrew/test/bottles/testball_bottle-0.1.sierra.bottle.tar.gz /usr/local/Library/Homebrew/formulary.rb:98:in `realpath' /usr/local/Library/Homebrew/formulary.rb:98:in `realpath' /usr/local/Library/Homebrew/formulary.rb:98:in `initialize' /usr/local/Library/Homebrew/formulary.rb:274:in `new' /usr/local/Library/Homebrew/formulary.rb:274:in `loader_for' /usr/local/Library/Homebrew/formulary.rb:215:in `factory' /usr/local/Library/Homebrew/test/test_formulary.rb:79:in `test_factory_from_bottle' ``` Closes #358. Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-06-12tests: extend cmd/log integration test (#333)Andrea Kao
2016-06-08introduce global lock directory (#337)Xu Cheng
Since #292, HOMEBREW_CACHE was moved to a per-user directory. This makes it unsuitable to store global lock files on multiple users environment. Therefore, introducing a global lock directory `/Library/Lock.d` to store lock files from formula lockers as well as `brew update`.
2016-06-03tests: extend cmd/desc integration test (#314)Andrea Kao
2016-06-02tests: add missing requireMartin Afanasjew
Amends e4d0187120e61bc80d31ebecc3b38f0740b20bb5. The `require` was accidentally omitted causing the tests to fail very sporadically (or always, when invoked as `brew tests --only=integration_cmds`).
2016-06-02tests: extend cmd/home integration test (#305)Andrea Kao
2016-05-30test_integration_cmds: fix when not a developer.Mike McQuaid
2016-05-30tests: no --only minimum coverage requirement. (#299)Mike McQuaid
This will almost certainly fail every time so let's disable this error.
2016-05-27tests: fix external command test and code style (#281)Martin Afanasjew
The check that `t4` is not an external command would always succeed, but not because the file wasn't executable, but because it wasn't even found due to the missing `brew-` prefix. Also change the valid but atypical file mode from 0744 to 0755 and apply minor code style fixes.
2016-05-22Remove LLVM-GCC support. (#252)Mike McQuaid
At this point it's never a good compiler to use so let's just remove it.
2016-05-15Synchronize counts for link and unlink (#242)Paolo G. Giarrusso
Closes #239.
2016-05-08test_integration_cmds: print output on failure. (#213)Mike McQuaid
Makes it easy to debug what’s gone wrong.
2016-05-08test_integration_cmds: add cleanup test.Mike McQuaid
2016-05-08Make development tools code cross-platform.Mike McQuaid
2016-05-08Make bottle code cross-platform.Mike McQuaid
2016-05-03Tty: Avoid truncating if not sensibleScore_Under
This causes truncate to simply return the original string if the terminal is not very wide, or if the terminal is unsupported.
2016-05-02Update Homebrew/homebrew references in codeMartin Afanasjew
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew` depending on context.
2016-05-02Update Homebrew/homebrew references in commentsMartin Afanasjew
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew` depending on context.
2016-04-27Language::Node.npm_install_args: add helper method (#37)Christian Moritz
* add Language::Node helper module This adds a language module for Node module based formulas. It contains the 2 public methods `std_npm_install_args(libexec)` and `local_npm_install_args`: * `std_npm_install_args` is intended to be used in formulas for standard node modules and returns `npm install` args for a global style module installation to libexec. * `local_npm_install_args` is for formulas, in which the `npm install` step is only one of multiple parts of the installation process and returns `npm install` args for a default local installation in place. Both methods have in common, that they are * making sure that a working copy of npm and node-gyp from node's libexec is prepended to the PATH (to not rely of a user managed npm) * seting the npm cache to HOMEBREW_CACHE/npm, which fixes issues caused by overriding $HOME resulting in long install times + high disk usage (see https://github.com/Homebrew/brew/pull/37#issuecomment-208840366) * audit: update npm install check for Language::Node * cleanup: remove npm_cache too * doc: add Node-for-Formula-Authors.md
2016-04-21doctor: remove autotools checkMisty De Meo