Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract mrbtest to binary gem #2924

Merged
merged 5 commits into from Sep 2, 2015
Merged

Extract mrbtest to binary gem #2924

merged 5 commits into from Sep 2, 2015

Conversation

@zzak
Copy link
Member

@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
Member Author

@zzak zzak commented Aug 22, 2015

@matz
Copy link
Member

@matz matz commented Aug 22, 2015

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

@zzak
Copy link
Member Author

@zzak 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
Member Author

@zzak 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 Sep 2, 2015
Zachary Scott
Zachary Scott
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 zzak force-pushed the zzak:mruby-test branch from 48a2ae4 to 87564dc Sep 2, 2015
@zzak
Copy link
Member Author

@zzak 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
1 check passed
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 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.