From e8ca5e516983fe720ec46887744f0d21b8f16ce1 Mon Sep 17 00:00:00 2001 From: Akira Yumiyama Date: Mon, 1 Apr 2013 09:12:01 +0900 Subject: initial commit --- run_test.rb | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 run_test.rb (limited to 'run_test.rb') diff --git a/run_test.rb b/run_test.rb new file mode 100644 index 000000000..e83b504be --- /dev/null +++ b/run_test.rb @@ -0,0 +1,33 @@ +#!/usr/bin/env ruby +# +# mrbgems test runner +# + +gemname = File.basename(File.dirname(File.expand_path __FILE__)) + +if __FILE__ == $0 + repository, dir = 'https://github.com/mruby/mruby.git', 'tmp/mruby' + build_args = ARGV + build_args = ['all', 'test'] if build_args.nil? or build_args.empty? + + Dir.mkdir 'tmp' unless File.exist?('tmp') + unless File.exist?(dir) + system "git clone #{repository} #{dir}" + end + + exit system(%Q[cd #{dir}; MRUBY_CONFIG=#{File.expand_path __FILE__} ruby minirake #{build_args.join(' ')}]) +end + +MRuby::Build.new do |conf| + toolchain :gcc + conf.gems.clear + + conf.gem "#{root}/mrbgems/mruby-sprintf" + conf.gem "#{root}/mrbgems/mruby-print" + + Dir.glob("#{root}/mrbgems/mruby-*") do |x| + conf.gem x unless x =~ /\/mruby-(print|sprintf)$/ + end + + conf.gem File.expand_path(File.dirname(__FILE__)) +end -- cgit v1.2.3