diff options
| author | take_cheeze <[email protected]> | 2014-07-12 21:26:47 +0900 |
|---|---|---|
| committer | take_cheeze <[email protected]> | 2014-07-12 21:41:44 +0900 |
| commit | 3b8a797a4cc227006942fb780590c6513bb53dc7 (patch) | |
| tree | d523319c93f7863f023f68d6e95a0bc0bfef009e /tasks/mrbgem_spec.rake | |
| parent | a16a53b5ebc0fb6a7dc448130ea8f34575d85a3d (diff) | |
| download | mruby-3b8a797a4cc227006942fb780590c6513bb53dc7.tar.gz mruby-3b8a797a4cc227006942fb780590c6513bb53dc7.zip | |
Fix rake failure since `mrbtest_objs` isn't flattened.
Append generated test object to `@test_objs` of mrbgem spec.
Add method `custom_test_init?` to check whether mrbgem has custom test init function.
Diffstat (limited to 'tasks/mrbgem_spec.rake')
| -rw-r--r-- | tasks/mrbgem_spec.rake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tasks/mrbgem_spec.rake b/tasks/mrbgem_spec.rake index 9e461d42b..745b2f29d 100644 --- a/tasks/mrbgem_spec.rake +++ b/tasks/mrbgem_spec.rake @@ -62,6 +62,7 @@ module MRuby @test_objs = Dir.glob("#{dir}/test/*.{c,cpp,cxx,cc,m,asm,s,S}").map do |f| objfile(f.relative_path_from(dir).to_s.pathmap("#{build_dir}/%X")) end + @custom_test_init = !@test_objs.empty? @test_preload = nil # 'test/assert.rb' @test_args = {} @@ -189,6 +190,10 @@ module MRuby [@name] end + def custom_test_init? + @custom_test_init + end + def version_ok?(req_versions) req_versions.map do |req| cmp, ver = req.split |
