Permalink
Browse files

Updated local_setup.example.sh and added docs

Previously, local_setup.sh was responsible for setting
the BIN environment variable.  To increase flexibility,
maintainability, and robustness, spec scripts should
not rely on BIN in the future but rather rely on PATH
and RUBYLIB being set properly to the version of puppet.

Signed-off-by: Jeff McCune <jeff@puppetlabs.com>
  • Loading branch information...
1 parent 83bbede commit 7e2fea573dde4f7e82c2e936a4c020e2d4055e9d @jeffmccune jeffmccune committed Jul 21, 2010
Showing with 30 additions and 2 deletions.
  1. +8 −0 CHANGELOG
  2. +16 −0 README
  3. +6 −2 local_setup.example.sh
View
@@ -0,0 +1,8 @@
+2010-07-21 Jeff McCune <jeff@puppetlabs.com>
+* local_setup.sh now expects the PATH and RUBYLIB to be set correctly.
+Please do not rely on the $BIN environment variable when writing
+acceptance tests.
+
+* Cleaned up spec/util.sh to be more readable and contain standard
+bourne shell syntax.
+
View
16 README
@@ -0,0 +1,16 @@
+2010-07-21 Jeff McCune <jeff@puppetlabs.com>
+
+WARNING WARNING WARNING
+This suite of acceptance scripts will modify the system during testing.
+Make SURE you run this suite on a system you do not care about.
+
+It is recommended to run inside a Virtual Machine with a snapshot take
+to easily "undo" the changes made to the system.
+
+THESE SCRIPTS WILL LIKELY BREAK THINGS IF RUN ON AN SYSTEM YOU CARE ABOUT.
+
+Getting Started:
+
+1: Create a local_setup.sh script which sets RUBYLIB and PATH as you wish.
+An example is provided which assumes puppet and facter exist in /opt/puppetlabs
+2: run "make"
View
@@ -1,2 +1,6 @@
-cd ~/puppet/lib
-BIN=../bin
+# JJM Set the base directory where puppet, facter, etc are checked out.
+: ${FACTER_PUPPET_BASE:=/opt/puppetlabs}
+# JJM Set the RUBYLIB
+export RUBYLIB="${FACTER_PUPPET_BASE}/puppet/lib:${FACTER_PUPPET_BASE}/facter/lib:${FACTER_PUPPET_BASE}/puppet-scaffold/lib:${FACTER_PUPPET_BASE}/puppet-module-tool/lib:/Users/jeff/customization/lib/ruby"
+# JJM Set the PATH
+export PATH="${FACTER_PUPPET_BASE}/puppet/sbin:${FACTER_PUPPET_BASE}/puppet/bin:${FACTER_PUPPET_BASE}/facter/bin:${FACTER_PUPPET_BASE}/puppet-scaffold/bin:${PATH}"

0 comments on commit 7e2fea5

Please sign in to comment.