Skip to content

Commit

Permalink
Use subdirectory for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 6, 2012
1 parent b88a401 commit e5af5ff
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/groonga/tester.rb
Original file line number Diff line number Diff line change
Expand Up @@ -320,17 +320,17 @@ def run_groonga_script
end

def create_temporary_directory
path = "tmp"
FileUtils.rm_rf(path)
path = "tmp/grntest"
FileUtils.rm_rf(path, :secure => true)
FileUtils.mkdir_p(path)
begin
yield(path)
ensure
if @tester.keep_database? and File.exist?(path)
FileUtils.rm_rf(keep_database_path)
FileUtils.rm_rf(keep_database_path, :secure => true)
FileUtils.mv(path, keep_database_path)
else
FileUtils.rm_rf(path)
FileUtils.rm_rf(path, :secure => true)
end
end
end
Expand Down Expand Up @@ -605,7 +605,7 @@ def remove_reject_file
return unless have_extension?
reject_path = related_file_path("reject")
return if reject_path.nil?
FileUtils.rm_rf(reject_path.to_s)
FileUtils.rm_rf(reject_path.to_s, :secure => true)
end

def output_reject_file(actual_result)
Expand Down

0 comments on commit e5af5ff

Please sign in to comment.