diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-02-22 20:41:20 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-02-22 20:41:20 +0900 |
| commit | f209f781acdeb6dabafdab955f685daf6c5d1421 (patch) | |
| tree | 7b217369b434dc07cfa9bf4850068aaefa8c3c9a /mrbgems/mruby-test/mrbgem.rake | |
| parent | 5cc277340f3107efb206fed3a3e72eebbf286a6b (diff) | |
| download | mruby-f209f781acdeb6dabafdab955f685daf6c5d1421.tar.gz mruby-f209f781acdeb6dabafdab955f685daf6c5d1421.zip | |
Integrate `init_mrbtest.c` to `driver.c` in `mruby-test` mrbgem
- `mrbgemtest_init()` is needed if `DISABLE_GEMS` is enabled because core
tests are run as part of `mruby-test` mrbgem (moreover, `DISABLE_GEMS` is
disabled when `enable_test` is used in build config).
- For the same reason `mrb_open_core()` etc for core tests is unneeded.
Diffstat (limited to 'mrbgems/mruby-test/mrbgem.rake')
| -rw-r--r-- | mrbgems/mruby-test/mrbgem.rake | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mrbgems/mruby-test/mrbgem.rake b/mrbgems/mruby-test/mrbgem.rake index 61bdf9ced..dcb7bb719 100644 --- a/mrbgems/mruby-test/mrbgem.rake +++ b/mrbgems/mruby-test/mrbgem.rake @@ -144,8 +144,6 @@ MRuby::Gem::Specification.new('mruby-test') do |spec| end end - init = "#{spec.dir}/init_mrbtest.c" - # store the last gem selection and make the re-build # of the test gem depending on a change to the gem # selection @@ -164,7 +162,7 @@ MRuby::Gem::Specification.new('mruby-test') do |spec| file clib => active_gems_path if active_gem_list != current_gem_list file mlib => clib - file clib => [init, build.mrbcfile, __FILE__] do |_t| + file clib => [build.mrbcfile, __FILE__] do |_t| _pp "GEN", "*.rb", "#{clib.relative_path}" FileUtils.mkdir_p File.dirname(clib) open(clib, 'w') do |f| @@ -177,7 +175,8 @@ MRuby::Gem::Specification.new('mruby-test') do |spec| f.puts %Q[ * All manual changes will get lost.] f.puts %Q[ */] f.puts %Q[] - f.puts IO.read(init) + f.puts %Q[struct mrb_state;] + f.puts %Q[typedef struct mrb_state mrb_state;] build.gems.each do |g| f.puts %Q[void GENERATED_TMP_mrb_#{g.funcname}_gem_test(mrb_state *mrb);] end |
