From 2e762d05f9e8a112df9c578c6ec32fc32d582f95 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 9 Feb 2016 17:49:47 -0800 Subject: [PATCH] Ensure key command line programs can be run before running cucumber tests - Otherwise, currently, if osrm-extract crashes at startup then the tests continue on and will crash many many times. - This also tests that --help returns an exit code of zero and will catch if this behavior ever changes or is inconsistent between the command line programs --- features/support/env.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/features/support/env.rb b/features/support/env.rb index cb707f9e1..94d7d3625 100644 --- a/features/support/env.rb +++ b/features/support/env.rb @@ -76,6 +76,10 @@ def verify_existance_of_binaries unless File.exists? "#{BIN_PATH}/#{bin}#{EXE}" raise "*** #{BIN_PATH}/#{bin}#{EXE} is missing. Build failed?" end + unless system "#{BIN_PATH}/#{bin}#{EXE} --help" + log "*** Exited with code #{$?.exitstatus}.", :preprocess + raise "*** #{BIN_PATH}/#{bin}#{EXE} --help exited with code #{$?.exitstatus}." + end end end