Skip to content

Instantly share code, notes, and snippets.

@shirosaki
Created September 14, 2012 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shirosaki/3721048 to your computer and use it in GitHub Desktop.
Save shirosaki/3721048 to your computer and use it in GitHub Desktop.
Cross compile gcc on Linux 32bit using rubenvb recipe
Using built-in specs.
COLLECT_GCC=c:\devruby\rubyinstaller\sandbox\devkit\mingw\bin\gcc.exe
COLLECT_LTO_WRAPPER=c:/devruby/rubyinstaller/sandbox/devkit/mingw/bin/../libexec/gcc/i686-w64-mingw32/4.7.1/lto-wrapper.exe
Target: i686-w64-mingw32
Configured with: /home/shirosaki/mingw-w64/src/gcc/configure --host=i686-w64-mingw32 --build=i686-linux-gnu --target=i686-w64-mingw32 --with-sysroot=/home/shirosaki/mingw-w64/mingw32mingw32/mingw32 --prefix=/home/shirosaki/mingw-w64/mingw32mingw32/mingw32 --with-gmp=/home/shirosaki/mingw-w64/prereq/i686-w64-mingw32/install --with-mpfr=/home/shirosaki/mingw-w64/prereq/i686-w64-mingw32/install --with-mpc=/home/shirosaki/mingw-w64/prereq/i686-w64-mingw32/install --with-ppl=/home/shirosaki/mingw-w64/prereq/i686-w64-mingw32/install --with-cloog=/home/shirosaki/mingw-w64/prereq/i686-w64-mingw32/install --disable-ppl-version-check --disable-cloog-version-check --enable-cloog-backend=isl --with-host-libstdcxx='-static -lstdc++ -lm' --enable-shared --enable-static --enable-threads=win32 --enable-plugins --disable-multilib --enable-languages=c,lto,c++,objc,obj-c++,fortran,java --enable-libgomp --disable-dw2-exceptions --enable-sjlj-exceptions --enable-fully-dynamic-string --enable-libstdcxx-time --disable-nls --disable-werror --enable-checking=release --with-gnu-as --with-gnu-ld --disable-win32-registry --disable-rpath --disable-werror --with-libiconv-prefix=/home/shirosaki/mingw-w64/prereq/i686-w64-mingw32/install --with-pkgversion=rubenvb-4.7.1 --with-bugurl=mingw-w64-public@lists.sourceforge.net CC= CFLAGS='-O2 -march=nocona -mtune=core2 -fomit-frame-pointer -momit-leaf-frame-pointer' LDFLAGS=' -Wl,--large-address-aware'
Thread model: win32
gcc version 4.7.1 (rubenvb-4.7.1)
Finished tests in 664.937500s, 16.9640 tests/s, 2915.4710 assertions/s.
11280 tests, 1938606 assertions, 1 failures, 0 errors, 83 skips
ruby -v: ruby 2.0.0dev (2012-09-11 trunk 36949) [i386-mingw32]
make: *** [yes-test-all] Error 1
diff --git a/test/drb/drbtest.rb b/test/drb/drbtest.rb
index d0156fd..a477516 100644
--- a/test/drb/drbtest.rb
+++ b/test/drb/drbtest.rb
@@ -76,7 +76,7 @@ module DRbCore
while (@there.to_s rescue nil)
# nop
end
- signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM
+ signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM
Thread.list.each {|th|
if th.respond_to?(:pid) && th[:drb_service] == @service_name
begin
@@ -297,7 +297,7 @@ module DRbAry
while (@there.to_s rescue nil)
# nop
end
- signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :INT : :TERM
+ signal = /mswin|mingw/ =~ RUBY_PLATFORM ? :KILL : :TERM
Thread.list.each {|th|
if th.respond_to?(:pid) && th[:drb_service] == @service_name
begin
diff --git a/test/net/http/test_http.rb b/test/net/http/test_http.rb
index fc7bfa9..6a35ca2 100644
--- a/test/net/http/test_http.rb
+++ b/test/net/http/test_http.rb
@@ -88,11 +88,13 @@ class TestNetHTTP < Test::Unit::TestCase
end
def test_proxy_address
- http = Net::HTTP.new 'example', nil, 'proxy.example'
- assert_equal 'proxy.example', http.proxy_address
+ clean_http_proxy_env do
+ http = Net::HTTP.new 'example', nil, 'proxy.example'
+ assert_equal 'proxy.example', http.proxy_address
- http = Net::HTTP.new 'example', nil
- assert_equal nil, http.proxy_address
+ http = Net::HTTP.new 'example', nil
+ assert_equal nil, http.proxy_address
+ end
end
def test_proxy_address_ENV
@@ -137,13 +139,15 @@ class TestNetHTTP < Test::Unit::TestCase
end
def test_proxy_port
- http = Net::HTTP.new 'exmaple', nil, 'proxy.example'
- assert_equal 'proxy.example', http.proxy_address
- assert_equal 80, http.proxy_port
- http = Net::HTTP.new 'exmaple', nil, 'proxy.example', 8000
- assert_equal 8000, http.proxy_port
- http = Net::HTTP.new 'exmaple', nil
- assert_equal nil, http.proxy_port
+ clean_http_proxy_env do
+ http = Net::HTTP.new 'exmaple', nil, 'proxy.example'
+ assert_equal 'proxy.example', http.proxy_address
+ assert_equal 80, http.proxy_port
+ http = Net::HTTP.new 'exmaple', nil, 'proxy.example', 8000
+ assert_equal 8000, http.proxy_port
+ http = Net::HTTP.new 'exmaple', nil
+ assert_equal nil, http.proxy_port
+ end
end
def test_proxy_port_ENV
diff --git a/test/ruby/envutil.rb b/test/ruby/envutil.rb
index d96da13..461c24d 100644
--- a/test/ruby/envutil.rb
+++ b/test/ruby/envutil.rb
@@ -65,6 +65,7 @@ module EnvUtil
stdout = th_stdout.value if capture_stdout
stderr = th_stderr.value if capture_stderr && capture_stderr != :merge_to_stdout
else
+ Process.kill :KILL, pid rescue nil
raise Timeout::Error
end
out_p.close if capture_stdout
diff --git a/test/thread/test_queue.rb b/test/thread/test_queue.rb
index 7a4e60e..84e60d6 100644
--- a/test/thread/test_queue.rb
+++ b/test/thread/test_queue.rb
@@ -101,7 +101,7 @@ class TestQueue < Test::Unit::TestCase
def test_thr_kill
bug5343 = '[ruby-core:39634]'
Dir.mktmpdir {|d|
- timeout = 20
+ timeout = 30
total_count = 2000
begin
assert_normal_exit(<<-"_eom", bug5343, {:timeout => timeout, :chdir=>d})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment