Skip to content

Commit

Permalink
Make the Erlang test return pending if no Erlang is installed
Browse files Browse the repository at this point in the history
  • Loading branch information
pbozeman committed Apr 27, 2011
1 parent 50516e2 commit 4cd4e51
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions features/step_definitions/appcloud_steps.rb
Expand Up @@ -181,16 +181,16 @@

Given /^I have built a simple Erlang application$/ do
# Try to find an appropriate Erlang
make_prefix = ''
path_erl_v = `erl -version 2>&1`
unless path_erl_v =~ /.*5.8.4$/
raise "No appropriate Erlang R14B02 runtime found" unless File.exists? '/opt/vcap/runtimes/erlang-R14B02/bin/erl'
make_prefix = "PATH=/opt/vcap/runtimes/erlang-R14B02/bin:$PATH"
erlang_path = '/opt/vcap/runtimes/erlang-R14B02/bin'
path_erl_v = `#{erlang_path}/erl -version 2>&1`.strip
unless path_erl_v =~ /.*5.7.4$/
pending "Not running Erlang test because the Erlang runtime is not installed"
else
Dir.chdir("#{@testapps_dir}/#{SIMPLE_ERLANG_APP}")
make_prefix = "PATH=#{erlang_path}:$PATH"
rel_build_result = `#{make_prefix} make relclean rel`
raise "Erlang application build failed: #{rel_build_result}" if $? != 0
end

Dir.chdir("#{@testapps_dir}/#{SIMPLE_ERLANG_APP}")
rel_build_result = `#{make_prefix} make relclean rel`
raise "Erlang application build failed: #{rel_build_result}" if $? != 0
end

Given /^I have deployed a simple Erlang application$/ do
Expand Down

0 comments on commit 4cd4e51

Please sign in to comment.