@@ -308,7 +308,7 @@ def rakefile
308308
309309desc "compile binary"
310310task :compile => [:mruby, :all] do
311- %W(\# {MRUBY_ROOT }/build/host/bin/\# {APP_NAME} \# {MRUBY_ROOT }/build/i686-pc-linux-gnu/\# {APP_NAME}").each do |bin|
311+ %W(\# {mruby_root }/build/host/bin/\# {APP_NAME} \# {mruby_root }/build/i686-pc-linux-gnu/\# {APP_NAME}").each do |bin|
312312 sh "strip --strip-unneeded \# {bin}" if File.exist?(bin)
313313 end
314314end
@@ -317,16 +317,14 @@ def rakefile
317317 desc "run mruby & unit tests"
318318 # only build mtest for host
319319 task :mtest => [:compile] + MRuby.targets.values.map {|t| t.build_mrbtest_lib_only? ? nil : t.exefile("\# {t.build_dir}/test/mrbtest") }.compact do
320- # mruby-io tests expect to be in MRUBY_ROOT
321- Dir.chdir(MRUBY_ROOT) do
322- # in order to get mruby/test/t/synatx.rb __FILE__ to pass,
323- # we need to make sure the tests are built relative from MRUBY_ROOT
324- load "\# {MRUBY_ROOT}/test/mrbtest.rake"
325- MRuby.each_target do |target|
326- # only run unit tests here
327- target.enable_bintest = false
328- run_test unless build_mrbtest_lib_only?
329- end
320+ # mruby-io tests expect to be in mruby_root
321+ # in order to get mruby/test/t/synatx.rb __FILE__ to pass,
322+ # we need to make sure the tests are built relative from mruby_root
323+ load "\# {mruby_root}/test/mrbtest.rake"
324+ MRuby.each_target do |target|
325+ # only run unit tests here
326+ target.enable_bintest = false
327+ run_test unless build_mrbtest_lib_only?
330328 end
331329 end
332330
@@ -358,7 +356,7 @@ def clean_env(envs)
358356
359357desc "cleanup"
360358task :clean do
361- sh "cd \# {MRUBY_ROOT} && rake deep_clean"
359+ sh "rake deep_clean"
362360end
363361RAKEFILE
364362 end
0 commit comments