blob: 685b2037f03fdf4489d4a7ed5f89561755cb62ad [file] [log] [blame]
Sean Daguee0f40652013-10-14 17:46:51 -04001#!/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
18if [[ -n $@ ]]; then
19 FILES=$@
20else
21 LIBS=`find lib -type f | grep -v \.md`
22 SCRIPTS=`find . -type f -name \*\.sh`
Ian Wienand09bb9e62014-02-21 14:33:29 +110023 EXTRA="functions functions-common stackrc openrc exerciserc eucarc"
Sean Daguee0f40652013-10-14 17:46:51 -040024 FILES="$SCRIPTS $LIBS $EXTRA"
25fi
26
27echo "Running bash8..."
28
Sean Dagueb93ee252014-02-23 20:41:07 -050029./tools/bash8.py -v $FILES
Sean Daguef5d2a5c2014-03-06 13:45:42 -050030
31
32# Test that no one is trying to land crazy refs as branches
33
34echo "Ensuring we don't have crazy refs"
35
36REFS=`grep BRANCH stackrc | grep -v -- '-master'`
37rc=$?
38if [[ $rc -eq 0 ]]; then
39 echo "Branch defaults must be master. Found:"
40 echo $REFS
41 exit 1
42fi