1899 Commits

Author SHA1 Message Date
Martin Afanasjew
54d1e99ffe tap: test fetch/validation of invalid tap names 2016-07-27 21:25:13 +02:00
Andrea Kao
39453691ba tests: extend cmd_fail to all non-zero exit codes (#595) 2016-07-27 21:10:46 +02:00
Tim D. Smith
134d0bb486 Test Language::Python::Virtualenv 2016-07-26 21:34:06 -07:00
Andrea Kao
e9c079e762 tests: add cmd/analytics integration test (#558) 2016-07-27 03:52:24 +02:00
Andrea Kao
0be204aab5 tests: add cmd/pull integration test (#525) 2016-07-26 17:08:01 +02:00
Andrea Kao
4f95f7ff84 tests: add cmd/irb integration test (#501) 2016-07-19 17:33:36 +02:00
Andrea Kao
4b40a87ca4 tests: nest HOMEBREW_TEMP inside TEST_TMPDIR (#554) 2016-07-19 17:23:44 +02:00
Martin Afanasjew
9cf508c6e0 tests: use SimpleCov 0.12.0 and Coveralls 0.8.14
SimpleCov 0.12.0 brings some moderate speed improvements and soon (sadly
not yet) can be switched back to a stable release. Update to matching
Coveralls release, fortunately with fewer dependencies than before.
2016-07-19 02:04:40 +02:00
Martin Afanasjew
c6983aade9 tests: strip Homebrew prefix from coverage report
Make `Library/Homebrew` the new root now that *all* implementation files
are in this directory. Update filters/groups accordingly.

Note that paths in filters/groups are not anchored at the root and are
always matched against the full path. Our rules are effectively anchored
because they always include the `/Homebrew/` path component.
2016-07-19 02:04:40 +02:00
Vlad Shablinsky
4b2c4ef258
Update and test eligible_kegs_for_cleanup
Closes #478.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-16 20:39:14 +08:00
Vlad Shablinsky
3fb5d70a72
Unify Version.create usage
Substitue each Version.new and HeadVersion.new with Version.create
to unify Version and HeadVersion instantiation among core code.

Note that this does not relate to Mac::OS::Version class.
2016-07-16 20:39:13 +08:00
Vlad Shablinsky
454003c4c1
test_formula: test new HEAD methods
* Test `Formula#update_head_version`
* Test `Formula#latest_head_prefix`
2016-07-16 20:39:13 +08:00
Vlad Shablinsky
458f9a008c
Apply tests to new HEAD format 2016-07-16 20:39:13 +08:00
Vlad Shablinsky
00cdd5f481
Add HeadVersion tests 2016-07-16 20:39:13 +08:00
Josh Hagins
4abdeb7b5e update: Don't report formulae that are moved within a tap but not renamed (#480) 2016-07-16 07:18:30 +02:00
Mike McQuaid
a07ab8bb92 brew.{rb,sh}: move to Library/Homebrew. (#506) 2016-07-15 19:33:30 +01:00
Mike McQuaid
a02be9eea2 ENV: move to new paths. (#507)
Move some stuff formerly in `Library/ENV` around:
- Move `Library/ENV/$XCODE_VERSION` to `Library/Homebrew/env/super` as they are
  all superenv wrappers and all symlinks to the same version. We never needed
  the "separate shims for separate versions" functionality and it just adds
  confusion.
- Move `Library/ENV/pkgconfig` to `Library/Homebrew/env/pkgconfig` to get more
  things under `Library/Homebrew`
- Move `Library/ENV/scm` to `Library/scm` as these wrappers are not actually
  used by or related to superenv (or stdenv) in any way.
2016-07-15 19:03:45 +01:00
Xu Cheng
b62a2c7e7f
add more test
Closes #514.

Signed-off-by: Xu Cheng <xucheng@me.com>
2016-07-15 19:57:23 +08:00
Mike McQuaid
f6dad377b6 test-bot: start running generic tests. (#505)
* test-bot: start running generic tests.

Start running the test suite in the "generic" mode i.e. a base layer for
non-OS X platforms to be able to use to ensure we don't break the generic code
for the parts of the code we've got running.

Currently this just runs the integration tests as that's the only useful suite
that's entirely passing but eventually this will be changed to run the full test
suite in generic mode.

* test_integration_cmds: fix tests on Linux.
2016-07-14 14:37:50 +01:00
Andrea Kao
c8812522a4 tests: add cmd/link, cmd/unlink integration tests (#398) 2016-07-13 00:22:06 +02:00
Mike McQuaid
ac229f95b5 test_integration_cmds: compile in install test. (#479)
Most of our formulae do compilation so let's do it here too.
2016-07-11 09:20:00 +01:00
Dominyk Tiller
64b1822bca
test_language_go: update for HOMEBREW_DEVELOPER odie
Closes #488.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-07-10 21:26:39 +01:00
Martin Afanasjew
ecc329e33f tests: clean up after bottle test
Fix minor regression in b55250c44eacd49646407b26a73753965d4d36d0. The
bottle is placed in the current working directory, is unaffected by the
the single teardown introduced in #475, and thus needs manual handling.

Closes #483.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-10 16:01:10 +02:00
Martin Afanasjew
942e1a726b tests: fuse broken/split --repository tests
The latter was replacing the former due to an identical method name.
2016-07-10 16:01:10 +02:00
Martin Afanasjew
9eed84b85c tests: remove bogus cleanup test
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-10 16:01:10 +02:00
Mike McQuaid
4da990587f tap: run readall when tapping. (#396)
* 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-09 13:51:19 +01:00
Mike McQuaid
b55250c44e test_integration_cmds: use a single teardown. (#475)
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-08 20:20:43 +01:00
Mike McQuaid
3a127e405e development_tools: add installed? method. (#455) 2016-07-06 11:07:24 +01:00
Vlad Shablinsky
0b2cc5c20d
test_download_strategies: add git tests 2016-07-06 16:19:49 +08:00
Misty De Meo
ca005cb824 doctor: check for beta XQuartz releases
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-06 17:21:05 +10:00
Martin Afanasjew
9e021aa661 test/lib/config: group paths by persistence
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-05 20:09:07 +02:00
Andrew Janke
f518f57bd8 gist-logs: truncate log files to be gist-friendly (#279)
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-05 08:45:17 -04:00
Martin Afanasjew
1b1bf56733 tests: fix leak in '[un]linkapps' integration test (#439)
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-05 14:36:02 +02:00
Mike McQuaid
a1b0ef1300 Remove unnecessary official command tapping. 2016-07-04 18:26:47 +01:00
Mike McQuaid
26dcc9786d test_integration_cmds: loosen cask test. 2016-07-04 17:17:20 +01:00
Mike McQuaid
bf42959609 Revert "Revert "Test officially supported cmd taps. (#390)""
This reverts commit dba1958bd79c1c9d18f215dfc2b806ea62edd1c8.
2016-07-04 17:05:37 +01:00
Martin Afanasjew
dba1958bd7 Revert "Test officially supported cmd taps. (#390)"
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-04 17:41:14 +02:00
Mike McQuaid
252c701c59 Test officially supported cmd taps. (#390)
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-04 16:08:53 +01:00
Vlad Shablinsky
fbac41d95b test_formula: improve test_migration_needed
Closes #432.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-07-02 00:29:45 +02:00
Tim D. Smith
a2681d196f Tests for Step class
Closes #419.
2016-06-29 21:17:09 -07:00
Tim D. Smith
f04ffb614d Move with_environment to testing_env 2016-06-29 21:16:50 -07:00
Tim D. Smith
8cf11912de Test resolve_test_tap 2016-06-29 09:03:09 -07:00
Vlad Shablinsky
0d3b5f6849
test_formula: add migration_needed test 2016-06-29 21:04:27 +08:00
Vlad Shablinsky
d47df68cbd
test_formula: add outdated_versions tests 2016-06-29 21:04:27 +08:00
William Woodruff
cb3ad215b4 test: Add tests for Keg#mach_o_files link behavior.
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-29 14:34:08 +02:00
Tim D. Smith
70ceb851a5 Revert "test: Add test for Keg#mach_o_files hardlink behavior."
This reverts commit 62d7079684cdb568600e22531c62888622a71ff1.
2016-06-27 23:25:10 -07:00
William Woodruff
62d7079684 test: Add test for Keg#mach_o_files hardlink behavior.
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-27 22:56:28 -07:00
Andrea Kao
8b31167a43 tests: refactor formula file creation (#370) 2016-06-22 13:37:17 +01:00
Andrea Kao
cad85754cf tests: add cmd/search integration test (#356) 2016-06-19 22:20:20 +01:00
msbit
01e8e180a8 ENV: mark gcc-6 as supporting C++11 (#349)
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-16 14:15:28 +02:00