Skip to content

Extract mrbtest to binary gem#2924

Merged
matz merged 5 commits intomruby:masterfrom
zzak:mruby-test
Sep 2, 2015
Merged

Extract mrbtest to binary gem#2924
matz merged 5 commits intomruby:masterfrom
zzak:mruby-test

Conversation

@zzak
Copy link
Contributor

@zzak 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
Copy link
Contributor Author

zzak commented Aug 22, 2015

/cc @cremno @hone

@matz
Copy link
Member

matz commented Aug 22, 2015

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

@zzak
Copy link
Contributor Author

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
Copy link
Contributor Author

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)>'

Zachary Scott added 2 commits September 1, 2015 20:54
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
Copy link
Contributor Author

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
Extract mrbtest to binary gem
@matz matz merged commit c6aa87c into mruby:master Sep 2, 2015
@zzak zzak deleted the mruby-test branch September 2, 2015 18:55
zzak pushed a commit to zzak/mruby that referenced this pull request Sep 3, 2015
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 mruby#2924
zzak pushed a commit to zzak/mruby that referenced this pull request Sep 3, 2015
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 mruby#2924
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants