| Sean Dague | e0f4065 | 2013-10-14 17:46:51 -0400 | [diff] [blame] | 1 | #!/bin/bash | 
 | 2 | # | 
 | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); | 
 | 4 | # you may not use this file except in compliance with the License. | 
 | 5 | # You may obtain a copy of the License at | 
 | 6 | # | 
 | 7 | #    http://www.apache.org/licenses/LICENSE-2.0 | 
 | 8 | # | 
 | 9 | # Unless required by applicable law or agreed to in writing, software | 
 | 10 | # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | 
 | 11 | # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | 
 | 12 | # License for the specific language governing permissions and limitations | 
 | 13 | # under the License. | 
| Dean Troyer | dc97cb7 | 2015-03-28 08:20:50 -0500 | [diff] [blame] | 14 |  | 
 | 15 | # This runs a series of unit tests for DevStack to ensure it's functioning | 
| Sean Dague | e0f4065 | 2013-10-14 17:46:51 -0400 | [diff] [blame] | 16 |  | 
| Dean Troyer | d401c84 | 2014-03-21 11:48:01 -0500 | [diff] [blame] | 17 | PASSES="" | 
 | 18 | FAILURES="" | 
 | 19 |  | 
| Sean Dague | f5d2a5c | 2014-03-06 13:45:42 -0500 | [diff] [blame] | 20 | # Test that no one is trying to land crazy refs as branches | 
 | 21 |  | 
| Sean Dague | 9f20ea1 | 2014-11-17 15:14:49 -0500 | [diff] [blame] | 22 | for testfile in tests/test_*.sh; do | 
 | 23 |     $testfile | 
 | 24 |     if [[ $? -eq 0 ]]; then | 
 | 25 |         PASSES="$PASSES $testfile" | 
 | 26 |     else | 
 | 27 |         FAILURES="$FAILURES $testfile" | 
 | 28 |     fi | 
 | 29 | done | 
| Sean Dague | f5d2a5c | 2014-03-06 13:45:42 -0500 | [diff] [blame] | 30 |  | 
| Sean Dague | 9f20ea1 | 2014-11-17 15:14:49 -0500 | [diff] [blame] | 31 | # Summary display now that all is said and done | 
| Dean Troyer | d401c84 | 2014-03-21 11:48:01 -0500 | [diff] [blame] | 32 | echo "=====================================================================" | 
 | 33 | for script in $PASSES; do | 
 | 34 |     echo PASS $script | 
 | 35 | done | 
 | 36 | for script in $FAILURES; do | 
 | 37 |     echo FAILED $script | 
 | 38 | done | 
 | 39 | echo "=====================================================================" | 
 | 40 |  | 
 | 41 | if [[ -n "$FAILURES" ]]; then | 
| Sean Dague | f5d2a5c | 2014-03-06 13:45:42 -0500 | [diff] [blame] | 42 |     exit 1 | 
 | 43 | fi |