Skip to content

Commit

Permalink
Remove mrbtest_irep from mrbtest
Browse files Browse the repository at this point in the history
If we make the core tests a dependency on the mruby-test gem,
we don't need to worry about maintaining the core test irep alone.
  • Loading branch information
Zachary Scott committed Nov 24, 2015
1 parent 625a3fe commit e7a3018
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions mrbgems/mruby-test/init_mrbtest.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "mruby/variable.h"

extern const uint8_t mrbtest_assert_irep[];
extern const uint8_t mrbtest_irep[];

void mrbgemtest_init(mrb_state* mrb);
void mrb_init_test_driver(mrb_state* mrb, mrb_bool verbose);
Expand All @@ -24,7 +23,6 @@ mrb_init_mrbtest(mrb_state *mrb)
}
mrb_init_test_driver(core_test, mrb_test(mrb_gv_get(mrb, mrb_intern_lit(mrb, "$mrbtest_verbose"))));
mrb_load_irep(core_test, mrbtest_assert_irep);
mrb_load_irep(core_test, mrbtest_irep);
mrb_t_pass_result(mrb, core_test);

#ifndef DISABLE_GEMS
Expand Down
6 changes: 3 additions & 3 deletions mrbgems/mruby-test/mrbgem.rake
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
build.bins << 'mrbtest'
spec.add_dependency('mruby-compiler', :core => 'mruby-compiler')

spec.test_rbfiles = Dir.glob("#{MRUBY_ROOT}/test/t/*.rb")

clib = "#{build_dir}/mrbtest.c"
mlib = clib.ext(exts.object)
mrbs = Dir.glob("#{MRUBY_ROOT}/test/t/*.rb")
exec = exefile("#{build.build_dir}/bin/mrbtest")

libmruby = libfile("#{build.build_dir}/lib/libmruby")
Expand Down Expand Up @@ -146,7 +147,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|

init = "#{spec.dir}/init_mrbtest.c"
file mlib => clib
file clib => [build.mrbcfile, init] + mrbs do |t|
file clib => init do |t|
_pp "GEN", "*.rb", "#{clib.relative_path}"
FileUtils.mkdir_p File.dirname(clib)
open(clib, 'w') do |f|
Expand All @@ -160,7 +161,6 @@ MRuby::Gem::Specification.new('mruby-test') do |spec|
f.puts %Q[ */]
f.puts %Q[]
f.puts IO.read(init)
mrbc.run f, mrbs, 'mrbtest_irep'
build.gems.each do |g|
f.puts %Q[void GENERATED_TMP_mrb_#{g.funcname}_gem_test(mrb_state *mrb);]
end
Expand Down

0 comments on commit e7a3018

Please sign in to comment.