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.
This commit is contained in:
take_cheeze
2014-07-12 21:26:47 +09:00
parent a16a53b5eb
commit 3b8a797a4c
3 changed files with 11 additions and 4 deletions
+4 -3
View File
@@ -12,10 +12,11 @@ MRuby.each_target do
ass_lib = ass_c.ext(exts.object)
mrbtest_lib = libfile("#{current_build_dir}/mrbtest")
mrbtest_objs = gems.map do |v|
v.test_objs + [v.test_rbireps.ext(exts.object)]
mrbtest_objs = [mlib, ass_lib]
gems.each do |v|
mrbtest_objs.concat v.test_objs
end
file mrbtest_lib => [mlib, ass_lib] + mrbtest_objs do |t|
file mrbtest_lib => mrbtest_objs do |t|
archiver.run t.name, t.prerequisites
end