lib/autoproj/test.rb in autoproj-1.13.1 vs lib/autoproj/test.rb in autoproj-1.13.2.b1

- old
+ new

@@ -42,17 +42,30 @@ include FlexMock::ArgumentTypes include FlexMock::MockContainer end def setup - # Setup code for all the tests + @tmpdir = Array.new + super end + def create_bootstrap + dir = Dir.mktmpdir + @tmpdir << dir + require 'autoproj/ops/main_config_switcher' + FileUtils.cp_r Ops::MainConfigSwitcher::MAIN_CONFIGURATION_TEMPLATE, File.join(dir, 'autoproj') + Autoproj.root_dir = dir + Autoproj.manifest = Manifest.load(File.join(dir, 'autoproj', 'manifest')) + end + def teardown if defined? FlexMock flexmock_teardown end super + @tmpdir.each do |dir| + FileUtils.remove_entry_secure dir + end Autobuild::Package.clear end end end