mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rake/backtrace.rb: Removed duplication in
Rake::Backtrace::SUPPRESSED_PATHS * test/rake/test_rake_backtrace.rb: Skip tests when tmpdir is in the suppressed pattern. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9e44974874
commit
8137152e01
3 changed files with 16 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Fri Nov 30 12:20:53 2012 Eric Hodel <drbrain@segment7.net>
|
||||
|
||||
* lib/rake/backtrace.rb: Removed duplication in
|
||||
Rake::Backtrace::SUPPRESSED_PATHS
|
||||
* test/rake/test_rake_backtrace.rb: Skip tests when tmpdir is in the
|
||||
suppressed pattern.
|
||||
|
||||
Fri Nov 30 11:07:45 2012 Shugo Maeda <shugo@ruby-lang.org>
|
||||
|
||||
* revert r37993 to avoid SEGV in tests.
|
||||
|
|
|
@ -2,7 +2,7 @@ module Rake
|
|||
module Backtrace
|
||||
SUPPRESSED_PATHS =
|
||||
RbConfig::CONFIG.values_at(*RbConfig::CONFIG.
|
||||
keys.grep(/(prefix|libdir)/)) + [
|
||||
keys.grep(/(prefix|libdir)/)).uniq + [
|
||||
File.join(File.dirname(__FILE__), ".."),
|
||||
].map { |f| Regexp.quote(File.expand_path(f)) }
|
||||
SUPPRESSED_PATHS.reject! { |s| s.nil? || s =~ /^ *$/ }
|
||||
|
|
|
@ -2,6 +2,14 @@ require File.expand_path('../helper', __FILE__)
|
|||
require 'open3'
|
||||
|
||||
class TestRakeBacktrace < Rake::TestCase
|
||||
|
||||
def setup
|
||||
super
|
||||
|
||||
skip 'tmpdir is suppressed in backtrace' if
|
||||
Dir.pwd =~ Rake::Backtrace::SUPPRESS_PATTERN
|
||||
end
|
||||
|
||||
# TODO: factor out similar code in test_rake_functional.rb
|
||||
def rake(*args)
|
||||
Open3.popen3(RUBY, "-I", @rake_lib, @rake_exec, *args) { |_, _, err, _|
|
||||
|
|
Loading…
Reference in a new issue