summaryrefslogtreecommitdiffstats
path: root/test/puppettest.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/puppettest.rb')
-rw-r--r--test/puppettest.rb11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/puppettest.rb b/test/puppettest.rb
index f45356740..20bfb439d 100644
--- a/test/puppettest.rb
+++ b/test/puppettest.rb
@@ -34,7 +34,7 @@ module TestPuppet
Dir.mkdir(@configpath)
end
- @@tmpfiles = [@configpath]
+ @@tmpfiles = [@configpath, tmpdir()]
@@tmppids = []
if $0 =~ /.+\.rb/
@@ -128,6 +128,13 @@ module TestPuppet
else
"/tmp"
end
+
+ @tmpdir = File.join(@tmpdir, "puppettesting")
+
+ unless File.exists?(@tmpdir)
+ FileUtils.mkdir_p(@tmpdir)
+ File.chmod(01777, @tmpdir)
+ end
end
@tmpdir
end
@@ -303,7 +310,7 @@ module ExeTest
%x{#{ps}}.chomp.split(/\n/).each { |line|
if line =~ /ruby.+puppetmasterd/
next if line =~ /\.rb/ # skip the test script itself
- ary = line.split(/\s+/)
+ ary = line.sub(/^\s+/, '').split(/\s+/)
runningpid = ary[1].to_i
end
}