Commit d7960bf2 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

resolve conflict in travis_config.rb

parents 5519bd69 05fb139d
...@@ -78,6 +78,9 @@ MRuby::Build.new do |conf| ...@@ -78,6 +78,9 @@ MRuby::Build.new do |conf|
# file separetor # file separetor
# conf.file_separator = '/' # conf.file_separator = '/'
# bintest
# conf.enable_bintest = true
end end
# Define cross build settings # Define cross build settings
......
require 'open3'
assert('mirb normal operations') do
o, s = Open3.capture2('bin/mirb', :stdin_data => "a=1\nb=2\na+b\n")
assert_true o.include?('=> 3')
assert_true o.include?('=> 2')
end
assert('regression for #1563') do
o, s = Open3.capture2('bin/mirb', :stdin_data => "a=1;b=2;c=3\nb\nc")
assert_true o.include?('=> 3')
end
assert('regression for #1564') do
o = `bin/mruby -e '<<' 2>&1`
assert_equal o, "-e:1:2: syntax error, unexpected tLSHFT\n"
o = `bin/mruby -e '<<-' 2>&1`
assert_equal o, "-e:1:3: syntax error, unexpected tLSHFT\n"
end
assert('regression for #1572') do
system "echo 'p \"ok\"' > /tmp/1572.rb"
system "bin/mrbc -g -o /tmp/1572.mrb /tmp/1572.rb"
o = `bin/mruby -b /tmp/1572.mrb`.strip
assert_equal o, '"ok"'
end
...@@ -43,7 +43,7 @@ module MRuby ...@@ -43,7 +43,7 @@ module MRuby
end end
include Rake::DSL include Rake::DSL
include LoadGems include LoadGems
attr_accessor :name, :bins, :exts, :file_separator, :build_dir, :gem_clone_dir attr_accessor :name, :bins, :exts, :file_separator, :build_dir, :gem_clone_dir, :enable_bintest
attr_reader :libmruby, :gems attr_reader :libmruby, :gems
COMPILERS = %w(cc cxx objc asm) COMPILERS = %w(cc cxx objc asm)
...@@ -175,7 +175,12 @@ module MRuby ...@@ -175,7 +175,12 @@ module MRuby
puts ">>> Test #{name} <<<" puts ">>> Test #{name} <<<"
mrbtest = exefile("#{build_dir}/test/mrbtest") mrbtest = exefile("#{build_dir}/test/mrbtest")
sh "#{filename mrbtest.relative_path}#{$verbose ? ' -v' : ''}" sh "#{filename mrbtest.relative_path}#{$verbose ? ' -v' : ''}"
puts puts
run_bintest if @enable_bintest
end
def run_bintest
sh "ruby test/bintest.rb"
end end
def print_build_summary def print_build_summary
......
...@@ -9,10 +9,11 @@ def t_print(*args) ...@@ -9,10 +9,11 @@ def t_print(*args)
i = 0 i = 0
len = args.size len = args.size
while i < len while i < len
str = args[i].to_s
begin begin
__printstr__ args[i].to_s __printstr__ str
rescue NoMethodError rescue NoMethodError
__t_printstr__ args[i].to_s __t_printstr__ str rescue print str
end end
i += 1 i += 1
end end
......
$:.unshift File.dirname(File.dirname(File.expand_path(__FILE__)))
require 'test/assert.rb'
Dir['mrbgems/**/bintest/*.rb'].each do |file|
load file
end
load 'test/report.rb'
...@@ -12,5 +12,6 @@ MRuby::Build.new do |conf| ...@@ -12,5 +12,6 @@ MRuby::Build.new do |conf|
# include all core GEMs # include all core GEMs
conf.gembox 'full-core' conf.gembox 'full-core'
conf.cc.defines += %w(MRB_GC_FIXED_ARENA) conf.cc.defines = %w(MRB_DEBUG MRB_GC_FIXED_ARENA)
conf.enable_bintest = true
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment