mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* NEWS (with all sufficient information):
* lib/rake: Update to rake 10.1.0 * bin/rake: ditto. * test/rake: ditto. * NEWS: Update NEWS to include rake 10.1.0 and links to release notes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
52c1331763
commit
9cadc95b28
83 changed files with 1724 additions and 2954 deletions
|
@ -64,7 +64,7 @@ module Rake
|
|||
#
|
||||
attr_accessor :loader
|
||||
|
||||
# Array of commandline options to pass to Ruby when running test loader.
|
||||
# Array of commandline options to pass to ruby when running test loader.
|
||||
attr_accessor :ruby_opts
|
||||
|
||||
# Explicitly define the list of test files to be included in a
|
||||
|
@ -93,15 +93,18 @@ module Rake
|
|||
|
||||
# Create the tasks defined by this task lib.
|
||||
def define
|
||||
desc "Run tests" + (@name==:test ? "" : " for #{@name}")
|
||||
desc "Run tests" + (@name == :test ? "" : " for #{@name}")
|
||||
task @name do
|
||||
FileUtilsExt.verbose(@verbose) do
|
||||
args = "#{ruby_opts_string} #{run_code} #{file_list_string} #{option_list}"
|
||||
args =
|
||||
"#{ruby_opts_string} #{run_code} " +
|
||||
"#{file_list_string} #{option_list}"
|
||||
ruby args do |ok, status|
|
||||
if !ok && status.respond_to?(:signaled?) && status.signaled?
|
||||
raise SignalException.new(status.termsig)
|
||||
elsif !ok
|
||||
fail "Command failed with status (#{status.exitstatus}): [ruby #{args}]"
|
||||
fail "Command failed with status (#{status.exitstatus}): " +
|
||||
"[ruby #{args}]"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -120,8 +123,8 @@ module Rake
|
|||
|
||||
def ruby_opts_string
|
||||
opts = @ruby_opts.dup
|
||||
opts.unshift( "-I\"#{lib_path}\"" ) unless @libs.empty?
|
||||
opts.unshift( "-w" ) if @warning
|
||||
opts.unshift("-I\"#{lib_path}\"") unless @libs.empty?
|
||||
opts.unshift("-w") if @warning
|
||||
opts.join(" ")
|
||||
end
|
||||
|
||||
|
@ -130,12 +133,12 @@ module Rake
|
|||
end
|
||||
|
||||
def file_list_string
|
||||
file_list.collect { |fn| "\"#{fn}\"" }.join(' ')
|
||||
file_list.map { |fn| "\"#{fn}\"" }.join(' ')
|
||||
end
|
||||
|
||||
def file_list # :nodoc:
|
||||
if ENV['TEST']
|
||||
FileList[ ENV['TEST'] ]
|
||||
FileList[ENV['TEST']]
|
||||
else
|
||||
result = []
|
||||
result += @test_files.to_a if @test_files
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue