diff --git a/features/step_definitions/appcloud_steps.rb b/features/step_definitions/appcloud_steps.rb index 7d8f922..95ba2ac 100644 --- a/features/step_definitions/appcloud_steps.rb +++ b/features/step_definitions/appcloud_steps.rb @@ -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