mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Run mrbgem and core tests on minimum dependencies.
Solves #2355. In test drivers: * Uses `mrb_t_pass_result` to check and pass test result to main `mrb_state`. * Adds `mrb_init_test_driver` to init test `mrb_state`.
This commit is contained in:
committed by
Yukihiro "Matz" Matsumoto
parent
aff65afe97
commit
4a6c651f82
+4
-7
@@ -12,11 +12,12 @@ MRuby.each_target do
|
||||
ass_lib = ass_c.ext(exts.object)
|
||||
|
||||
mrbtest_lib = libfile("#{current_build_dir}/mrbtest")
|
||||
gem_test_files = gems.select { |g| g.run_test_in_other_mrb_state? }.map { |g| g.test_rbireps.ext(exts.object) }
|
||||
file mrbtest_lib => [mlib, ass_lib, gems.map(&:test_objs), gem_test_files].flatten do |t|
|
||||
mrbtest_objs = gems.map do |v|
|
||||
v.test_objs + [v.test_rbireps.ext(exts.object)]
|
||||
end
|
||||
file mrbtest_lib => [mlib, ass_lib] + mrbtest_objs do |t|
|
||||
archiver.run t.name, t.prerequisites
|
||||
end
|
||||
file mrbtest_lib => "#{build_dir}/test/no_mrb_open_test.c".ext(exts.object)
|
||||
|
||||
unless build_mrbtest_lib_only?
|
||||
driver_obj = objfile("#{current_build_dir}/driver")
|
||||
@@ -55,16 +56,12 @@ MRuby.each_target do
|
||||
f.puts IO.read(init)
|
||||
mrbc.run f, mrbs, 'mrbtest_irep'
|
||||
gems.each do |g|
|
||||
next unless g.run_test_in_other_mrb_state?
|
||||
f.puts %Q[void GENERATED_TMP_mrb_#{g.funcname}_gem_test(mrb_state *mrb);]
|
||||
end
|
||||
f.puts %Q[void no_mrb_open_mrbgem_test(mrb_state *mrb);]
|
||||
f.puts %Q[void mrbgemtest_init(mrb_state* mrb) {]
|
||||
gems.each do |g|
|
||||
next unless g.run_test_in_other_mrb_state?
|
||||
f.puts %Q[ GENERATED_TMP_mrb_#{g.funcname}_gem_test(mrb);]
|
||||
end
|
||||
f.puts %Q[ no_mrb_open_mrbgem_test(mrb);]
|
||||
f.puts %Q[}]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user