[Pkg-puppet-devel] [facter] 62/352: (Maint) Allow acceptance tests to be run on preserved windows hosts

Stig Sandbeck Mathisen ssm at debian.org
Sun Apr 6 22:21:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

ssm pushed a commit to branch master
in repository facter.

commit 0758ca23a8d77d5c79dfe42aeca69e1dddd1df0a
Author: Josh Cooper <josh at puppetlabs.com>
Date:   Fri Nov 15 10:35:27 2013 -0800

    (Maint) Allow acceptance tests to be run on preserved windows hosts
    
    Previously, running acceptance tests on a preserved windows host would
    fail, because the puppet-win32-ruby directory already existed from the
    previous run, and git clone will report a fatal error.
    
    This commit uses beaker's method for cloning a repo. The method handles
    things like only cloning if necessary, resetting remotes, and cleaning
    existing workspaces.
    
    Cherry-pick of 326b7ac106fe4630ff59ec1da716207c0d67a065 from puppet
---
 acceptance/setup/00_EnvSetup.rb | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/acceptance/setup/00_EnvSetup.rb b/acceptance/setup/00_EnvSetup.rb
index 5794013..889d6cc 100644
--- a/acceptance/setup/00_EnvSetup.rb
+++ b/acceptance/setup/00_EnvSetup.rb
@@ -4,6 +4,8 @@ step "Ensure Git and Ruby"
 
 require 'puppet/acceptance/install_utils'
 extend Puppet::Acceptance::InstallUtils
+require 'beaker/dsl/install_utils'
+extend Beaker::DSL::InstallUtils
 
 PACKAGES = {
   :redhat => [
@@ -27,9 +29,9 @@ install_packages_on(hosts, PACKAGES, :check_if_exists => true)
 
 hosts.each do |host|
   if host['platform'] =~ /windows/
-    on host, 'echo $PATH'
-    on host, 'git clone https://github.com/puppetlabs/puppet-win32-ruby'
-    on host, 'cp -r puppet-win32-ruby/ruby/* /'
+    step "#{host} Install ruby from git"
+    install_from_git(host, "/opt/puppet-git-repos", :name => 'puppet-win32-ruby', :path => 'git://github.com/puppetlabs/puppet-win32-ruby')
+    on host, 'cd /opt/puppet-git-repos/puppet-win32-ruby; cp -r ruby/* /'
     on host, 'cd /lib; icacls ruby /grant "Everyone:(OI)(CI)(RX)"'
     on host, 'cd /lib; icacls ruby /reset /T'
     on host, 'ruby --version'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-puppet/facter.git



More information about the Pkg-puppet-devel mailing list