Skip to content

Commit

Permalink
test-bot: start running generic tests. (Homebrew#505)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
MikeMcQuaid committed Jul 14, 2016
1 parent 9aa4362 commit f6dad37
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Library/Homebrew/dev-cmd/test-bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,8 @@ def homebrew
tests_args << "--coverage" if ENV["TRAVIS"]
end
test "brew", "tests", *tests_args
test "brew", "tests", "--generic", "--only=integration_cmds",
*tests_args
test "brew", "tests", "--no-compat"
test "brew", "readall", "--syntax"
else
Expand Down
7 changes: 2 additions & 5 deletions Library/Homebrew/test/test_integration_cmds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def test_edit

def test_sh
assert_match "Your shell has been configured",
cmd("sh", "SHELL" => "/usr/bin/true")
cmd("sh", "SHELL" => which("true"))
end

def test_info
Expand Down Expand Up @@ -588,10 +588,7 @@ def test_prune
assert((share/"notpruneable").directory?)
refute((share/"pruneable_symlink").symlink?)

# Inexact match because only if ~/Applications exists, will this output one
# more line with contents `No apps unlinked from /Users/<user/Applications`.
assert_match "Nothing pruned\nNo apps unlinked from /Applications",
cmd("prune", "--verbose")
assert_match "Nothing pruned", cmd("prune", "--verbose")
end

def test_custom_command
Expand Down

0 comments on commit f6dad37

Please sign in to comment.