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. |
| 14 | # |
| 15 | # |
| 16 | # this runs a series of unit tests for devstack to ensure it's functioning |
| 17 | |
| 18 | if [[ -n $@ ]]; then |
| 19 | FILES=$@ |
| 20 | else |
| 21 | LIBS=`find lib -type f | grep -v \.md` |
| 22 | SCRIPTS=`find . -type f -name \*\.sh` |
Ian Wienand | 09bb9e6 | 2014-02-21 14:33:29 +1100 | [diff] [blame] | 23 | EXTRA="functions functions-common stackrc openrc exerciserc eucarc" |
Sean Dague | e0f4065 | 2013-10-14 17:46:51 -0400 | [diff] [blame] | 24 | FILES="$SCRIPTS $LIBS $EXTRA" |
| 25 | fi |
| 26 | |
| 27 | echo "Running bash8..." |
| 28 | |
Sean Dague | b93ee25 | 2014-02-23 20:41:07 -0500 | [diff] [blame] | 29 | ./tools/bash8.py -v $FILES |
Sean Dague | f5d2a5c | 2014-03-06 13:45:42 -0500 | [diff] [blame] | 30 | |
| 31 | |
| 32 | # Test that no one is trying to land crazy refs as branches |
| 33 | |
| 34 | echo "Ensuring we don't have crazy refs" |
| 35 | |
| 36 | REFS=`grep BRANCH stackrc | grep -v -- '-master'` |
| 37 | rc=$? |
| 38 | if [[ $rc -eq 0 ]]; then |
| 39 | echo "Branch defaults must be master. Found:" |
| 40 | echo $REFS |
| 41 | exit 1 |
| 42 | fi |