test: revert renaming test_args method.
This commit is contained in:
parent
eadf17881d
commit
a15ce054c8
@ -8,33 +8,31 @@ require "cli/parser"
|
|||||||
module Homebrew
|
module Homebrew
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
module Test
|
def test_args
|
||||||
def self.args
|
Homebrew::CLI::Parser.new do
|
||||||
Homebrew::CLI::Parser.new do
|
usage_banner <<~EOS
|
||||||
usage_banner <<~EOS
|
`test` [<options>] <formula>
|
||||||
`test` [<options>] <formula>
|
|
||||||
|
|
||||||
Run the test method provided by an 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
|
There is no standard output or return code, but generally it should notify the
|
||||||
user if something is wrong with the installed formula.
|
user if something is wrong with the installed formula.
|
||||||
|
|
||||||
*Example:* `brew install jruby && brew test jruby`
|
*Example:* `brew install jruby && brew test jruby`
|
||||||
EOS
|
EOS
|
||||||
switch "--devel",
|
switch "--devel",
|
||||||
description: "Test the development version of a formula."
|
description: "Test the development version of a formula."
|
||||||
switch "--HEAD",
|
switch "--HEAD",
|
||||||
description: "Test the head version of a formula."
|
description: "Test the head version of a formula."
|
||||||
switch "--keep-tmp",
|
switch "--keep-tmp",
|
||||||
description: "Retain the temporary files created for the test."
|
description: "Retain the temporary files created for the test."
|
||||||
switch :verbose
|
switch :verbose
|
||||||
switch :debug
|
switch :debug
|
||||||
conflicts "--devel", "--HEAD"
|
conflicts "--devel", "--HEAD"
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test
|
def test
|
||||||
Test.args.parse
|
test_args.parse
|
||||||
|
|
||||||
raise FormulaUnspecifiedError if ARGV.named.empty?
|
raise FormulaUnspecifiedError if ARGV.named.empty?
|
||||||
|
|
||||||
|
|||||||
@ -9,13 +9,13 @@ require "debrew"
|
|||||||
require "formula_assertions"
|
require "formula_assertions"
|
||||||
require "fcntl"
|
require "fcntl"
|
||||||
require "socket"
|
require "socket"
|
||||||
|
require "cli/parser"
|
||||||
require "dev-cmd/test"
|
require "dev-cmd/test"
|
||||||
|
|
||||||
TEST_TIMEOUT_SECONDS = 5 * 60
|
TEST_TIMEOUT_SECONDS = 5 * 60
|
||||||
|
|
||||||
begin
|
begin
|
||||||
Homebrew::Test.args.parse
|
Homebrew.test_args.parse
|
||||||
|
|
||||||
error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io)
|
error_pipe = UNIXSocket.open(ENV["HOMEBREW_ERROR_PIPE"], &:recv_io)
|
||||||
error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
|
error_pipe.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user