File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2323namespace :test do
2424 desc "run mruby & unit tests"
2525 # only build mtest for host
26- task :mtest => [ :compile ] + MRuby . targets . values . map { | t | t . build_mrbtest_lib_only? ? nil : t . exefile ( " #{ t . build_dir } /test/mrbtest" ) } . compact do
26+ task :mtest => :compile do
2727 # in order to get mruby/test/t/synatx.rb __FILE__ to pass,
2828 # we need to make sure the tests are built relative from mruby_root
29- load "#{ mruby_root } /test/mrbtest.rake"
3029 MRuby . each_target do |target |
3130 # only run unit tests here
3231 target . enable_bintest = false
33- run_test unless build_mrbtest_lib_only ?
32+ run_test if target . test_enabled ?
3433 end
3534 end
3635
@@ -50,7 +49,7 @@ namespace :test do
5049 task :bintest => :compile do
5150 MRuby . each_target do |target |
5251 clean_env ( %w( MRUBY_ROOT MRUBY_CONFIG ) ) do
53- run_bintest if bintest_enabled?
52+ run_bintest if target . bintest_enabled?
5453 end
5554 end
5655 end
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ def gem_config(conf)
1010
1111 conf . enable_bintest
1212 conf . enable_debug
13+ conf . enable_test
1314
1415 gem_config ( conf )
1516end
Original file line number Diff line number Diff line change @@ -120,6 +120,7 @@ def gem_config(conf)
120120
121121 conf.enable_bintest
122122 conf.enable_debug
123+ conf.enable_test
123124
124125 gem_config(conf)
125126end
@@ -320,15 +321,13 @@ def rakefile
320321namespace :test do
321322 desc "run mruby & unit tests"
322323 # only build mtest for host
323- task :mtest => [:compile] + MRuby.targets.values.map {|t| t.build_mrbtest_lib_only? ? nil : t.exefile("\# {t.build_dir}/test/mrbtest") }.compact do
324- # mruby-io tests expect to be in mruby_root
324+ task :mtest => :compile do
325325 # in order to get mruby/test/t/synatx.rb __FILE__ to pass,
326326 # we need to make sure the tests are built relative from mruby_root
327- load "\# {mruby_root}/test/mrbtest.rake"
328327 MRuby.each_target do |target|
329328 # only run unit tests here
330329 target.enable_bintest = false
331- run_test unless build_mrbtest_lib_only ?
330+ run_test if target.test_enabled ?
332331 end
333332 end
334333
@@ -348,7 +347,7 @@ def clean_env(envs)
348347 task :bintest => :compile do
349348 MRuby.each_target do |target|
350349 clean_env(%w(MRUBY_ROOT MRUBY_CONFIG)) do
351- run_bintest if bintest_enabled?
350+ run_bintest if target. bintest_enabled?
352351 end
353352 end
354353 end
You can’t perform that action at this time.
0 commit comments