Skip to content

Instantly share code, notes, and snippets.

@myronmarston
Created July 24, 2012 22:02
Show Gist options
  • Save myronmarston/3172980 to your computer and use it in GitHub Desktop.
Save myronmarston/3172980 to your computer and use it in GitHub Desktop.
#!/bin/sh
set -e
TIMEFMT='%*E'
runtime=$(((bundle install --standalone && time rspec spec/acceptance/silo_spec.rb -e 'end-to-end') | tail -0) 2>&1)
ms=$(echo $runtime | ruby -e "puts Integer(Float(gets) * 1000)")
echo "Time: $ms ms"
if [ $ms -gt 300 ]
then
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment