92 Commits

Author SHA1 Message Date
Mike McQuaid
ebdb879fe4 Add --help to all developer commands.
Also, flag those that we never want to be in a manpage.
2016-09-08 09:05:00 +01:00
Mike McQuaid
dfcbefff73 Merge pull request #201 from gregory-nisbet/feature-env-shells
--env: support more shells, allow explicit shell selection
2016-09-04 21:23:33 +01:00
Dominyk Tiller
f37d7a5637
test_integration_cmds: use https://bot.brew.sh 2016-08-26 01:43:25 +01:00
Mike McQuaid
27ecf588c7 Rename bottle's revision to rebuild. 2016-08-18 17:32:35 +01: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
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
Mike McQuaid
c9fabf57a5 test_integration_cmds: non-OS X skip cask/services 2016-08-08 10:52:59 +01:00
Andrea Kao
26fb38a739 tests: add cmd/test integration test 2016-08-08 08:50:30 +01:00
Andrea Kao
8ec59253df tests: fix code style issues (#587) 2016-08-06 07:04:59 +02:00
Andrea Kao
38209aadbf tests: add cmd/migrate integration test 2016-08-04 11:44:39 +01:00
Andrea Kao
762e56db72 tests: update cmd/analytics integration test 2016-08-02 11:00:42 +01:00
Andrea Kao
7836e0953c tests: add cmd/switch integration test 2016-07-27 17:24:17 -06:00
Andrea Kao
39453691ba tests: extend cmd_fail to all non-zero exit codes (#595) 2016-07-27 21:10:46 +02: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
Mike McQuaid
a07ab8bb92 brew.{rb,sh}: move to Library/Homebrew. (#506) 2016-07-15 19:33:30 +01: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
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
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
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
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
Martin Afanasjew
8a70b000e5 tests: fix problems in 'log with formula' test (#350)
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-14 14:58:11 +02:00
Andrea Kao
3f7fffe17d tests: extend cmd/log integration test (#333) 2016-06-12 13:50:34 +01:00
Andrea Kao
5ac6eb434e tests: extend cmd/desc integration test (#314) 2016-06-03 13:10:38 +01:00
Martin Afanasjew
d2cdbcbb18 tests: add missing require
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-02 09:36:51 +02:00
Andrea Kao
e4d0187120 tests: extend cmd/home integration test (#305) 2016-06-02 01:26:32 +02:00
Mike McQuaid
f12932cf31 test_integration_cmds: fix when not a developer. 2016-05-30 21:44:59 +01:00
Mike McQuaid
0158fc6da8 test_integration_cmds: print output on failure. (#213)
Makes it easy to debug what’s gone wrong.
2016-05-08 17:12:31 +01:00
Mike McQuaid
61614d3529 test_integration_cmds: add cleanup test. 2016-05-08 17:11:57 +01:00
Martin Afanasjew
02289fce42 Update Homebrew/homebrew references in code
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
2016-05-02 21:19:09 +02:00
Martin Afanasjew
8600b9edf1 Update Homebrew/homebrew references in comments
Replace `homebrew` with `brew`, `homebrew-core`, or `legacy-homebrew`
depending on context.
2016-05-02 21:19:09 +02:00
Martin Afanasjew
b53f0c5ada tests: expand help and help-related tests
Closes #114.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-20 13:46:10 +02:00
Martin Afanasjew
d183ff8065 tests: fix Ruby 1.8 syntax warnings
In `Library/Homebrew/test/`:

test_integration_cmds.rb:431: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:502: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:507: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:585: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:709: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:710: warning: (...) interpreted as grouped expression
test_integration_cmds.rb:711: warning: (...) interpreted as grouped expression
2016-04-20 01:42:14 +02:00
Martin Afanasjew
7771f3af81 tests: update prune --verbose test
Closes #15.

Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
2016-04-06 10:31:54 +02:00
Martin Afanasjew
f2245adaa7 tests: update linkapps/unlinkapps tests 2016-04-06 10:31:54 +02:00