26 Commits

Author SHA1 Message Date
Mike McQuaid
a1b0ef1300 Remove unnecessary official command tapping. 2016-07-04 18:26:47 +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
Mike McQuaid
3e982b9720 tests: default to testing offline. (#430)
Set HOMEBREW_NO_GITHUB_API to allow running all tests (but search's
integration test specifically for now) offline. This can be overridden
with `--online`.
2016-07-04 13:32:58 +01:00
Tim D. Smith
9b36e83771 Add magic token to hide commands from man page
Closes #402.
2016-06-29 09:01:36 -07:00
Tim D. Smith
be3d33ea36 Document command line options for brew tests 2016-06-29 09:00:46 -07:00
Mike McQuaid
0551471536 tests: no --only minimum coverage requirement. (#299)
This will almost certainly fail every time so let's disable this error.
2016-05-30 10:49:03 +01:00
Mike McQuaid
bb72260606 tests: add generic flag. (#212)
Makes it easier to quickly do tests of the generic/cross-platform
backend.
2016-05-08 17:12:14 +01:00
Andrew Janke
05efd70dc3 Analytics: Separate user-supplied and internal-use DISABLE_ANALYTICS (#155)
This prevents `brew` self-calls from interacting with the stickiness of
HOMEBREW_NO_ANALYTICS being persisted to the brew repo and accidentally
disabling analytics permanently when it should have been for just one run,
while restoring the stickiness of an explicit user-supplied
HOMEBREW_NO_ANALYTICS.
2016-04-26 04:28:38 -04:00
Mike McQuaid
0c85113053 Homebrew (opt-in) Analytics tweaks. (#57)
- add `HOMEBREW_PRODUCT` global variable
- only differentiate between `/usr/local` and `non-/usr/local` Homebrew
  prefixes to avoid sharing sensitive user information
- note if e.g. build errors are occurring under CI
- Add `HOMEBREW_NO_ANALYTICS` variable (this will be how people opt-out
  when this is enabled for everyone)
- Add `HOMEBREW_ANALYTICS_DEBUG` variable to output all the analytics
  that are sent
- Move Bash analytics code to `Library/Homebrew/utils/analytics.sh`
- Add documentation for our analytics and why/what/when/how and opt-out
- Only official Homebrew commands are reported
- Ruby analytics are now reported in a forked, background process
2016-04-12 11:02:22 +01:00
Martin Afanasjew
5786f36b62 tests: add --only=<test>[/<method>] flag
Simplify running a single test (or even a single method from a single
test), which is useful when developing or debugging a test. Instead of
`brew test TEST=test_diagnostic.rb TESTOPTS=--name=test_check_DYLD_vars`
it is now possible to run `brew tests --only=diagnostic/check_DYLD_vars`
to get the same effect. Similarly, `brew tests --only=diagnostic` maps
to `brew test TEST=test_diagnostic.rb`.

Closes Homebrew/homebrew#48279.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-01-21 05:42:06 +01:00
Martin Afanasjew
0d1e72f55f tests: allow passing --seed <number>
This parameter is printed by every `brew tests` run and feeding it back
into the test suite allows to get an identical run. Make it easier to
do that by accepting the argument as it is printed during `brew tests`.

This requires a slight adjustment to named-argument passing as the
number that follows `--seed` is also seen as a named argument, but we
usually only want to pass `TEST=<something>` and `TESTOPTS=<something>`.
2016-01-21 05:42:06 +01:00
Baptiste Fontaine
44a264376b tests: rm the coverage cache before each run
Closes Homebrew/homebrew#48209.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2016-01-19 00:28:41 +01:00
Martin Afanasjew
bd4f633673 tests: use predefined commit author for robustness
Some tests, that construct a Git repository for testing, will silently
fail if the global Git user isn't properly set up. There are valid use
cases for this, thus use a fixed commit author/committer for all tests
instead of relying on the user's configuration.
2016-01-04 16:26:36 +01:00
Baptiste Fontaine
86bd9c9f39 tests: pass --trace and named args to rake
Closes Homebrew/homebrew#47279.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-12-23 12:33:32 +01:00
Xu Cheng
ebd0f34561 tests: show fs leak result
Closes Homebrew/homebrew#41956.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-22 20:27:20 +08:00
Xu Cheng
9e6f1412ad test-bot: run brew tests in no-compat mode
Closes Homebrew/homebrew#42009.

Signed-off-by: Xu Cheng <xucheng@me.com>
2015-07-22 20:27:02 +08:00
Xu Cheng
1ead0d4fe5 tests: use ARGV.include? instead of ARGV.flag? 2015-07-21 15:02:15 +08:00
Baptiste Fontaine
44a8ebdc7e 'brew tests' optional coverage measure added
Closes Homebrew/homebrew#41890.

Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
2015-07-20 20:44:12 +02:00
Mike McQuaid
1cd0a47067 tests.rb: use Homebrew.failed to send exit code. 2015-01-04 11:05:34 +00:00
Mike McQuaid
9e8103cf38 Add Homebrew.install_gem_setup_path! function.
This uses the logic from tests.rb in man.rb too so that this can be
shared in a few places.
2015-01-02 12:42:02 +00:00
Mike McQuaid
9531ecc72a Use bundler for test gem dependencies.
Closes Homebrew/homebrew#31986.
References Homebrew/homebrew#31981.
2014-09-10 13:29:14 +01:00
Jack Nagel
10a1952d2c Only "extend self" once on the Homebrew module 2014-06-19 13:10:36 -05:00
Adam Vandenberg
a9a5c53d75 fix permisions on tests 2014-05-21 16:56:10 -07:00
Adam Vandenberg
c6f1ccc215 make tests an internal command 2014-05-21 08:27:13 -07:00