Skip to content

Commit

Permalink
- Try to make the tests a bit more rvm friendly.
Browse files Browse the repository at this point in the history
  • Loading branch information
jordansissel committed Feb 6, 2011
1 parent 29abef6 commit 3b284fa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
9 changes: 7 additions & 2 deletions test/logstash/inputs/test_stomp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@ def em_setup
@port = (rand * 30000 + 20000).to_i
@stomp_pid = Process.fork do
args = ["-p", @port.to_s, *@flags]
exec("stompserver", "stompserver", *args)
$stderr.puts("$!")
stompbin = Gem.bin_path('stompserver', 'stompserver')
exec("/proc/$$/exe", "ruby", "-rubygems", stompbin, *args)
#$0 = "stompserver"
#ARGV.clear
#ARGV.unshift *args
#gem 'stompserver'
$stderr.puts($!)
exit 1
end

Expand Down
3 changes: 2 additions & 1 deletion test/logstash/outputs/test_elasticsearch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ def test_elasticsearch_basic
em_setup

events = []
myfile = File.basename(__FILE__)
1.upto(5).each do |i|
events << LogStash::Event.new("@message" => "just another log rollin' #{i}",
"@source" => "logstash tests in #{__FILE__}")
"@source" => "logstash tests in #{myfile}")
end

# TODO(sissel): Need a way to hook when the agent is ready?
Expand Down
7 changes: 5 additions & 2 deletions test/standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ fi

. "$rvm"
rvm rvmrc trust logstash
cd logstash

git pull origin master
git checkout master

Expand All @@ -31,6 +29,11 @@ rvm gemset create $gemset
rvm "$ruby@$gemset" gem uninstall -ax logstash || true
rvm "$ruby@$gemset" gem build logstash.gemspec
rvm "$ruby@$gemset" gem install --no-ri --no-rdoc logstash-*.gem

# stompserver says it wants 'hoe >= 1.1.1' and the latest 'hoe' requires
# some bullshit version of rubygems that nobody will have, so install
# an older one.
rvm "$ruby@$gemset" gem install --no-ri --no-rdoc hoe -v "1.1.1"
rvm "$ruby@$gemset" gem install --no-ri --no-rdoc stompserver
rvm "$ruby@$gemset" exec logstash-test

0 comments on commit 3b284fa

Please sign in to comment.