test: revert renaming test_args method.

This commit is contained in:
Mike McQuaid 2020-01-13 14:56:59 +00:00
parent eadf17881d
commit a15ce054c8
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
2 changed files with 21 additions and 23 deletions

View File

@ -8,33 +8,31 @@ require "cli/parser"
module Homebrew
module_function
module Test
def self.args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`test` [<options>] <formula>
def test_args
Homebrew::CLI::Parser.new do
usage_banner <<~EOS
`test` [<options>] <formula>
Run the test method provided by an installed formula.
There is no standard output or return code, but generally it should notify the
user if something is wrong with the installed formula.
Run the test method provided by an installed formula.
There is no standard output or return code, but generally it should notify the
user if something is wrong with the installed formula.
*Example:* `brew install jruby && brew test jruby`
EOS
switch "--devel",
description: "Test the development version of a formula."
switch "--HEAD",
description: "Test the head version of a formula."
switch "--keep-tmp",
description: "Retain the temporary files created for the test."
switch :verbose
switch :debug
conflicts "--devel", "--HEAD"
end
*Example:* `brew install jruby && brew test jruby`
EOS
switch "--devel",
description: "Test the development version of a formula."
switch "--HEAD",
description: "Test the head version of a formula."
switch "--keep-tmp",
description: "Retain the temporary files created for the test."
switch :verbose
switch :debug
conflicts "--devel", "--HEAD"
end
end
def test
Test.args.parse
test_args.parse
raise FormulaUnspecifiedError if ARGV.named.empty?

View File

@ -9,13 +9,13 @@ require "debrew"
require "formula_assertions"
require "fcntl"
require "socket"
require "cli/parser"
require "dev-cmd/test"
TEST_TIMEOUT_SECONDS = 5 * 60
begin
Homebrew::Test.args.parse
Homebrew.test_args.parse
error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io)
error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)