summaryrefslogtreecommitdiff
path: root/acceptance/.shared
diff options
context:
space:
mode:
authorPrajakta Purohit <prajakta@opscode.com>2016-06-28 19:34:02 -0700
committerPrajakta Purohit <prajakta@opscode.com>2016-07-01 08:07:12 -0700
commit69de48e30bbc8cec1493cba715bb09f766bd4082 (patch)
treed951255194726baba437e9fdbe8442338e7e7026 /acceptance/.shared
parentf1f9d58f821d9b45125d53624cf110d3291ab5be (diff)
downloadchef-69de48e30bbc8cec1493cba715bb09f766bd4082.tar.gz
upload kitchen per suite logs to cipraj/FLOW-370/acceptance_logging
Diffstat (limited to 'acceptance/.shared')
-rw-r--r--acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb b/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb
index d36909e8b3..c8bcd4ab77 100644
--- a/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb
+++ b/acceptance/.shared/kitchen_acceptance/libraries/kitchen.rb
@@ -46,6 +46,14 @@ module KitchenAcceptance
"ARTIFACTORY_PASSWORD" => artifactory_password
}.merge(new_resource.env))
end
+ ruby_block "copy_kitchen_logs_to_data_path" do
+ block do
+ suite = kitchen_dir.split("/").last
+ kitchen_log_path = ENV["WORKSPACE"] ? "#{ENV["WORKSPACE"]}/chef-acceptance-data/logs" : "#{kitchen_dir}/../.acceptance_data/logs/kitchen"
+ FileUtils.mkdir_p("#{kitchen_log_path}/#{suite}")
+ FileUtils.cp_r("#{kitchen_dir}/.kitchen/logs/", "#{kitchen_log_path}/#{suite}")
+ end
+ end
end
end
end