Kouhei Sutou
null+****@clear*****
Mon May 12 11:31:36 JST 2014
Kouhei Sutou 2014-05-12 11:31:36 +0900 (Mon, 12 May 2014) New Revision: b8242b4ac3c0e3aec53da034f95834afa68070ae https://github.com/droonga/drntest/commit/b8242b4ac3c0e3aec53da034f95834afa68070ae Message: Also support tmpfs at /dev/shm Modified files: lib/drntest/engine.rb Modified: lib/drntest/engine.rb (+11 -4) =================================================================== --- lib/drntest/engine.rb 2014-04-30 16:01:27 +0900 (698b5a8) +++ lib/drntest/engine.rb 2014-05-12 11:31:36 +0900 (d6f89da) @@ -134,10 +134,17 @@ module Drntest end def setup_temporary_dir - tmpfs = Pathname("/run/shm") - if tmpfs.directory? and tmpfs.writable? - FileUtils.rm_rf(temporary_base_dir) - FileUtils.ln_s(tmpfs.to_s, temporary_base_dir.to_s) + tmpfs_candidates = [ + "/dev/shm", + "/run/shm", + ] + tmpfs_candidates.each do |tmpfs_candidate| + tmpfs = Pathname(tmpfs_candidate) + if tmpfs.directory? and tmpfs.writable? + FileUtils.rm_rf(temporary_base_dir) + FileUtils.ln_s(tmpfs.to_s, temporary_base_dir.to_s) + break + end end FileUtils.rm_rf(temporary_dir) FileUtils.mkdir_p(temporary_dir) -------------- next part -------------- HTML����������������������������... Download