From d3d5b880b69bc85eae172b144c434de762ca8f65 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sat, 28 Feb 2009 19:17:17 +0100 Subject: [PATCH] Added an way for keeping temp files --- tests/run.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/run.rb b/tests/run.rb index d9e27363a..e54abef8a 100755 --- a/tests/run.rb +++ b/tests/run.rb @@ -22,6 +22,7 @@ class Test end def unlink_tmp_files + return if (ENV["KEEP_TMPFILES"] == "1") n = "mkvtoolnix-auto-test-" + $$.to_s + "-" Dir.entries("/tmp").each do |e| File.unlink("/tmp/#{e}") if ((e =~ /^#{n}/) and @@ -74,7 +75,7 @@ class Test def hash_tmp(erase = true) output = hash_file(@tmp) if (erase) - File.unlink(@tmp) if (File.exists?(@tmp)) + File.unlink(@tmp) if (File.exists?(@tmp) && (ENV["KEEP_TMPFILES"] != "1")) @debug_commands.push("rm #{@tmp}") @tmp = nil end