1507 Commits

Author SHA1 Message Date
Baptiste Fontaine
7b4c43e512 tests: cmd/audit tests added 2016-01-25 01:26:24 +01:00
Martin Afanasjew
89f97295b8 tests: speed up integration test runs
While running a command from the integration tests, invoke `.result` to
trigger a save of the result set, but don't call `.format!` to avoid
(re)generating the HTML output with every run. The final output will
still be written once the main unit test run completes.

This significantly speeds up the integration tests, that take about 1/3
less time to complete when not generating the intermediate output.

Closes Homebrew/homebrew#48280.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-21 05:42:23 +01:00
Martin Afanasjew
274640c97a tests: use unique identifiers w/ integration tests
Commands executed during integration testing are executed in a separate
process and thus generate a new result set for each command. To avoid
that these results override each other, they need to have a unique
`command_name`. Derive this name from the test class/name and the index
of the command inside that test, resulting in identifiers like
`IntegrationCommandTests#test_prefix.1 brew --prefix`.

Also replaces `TEST_TMPDIR` in the arguments with `"@TMPDIR@"` to get a
cleaner command identifier that is independent of the temporary
directory that changes with every run.
2016-01-21 05:42:23 +01:00
Martin Afanasjew
a12c5816aa tests: remove useless filter for coverage tests
The filter for `vendor/bundle/` is useless because this directory is
located in `Homebrew/test/` and that one is already filtered. Moreover,
SimpleCov already loads the `bundler_filter` profile (that installs
basically the same filter) in its default configuration.
2016-01-21 05:42:06 +01:00
Baptiste Fontaine
5775d3b326 command: support .sh commands
Closes Homebrew/homebrew#48192.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-20 22:27:13 +01:00
Baptiste Fontaine
c1e673e19a commands: support .sh commands 2016-01-20 22:27:13 +01:00
Alex Dunn
b8547eab2c update test for Homebrew/homebrew-emacs#158
Closes Homebrew/homebrew#48131.

Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
2016-01-20 11:42:36 -08:00
Alex Dunn
0cde5dd060 test: add metafiles to testball 2016-01-20 11:42:36 -08:00
Baptiste Fontaine
da500eec6a tests: ExternalPatch test added 2016-01-20 20:15:34 +01:00
Baptiste Fontaine
343f431c46 tests: exceptions tests added 2016-01-20 20:15:34 +01:00
Baptiste Fontaine
4ba4812d1d tests: tap-readme integration test added 2016-01-20 20:15:34 +01:00
Baptiste Fontaine
36c734b392 tests: cmd/edit & cmd/info tests added 2016-01-20 20:15:34 +01:00
Baptiste Fontaine
861910b85f sh: flush stdout before executing the shell
Closes Homebrew/homebrew#48268.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-20 11:37:42 +01:00
Martin Afanasjew
026363e1ed diagnostic: fix autoconf check
Xcode can only provide autotools if it is installed, thus check that
first. Skipping this check will try to compare a `nil` Xcode version to
4.3, the first version of Xcode to not provide autotools.

Fixes Homebrew/homebrew#48208.

Closes Homebrew/homebrew#48278.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-20 10:23:21 +01:00
Mike McQuaid
5b7dd99e99 Revert "Revert "dependency: don't recurse infinitely.""
This reverts commit fa43883dd1cd82f234b79c4a322339f03b9c098d.

Closes Homebrew/homebrew#48187.
2016-01-18 08:59:52 +00:00
Misty De Meo
066dd63a87 test_edit: HOMEBREW_EDITOR takes precedence over EDITOR 2016-01-17 13:07:46 -08:00
Mike McQuaid
04a9b0022d test_bash: tests to assert Bash syntax is valid.
Closes Homebrew/homebrew#47380.
2016-01-17 19:48:02 +00:00
Mike McQuaid
99234f0256 Add new update-bash command for testing.
This will become the default updater at a later point in the future.
2016-01-17 19:48:02 +00:00
Baptiste Fontaine
42a4f44c0e tests: bump the min. coverage to 60 2016-01-16 20:25:57 +01:00
Baptiste Fontaine
f41e0a6e64 tests: more integration tests
Closes Homebrew/homebrew#48124.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-16 15:46:01 +01:00
Xu Cheng
8deec537d1 test_download_strategies: add mtime test 2016-01-15 16:26:04 +08:00
Xu Cheng
fab16b83e9 tab: add source modified time metadata 2016-01-15 16:26:04 +08:00
Xu Cheng
9810c2a412 test_tap: restore private remote test
Only test it if HOMEBREW_GITHUB_API_TOKEN is set.
2016-01-11 22:07:15 +08:00
Xu Cheng
86cc780ea2 test_tap: remove problematic test
`Tap#private?` requires Github API, which can cause problem on Travis CI
due to API rate limit.
2016-01-11 19:47:35 +08:00
Xu Cheng
f6355c9dfc test_keg: add test_empty_installation 2016-01-09 21:09:02 +08:00
Xu Cheng
f0b22c4ce3 fix test_missing test 2016-01-09 19:11:34 +08:00
Baptiste Fontaine
f0d1444980 tests: missing requires added
Closes Homebrew/homebrew#47866.
Closes Homebrew/homebrew#47861.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-09 10:37:40 +01:00
Baptiste Fontaine
daf659cbae more utils tests
Closes Homebrew/homebrew#47856.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-09 10:37:29 +01:00
Baptiste Fontaine
beb80c605f more diagnostic tests 2016-01-09 10:37:29 +01:00
Baptiste Fontaine
5162df8f65 a few more diagnostic checks
Closes Homebrew/homebrew#47769.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-07 11:43:56 +01:00
Baptiste Fontaine
8e75375d9d diagnostic tests
Closes Homebrew/homebrew#47760.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-06 13:15:35 +01:00
Baptiste Fontaine
c8401b8243 a few more integration tests
Closes Homebrew/homebrew#47714.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-06 12:22:58 +01:00
Baptiste Fontaine
9f1442db14 doctor: move code away from cmd/
Closes Homebrew/homebrew#47665.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-05 14:33:06 +01:00
Baptiste Fontaine
5d8a6e368f integration tests: allow env overriding 2016-01-05 14:33:06 +01:00
Martin Afanasjew
c5f0003061 test: don't fail if GitHub API is unavailable
Tests shouldn't fail in case of an unavailable network or a deliberately
disabled access to the GitHub API.

Closes Homebrew/homebrew#47670.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-04 16:26:36 +01:00
Martin Afanasjew
301d88544f test: exhaustively test comparison of versions
This tests all possible combinations of alpha, beta, RC, regular, and
patch versions. Also improves code coverage and partitions the version
comparison tests into more uniform chunks.

Closes Homebrew/homebrew#47669.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-04 16:26:25 +01:00
Martin Afanasjew
74baec5e79 test: test popen_read and popen_write with block 2016-01-04 16:26:25 +01:00
Baptiste Fontaine
8f8c3cc1b1 integration tests: fix failing test
If the test fails above `formula_file`’s definition this line fails
because `formula_file` is `nil`.

Closes Homebrew/homebrew#47663.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-04 15:12:32 +01:00
Baptiste Fontaine
9bdd6619e2 cleanup: move code away from cmd/
Closes Homebrew/homebrew#47484.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-04 13:17:21 +01:00
Dominyk Tiller
cff0c63d03 test_intergration_cmds: fix minor typo 2016-01-03 19:06:26 +00:00
Dominyk Tiller
49f7c8d6a9 test_intergration_cmds: paren-wrap regex
Fixes this `brew readall` warning:

test_integration_cmds.rb:116: warning: ambiguous first argument; put parentheses or even spaces
2016-01-03 19:06:26 +00:00
Xu Cheng
17a57f529b test_utils: add test_which_all 2016-01-03 21:00:11 +08:00
Xiyue Deng
e1dfafa54c Improve dash separated version detection.
* Also with test case.

Closes Homebrew/homebrew#47584.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-02 20:06:17 +01:00
Misty De Meo
36cef3c974 LanguageModuleRequirement: remove node support 2016-01-01 20:10:34 -04:00
Misty De Meo
1ad2aeef86 LanguageModuleRequirement: remove chicken support 2016-01-01 20:10:34 -04:00
Misty De Meo
d4db443b19 LanguageModuleRequirement: remove rbx support
This test wasn't running by default, so we missed that it wasn't
actually being executed - or that it was failing when running in the
testing environment.

As far as I can tell this is not, and has not, been used either in core
or in any tap, third party or otherwise, so just remove the feature and
its test.
2016-01-01 20:10:34 -04:00
Misty De Meo
31501e7b38 Add more tests for DependencyCollector inferred deps 2015-12-31 19:52:41 -04:00
Xu Cheng
3d8c334660 test_utils: add test_disk_usage_readable and test_number_readable 2015-12-30 17:05:52 +08:00
Baptiste Fontaine
c15c9dbaf3 Tap#issues_url added
Closes Homebrew/homebrew#47454.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-30 00:44:46 +01:00
Baptiste Fontaine
e224c2fc9e more formula tests
Closes Homebrew/homebrew#47404.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-27 02:20:41 +01:00