summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-05-14 06:10:37 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-05-14 06:10:37 +0000
commit4b0f418c801a802a6b8c95ec8daab3ca7c9bc56f (patch)
tree36b47d2e0727e08529601a30e4a689cb2471c500
parent1c60fc065552eccd61aeb09a1feb96ddfe061744 (diff)
downloadredmine-4b0f418c801a802a6b8c95ec8daab3ca7c9bc56f.tar.gz
redmine-4b0f418c801a802a6b8c95ec8daab3ca7c9bc56f.zip
split method for scm test repository extracting (#16881)
git-svn-id: http://svn.redmine.org/redmine/trunk@13136 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/tasks/testing.rake12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/tasks/testing.rake b/lib/tasks/testing.rake
index d987a4882..9eb7ff76a 100644
--- a/lib/tasks/testing.rake
+++ b/lib/tasks/testing.rake
@@ -51,13 +51,17 @@ namespace :test do
end
end
+ def extract_tar_gz(prefix)
+ unless File.exists?("tmp/test/#{prefix}_repository")
+ # system "gunzip < test/fixtures/repositories/#{prefix}_repository.tar.gz | tar -xv -C tmp/test"
+ system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{prefix}_repository.tar.gz"
+ end
+ end
+
(supported_scms - [:subversion, :mercurial]).each do |scm|
desc "Creates a test #{scm} repository"
task scm => :create_dir do
- unless File.exists?("tmp/test/#{scm}_repository")
- # system "gunzip < test/fixtures/repositories/#{scm}_repository.tar.gz | tar -xv -C tmp/test"
- system "tar -xvz -C tmp/test -f test/fixtures/repositories/#{scm}_repository.tar.gz"
- end
+ extract_tar_gz(scm)
end
end