Mike McQuaid
6e887fbf5a
sandbox: add formula? method and sandbox core.
...
Add a new `Sandbox.formula?` method to see if a given formula should be
sandboxed. Use the formula to check its tap against a list of
pre-approved taps where we know every formula builds under the sandbox
(currently just homebrew/core).
2016-08-15 08:33:58 +01:00
Mike McQuaid
fed96385ac
sandbox: add test? method.
...
Simplify checking if we’re going to sandbox a test with `Sandbox.test?`.
2016-08-15 08:33:58 +01:00
Tim D. Smith
4309a19a7c
Test that sandbox complains correctly
...
Test that sandbox does not complain about bogus .pyc errors and does
complain about other failures.
Closes #684 .
2016-08-14 12:23:17 -07:00
Mike McQuaid
fcb0b33f16
Merge pull request #682 from eirinikos/extend-cmd-audit-tests
...
tests: refactor FormulaTextTests in test_cmd_audit, add assertion to test_simple_valid_formula
2016-08-14 09:44:54 +01:00
Dominyk Tiller
36b0666f25
test_gpg: tweak rmtree usage
...
Swats away this annoying warning when the test is skipped due to GPG being
unavailable:
```
1) Skipped:
GpgTest#test_create_test_key:
GPG Unavailable
Error:
GpgTest#test_create_test_key:
NoMethodError: undefined method `rmtree' for nil:NilClass
/usr/local/Library/Homebrew/test/test_gpg.rb:11:in `teardown'
```
Closes #675 .
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-08-13 03:33:34 +01:00
Dominyk Tiller
13dcdb3098
test_gpg2_requirement: add satisfied test
2016-08-13 03:33:33 +01:00
Dominyk Tiller
2c81083f3c
test_gpg: add initial tests
2016-08-12 23:46:42 +01:00
Andrea Kao
91b67bd41d
tests: add assertion to test_simple_valid_formula
2016-08-12 15:21:27 -07:00
Andrea Kao
967a7a1862
tests: refactor FormulaTextTests in test_cmd_audit
2016-08-12 15:20:22 -07:00
Greg Nisbet
bf63c08d50
tests for shell-specific diagnostic message
2016-08-10 23:21:30 -07:00
Greg Nisbet
f1ce358551
Utils::Shell.shell_profile in formula_cellar_checks
2016-08-10 23:21:30 -07:00
Greg Nisbet
9a29a306cf
resolve conflict in diagnostic.rb
2016-08-10 23:19:09 -07:00
Mike McQuaid
d0251c1abc
formulary: fix to_rack for fully-scoped references
...
Fixes the case where I have `mysql56` installed but do
`brew uninstall foo/bar/mysql56` which isn't a valid formula.
Fixes https://github.com/Homebrew/legacy-homebrew/issues/39883 .
2016-08-10 09:40:39 +01:00
Andrea Kao
8c0b72ac0d
tests: extend cmd/install integration test
...
Closes #626 .
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-08-08 22:44:36 +02:00
Andrea Kao
c8b0a55c09
tests: refactor installation, renaming of CoreTap formula
2016-08-08 22:44:36 +02:00
Martin Afanasjew
c016aedaab
tests: check all our Bash code for syntax errors
...
Additionally include our bootstrap code in `brew.sh`, Bash utilities in
`utils.sh` and `utils/*.sh`, `superenv` shims, and the Bash completion.
Closes #654 .
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-08-08 16:00:13 +02:00
Mike McQuaid
c9fabf57a5
test_integration_cmds: non-OS X skip cask/services
2016-08-08 10:52:59 +01:00
Mike McQuaid
b7b89b9406
test/.rubocop.yml: fix check category.
2016-08-08 10:52:43 +01:00
Andrea Kao
26fb38a739
tests: add cmd/test integration test
2016-08-08 08:50:30 +01:00
Vlad Shablinsky
072e5df4ed
Cache outdated_versions for Formula
...
Closes #584 .
Signed-off-by: Xu Cheng <xucheng@me.com>
2016-08-06 21:25:57 +08:00
Vlad Shablinsky
04cb161ddb
test_formula: add outdated_versions tests
2016-08-06 21:25:56 +08:00
Vlad Shablinsky
00f37d6778
Apply and add new download strategy tests
2016-08-06 21:25:56 +08:00
Vlad Shablinsky
1114219384
Add tests for Tab versions
2016-08-06 21:25:56 +08:00
Andrea Kao
8ec59253df
tests: fix code style issues ( #587 )
2016-08-06 07:04:59 +02:00
Martin Afanasjew
d59f0f77a7
tests: fix fluctuations in test coverage ( #647 )
...
This basically started once our integration tests caused the overall
test time to raise above 10 minutes, causing some coverage data to be
dropped because SimpleCov believed it to be stale.
2016-08-06 04:24:18 +02:00
Andrea Kao
38209aadbf
tests: add cmd/migrate integration test
2016-08-04 11:44:39 +01:00
Martin Afanasjew
b77a695b7a
python: tweak script linking in virtualenv ( #613 )
...
* python: tweak script linking in virtualenv
Instead of making the formula author use a slightly awkward block like
venv.link_scripts(bin) { venv.pip_install buildpath }
avoid exposing this implementation detail and offer the more familiar:
venv.pip_install buildpath, :link_scripts => bin
* Add non-block form and use instead of recursion
* Update 'pip_install' documentation
* Remove obsolete 'link_scripts'
* Add test for 'pip_install' with linking scripts
Also drop no longer relevant (and broken) `link_scripts` test, that
served as a template for the new test.
* Restore compatibility with Ruby 1.8.7
* Replace option hash with 'pip_install_and_link'
* Avoid confusing 'Object#tap' and fix silly bug
* Avoid side effects in mock object parameter check
* Simplify argument check (no need for a block)
2016-08-02 13:37:15 -07:00
Andrea Kao
762e56db72
tests: update cmd/analytics integration test
2016-08-02 11:00:42 +01:00
Dominyk Tiller
774eefa8ae
test_utils: add with_custom_locale test
2016-08-02 03:50:49 +01:00
Mike McQuaid
7a00f03c92
utils: tell people to report deprecations to tap.
...
This should hopefully avoid Homebrew/brew or Homebrew/homebrew-core
having these exceptions reported to us.
2016-07-31 19:22:12 +01:00
Dominyk Tiller
12e7a08b7a
test_cleaner: add perl removal tests
...
Closes #609 .
Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2016-07-31 03:44:29 +01:00
Mike McQuaid
81b034a577
test_cmd_audit: don't print compat warnings.
2016-07-29 21:21:29 -06:00
Mike McQuaid
fa6377dc12
test_language_module_requirement: check for python.
2016-07-29 21:21:02 -06:00
Mike McQuaid
70a1ef5bdf
testing_env: add needs_python method.
2016-07-29 21:21:02 -06:00
Mike McQuaid
b43e49a9b8
test_formula: fix sort order bugs.
2016-07-29 21:21:02 -06:00
Mike McQuaid
1aded31fec
test_utils: remove unnecessary full paths.
2016-07-29 21:21:02 -06:00
Martin Afanasjew
12413cb760
tests: fix duplicate test case class name
...
Rename test case class to avoid two definitions of `BlacklistTests`.
2016-07-28 22:09:07 +02:00
Mike McQuaid
97b6a3069e
test: add default Linux x86_64 bottle.
2016-07-27 21:44:35 -06:00
Andrea Kao
7836e0953c
tests: add cmd/switch integration test
2016-07-27 17:24:17 -06:00
Mike McQuaid
536c42f7e6
test_version_subclasses: make OS X specific.
2016-07-27 15:05:42 -06:00
Mike McQuaid
08f68fc4dd
test_x11_requirement: make OS X specific.
2016-07-27 15:05:42 -06:00
Mike McQuaid
ec9751670c
test_mach: make OS X specific.
2016-07-27 15:05:42 -06:00
Mike McQuaid
51dd73dba8
test_keg: port to generic layer.
2016-07-27 15:05:42 -06:00
Mike McQuaid
7f2f602e44
test_formula: port to generic layer.
2016-07-27 15:05:42 -06:00
Mike McQuaid
1f6f832c00
test_dependency_collector: port to generic layer.
2016-07-27 15:05:42 -06:00
Mike McQuaid
541e8f28df
bottles: more porting to generic layer.
2016-07-27 15:05:42 -06:00
Mike McQuaid
892a3239bc
hardware: more porting to generic layer.
2016-07-27 15:05:42 -06:00
Mike McQuaid
9f74ca80af
diagnostic: port to generic layer.
2016-07-27 15:05:42 -06:00
Mike McQuaid
c86c600bfd
blacklist: port to generic layer.
2016-07-27 15:05:42 -06:00
Mike McQuaid
c186d39289
Rakefile: skip OS X-only tests on non-OS X.
2016-07-27 15:05:42 -06:00