Skip to content

Commit 0a6630e

Browse files
author
Zachary Scott
committed
Since we already Dir.chdir(mruby_root) we don't need to chdir twice.
1 parent 50ce2dc commit 0a6630e

2 files changed

Lines changed: 9 additions & 11 deletions

File tree

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ task :test => ['test:bintest', 'test:mtest']
6262

6363
desc "cleanup"
6464
task :clean do
65-
sh "cd #{MRUBY_ROOT} && rake deep_clean"
65+
sh "rake deep_clean"
6666
end
6767

6868
desc "generate a release tarball"

mrblib/setup.rb

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -318,15 +318,13 @@ def rakefile
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
320320
# 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
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
359357
desc "cleanup"
360358
task :clean do
361-
sh "cd \#{MRUBY_ROOT} && rake deep_clean"
359+
sh "rake deep_clean"
362360
end
363361
RAKEFILE
364362
end

0 commit comments

Comments
 (0)