Extract mrbtest to binary gem #2924

Merged
merged 5 commits into from Sep 2, 2015

Conversation

Projects
None yet
2 participants
@zzak
Member

zzak commented Aug 22, 2015

This will allow us to create specific target MRuby::Builds for our tests.

Previously the test library, and optionally the binary, were compiled for every build.

@zzak

This comment has been minimized.

Show comment
Hide comment
Member

zzak commented Aug 22, 2015

@matz

This comment has been minimized.

Show comment
Hide comment
@matz

matz Aug 22, 2015

Member

I like the concept of the PR, but Tavis failed.

Member

matz commented Aug 22, 2015

I like the concept of the PR, but Tavis failed.

@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Aug 22, 2015

Member

@matz Yeah I can reproduce the travis failure locally with MRUBY_CONFIG=travis_config.rb ./minirake all test but I'm not sure why yet.

Member

zzak commented Aug 22, 2015

@matz Yeah I can reproduce the travis failure locally with MRUBY_CONFIG=travis_config.rb ./minirake all test but I'm not sure why yet.

@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Aug 30, 2015

Member

So I've narrowed it down to when conf.gembox "full-core" is used instead of "default". But I'm not quite sure why yet.. here's a stacktrace:

NoMethodError: undefined method `each' for nil:NilClass
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:306:in `block in generate_gem_table'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:286:in `each'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:286:in `each'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:305:in `generate_gem_table'
/Users/zscott/code/mruby/mrbgems/mruby-test/mrbgem.rake:35:in `block in <top (required)>'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:80:in `instance_eval'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:80:in `setup'
/Users/zscott/code/mruby/tasks/ruby_ext.rake:41:in `block in to_proc'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:286:in `each'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:286:in `each'
/Users/zscott/code/mruby/tasks/mrbgems.rake:4:in `block in <top (required)>'
/Users/zscott/code/mruby/tasks/mruby_build.rake:13:in `instance_eval'
/Users/zscott/code/mruby/tasks/mruby_build.rake:13:in `block in each_target'
/Users/zscott/code/mruby/tasks/mruby_build.rake:12:in `each'
/Users/zscott/code/mruby/tasks/mruby_build.rake:12:in `each_target'
/Users/zscott/code/mruby/tasks/mrbgems.rake:1:in `<top (required)>'
/Users/zscott/code/mruby/Rakefile:26:in `load'
/Users/zscott/code/mruby/Rakefile:26:in `<top (required)>'
Member

zzak commented Aug 30, 2015

So I've narrowed it down to when conf.gembox "full-core" is used instead of "default". But I'm not quite sure why yet.. here's a stacktrace:

NoMethodError: undefined method `each' for nil:NilClass
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:306:in `block in generate_gem_table'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:286:in `each'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:286:in `each'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:305:in `generate_gem_table'
/Users/zscott/code/mruby/mrbgems/mruby-test/mrbgem.rake:35:in `block in <top (required)>'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:80:in `instance_eval'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:80:in `setup'
/Users/zscott/code/mruby/tasks/ruby_ext.rake:41:in `block in to_proc'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:286:in `each'
/Users/zscott/code/mruby/tasks/mrbgem_spec.rake:286:in `each'
/Users/zscott/code/mruby/tasks/mrbgems.rake:4:in `block in <top (required)>'
/Users/zscott/code/mruby/tasks/mruby_build.rake:13:in `instance_eval'
/Users/zscott/code/mruby/tasks/mruby_build.rake:13:in `block in each_target'
/Users/zscott/code/mruby/tasks/mruby_build.rake:12:in `each'
/Users/zscott/code/mruby/tasks/mruby_build.rake:12:in `each_target'
/Users/zscott/code/mruby/tasks/mrbgems.rake:1:in `<top (required)>'
/Users/zscott/code/mruby/Rakefile:26:in `load'
/Users/zscott/code/mruby/Rakefile:26:in `<top (required)>'

zzak added some commits Sep 2, 2015

Make travis happy
We have do this because mruby's test files are found using MRUBY_ROOT, like this:
    mrbs = Dir.glob("#{MRUBY_ROOT}/test/t/*.rb")
@zzak

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Sep 2, 2015

Member

The build is green as of 87564dc! <3

Member

zzak commented Sep 2, 2015

The build is green as of 87564dc! <3

matz added a commit that referenced this pull request Sep 2, 2015

Merge pull request #2924 from zzak/mruby-test
Extract mrbtest to binary gem

@matz matz merged commit c6aa87c into mruby:master Sep 2, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@zzak zzak deleted the zzak:mruby-test branch Sep 2, 2015

zzak added a commit to zzak/mruby that referenced this pull request Sep 3, 2015

Add build_mrbtest after config block is evaluated
This allows us to add `enable_test` anywhere in a build target,
without having to worry about the order in which they are included.

Previously, there was a bug that occured when adding 'mruby-test' gem
to dependencies before additional gems.

Instead of adding the 'mruby-test' gem dependency manually to a test build,
we now only need to call `enable_test` in the target. This also allows us to
call `test_enabled?` downstream when compiling mruby ourselves.

/cc #2924

@tsahara tsahara referenced this pull request in iij/mruby Sep 3, 2015

Closed

make 19th stable release #153

zzak added a commit to zzak/mruby that referenced this pull request Sep 3, 2015

Add build_mrbtest after config block is evaluated
This allows us to add `enable_test` anywhere in a build target,
without having to worry about the order in which they are included.

Previously, there was a bug that occured when adding 'mruby-test' gem
to dependencies before additional gems.

Instead of adding the 'mruby-test' gem dependency manually to a test build,
we now only need to call `enable_test` in the target. This also allows us to
call `test_enabled?` downstream when running mruby tests ourselves.

/cc #2924
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment