diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-07 18:35:09 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-07 18:35:09 +0900 |
| commit | a5412d48fd1bb55288cb168a92efd0f2045781c1 (patch) | |
| tree | bda9afbe39942757c69b47b1a244c1a9017f47e4 /mrbgems/mruby-pack/run_test.rb | |
| parent | 842e6945f2d0a519d7cf0525016830246cd337ab (diff) | |
| parent | 383a9c79e191d524a9a2b4107cc5043ecbf6190b (diff) | |
| download | mruby-a5412d48fd1bb55288cb168a92efd0f2045781c1.tar.gz mruby-a5412d48fd1bb55288cb168a92efd0f2045781c1.zip | |
Add 'mrbgems/mruby-pack/' from commit '383a9c79e191d524a9a2b4107cc5043ecbf6190b'
git-subtree-dir: mrbgems/mruby-pack
git-subtree-mainline: 842e6945f2d0a519d7cf0525016830246cd337ab
git-subtree-split: 383a9c79e191d524a9a2b4107cc5043ecbf6190b
Diffstat (limited to 'mrbgems/mruby-pack/run_test.rb')
| -rw-r--r-- | mrbgems/mruby-pack/run_test.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/mrbgems/mruby-pack/run_test.rb b/mrbgems/mruby-pack/run_test.rb new file mode 100644 index 000000000..d9566a2a6 --- /dev/null +++ b/mrbgems/mruby-pack/run_test.rb @@ -0,0 +1,26 @@ +#!/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.gembox 'default' + + conf.gem File.expand_path(File.dirname(__FILE__)) +end |
