Samuel A. Falvo II | d6092ad | 2013-06-25 14:07:25 -0700 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # This script is responsible for executing all the acceptance tests found in |
| 4 | # the acceptance/ directory. |
| 5 | |
| 6 | # Find where _this_ script is running from. |
| 7 | SCRIPTS=$(dirname $0) |
| 8 | SCRIPTS=$(cd $SCRIPTS; pwd) |
| 9 | |
| 10 | # Locate the acceptance test / examples directory. |
| 11 | ACCEPTANCE=$(cd $SCRIPTS/../acceptance; pwd) |
| 12 | |
| 13 | # Run all acceptance tests sequentially. |
| 14 | # If any test fails, we fail fast. |
| 15 | for T in $(ls -1 $ACCEPTANCE); do |
| 16 | if [ -x $ACCEPTANCE/$T ]; then |
| 17 | echo "$ACCEPTANCE/$T -quiet ..." |
| 18 | if ! $ACCEPTANCE/$T -quiet ; then |
| 19 | echo "- FAILED. Try re-running w/out the -quiet option to see output." |
| 20 | exit 1 |
| 21 | fi |
| 22 | fi |
| 23 | done |
| 24 | |